ceph: skip existing superblocks that are blocklisted when mounting
RFC PATCH 1/1 ceph: skip existing superblocks that are blocklisted when mounting
Currently when mounting, we may end up finding an existing superblock that corresponds to a blocklisted MDS client. This means that the new mount ends up being unusable.
If we've found an existing superblock that is already blocklisted, and the client is not configured to recover on its own, fail the match.
Cc: Patrick Donnelly <[email protected]>
Cc: Niels de Vos <[email protected]>
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1901499
--- fs/ceph/super.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ceph/super.c +7 -0
@@ -1124,6 +1124,7 @@ static int ceph_compare_super(struct super_block *sb, struct fs_context *fc)struct ceph_mount_options *fsopt = new->mount_options;struct ceph_options *opt = new->client->options;struct ceph_fs_client *other =ceph_sb_to_client (sb); +struct ceph_mds_client *mdsc =ceph_sb_to_mdsc (sb);dout ("ceph_compare_super %p\n" , sb);
@@ -1140,6 +1141,12 @@ static int ceph_compare_super(struct super_block *sb, struct fs_context *fc)dout ("flags differ\n" );return 0 ; } + +/* Exclude any blocklisted superblocks */ +if (mdsc->blocklisted && !(fsopt->flags &CEPH_MOUNT_OPT_CLEANRECOVER )) { +dout ("mds client is blocklisted (and CLEANRECOVER is not set)\n" ); +return 0 ; + }return 1 ; }
Signature · 1 line
2.31.1
RFC PATCH 1/1 ceph: skip existing superblocks that are blocklisted when mounting
Currently when mounting, we may end up finding an existing superblock that corresponds to a blocklisted MDS client. This means that the new mount ends up being unusable.
If we've found an existing superblock that is already blocklisted, and the client is not configured to recover on its own, fail the match.
Cc: Patrick Donnelly <[email protected]>
Cc: Niels de Vos <[email protected]>
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1901499
--- fs/ceph/super.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ceph/super.c +7 -0
@@ -1124,6 +1124,7 @@ static int ceph_compare_super(struct super_block *sb, struct fs_context *fc)struct ceph_mount_options *fsopt = new->mount_options;struct ceph_options *opt = new->client->options;struct ceph_fs_client *other =ceph_sb_to_client (sb); +struct ceph_mds_client *mdsc =ceph_sb_to_mdsc (sb);dout ("ceph_compare_super %p\n" , sb);
@@ -1140,6 +1141,12 @@ static int ceph_compare_super(struct super_block *sb, struct fs_context *fc)dout ("flags differ\n" );return 0 ; } + +/* Exclude any blocklisted superblocks */ +if (mdsc->blocklisted && !(fsopt->flags &CEPH_MOUNT_OPT_CLEANRECOVER )) { +dout ("mds client is blocklisted (and CLEANRECOVER is not set)\n" ); +return 0 ; + }return 1 ; }
Signature · 1 line
2.31.1