Skip to content

Commit 2167f2c

Browse files
vshankaridryomov
authored andcommitted
ceph: record updated mon_addr on remount
Note that the new monitors are just shown in /proc/mounts. Ceph does not (re)connect to new monitors yet. [ jlayton: s/printk\(KERN_NOTICE/pr_notice(/ s/strcmp/strcmp_null/ ] Signed-off-by: Venky Shankar <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 7b19b4d commit 2167f2c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/ceph/super.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,13 @@ static int ceph_reconfigure_fc(struct fs_context *fc)
12771277
else
12781278
ceph_clear_mount_opt(fsc, ASYNC_DIROPS);
12791279

1280+
if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) {
1281+
kfree(fsc->mount_options->mon_addr);
1282+
fsc->mount_options->mon_addr = fsopt->mon_addr;
1283+
fsopt->mon_addr = NULL;
1284+
pr_notice("ceph: monitor addresses recorded, but not used for reconnection");
1285+
}
1286+
12801287
sync_filesystem(fc->root->d_sb);
12811288
return 0;
12821289
}

0 commit comments

Comments
 (0)