summaryrefslogtreecommitdiff
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-10-14 11:10:47 -0400
committerIlya Dryomov <idryomov@gmail.com>2021-11-08 03:29:52 +0100
commit631ed4b082872767412cda8a941af832f227335c (patch)
tree2afeb0c6d1924769a928751ba4c0387c818de63d /fs/ceph/super.h
parent0e24421ac431e7af62d4acef6c638b85aae51728 (diff)
ceph: shut down mount on bad mdsmap or fsmap decode
As Greg pointed out, if we get a mangled mdsmap or fsmap, then something has gone very wrong, and we should avoid doing any activity on the filesystem. When this occurs, shut down the mount the same way we would with a forced umount by calling ceph_umount_begin when decoding fails on either map. This causes most operations done against the filesystem to return an error. Any dirty data or caps in the cache will be dropped as well. The effect is not reversible, so the only remedy is to umount. [ idryomov: print fsmap decoding error ] URL: https://tracker.ceph.com/issues/52303 Signed-off-by: Jeff Layton <jlayton@kernel.org> Acked-by: Greg Farnum <gfarnum@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 5c911586593d..93d313294ade 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -941,6 +941,7 @@ extern void ceph_put_snapid_map(struct ceph_mds_client* mdsc,
struct ceph_snapid_map *sm);
extern void ceph_trim_snapid_map(struct ceph_mds_client *mdsc);
extern void ceph_cleanup_snapid_map(struct ceph_mds_client *mdsc);
+void ceph_umount_begin(struct super_block *sb);
/*