summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2021-07-14 15:35:53 +0530
committerIlya Dryomov <idryomov@gmail.com>2022-01-13 13:40:06 +0100
commit2167f2cc686a97911a0b06ba9c97cec304b7c432 (patch)
tree784441323161f36855f46df1bb0a7811cf9cc1f7 /fs/ceph
parent7b19b4db5add8d9f50e854907a82a10ba4d27c42 (diff)
downloadlinux-2167f2cc686a97911a0b06ba9c97cec304b7c432.tar.bz2
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 <vshankar@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index e2c40d055711..31b5786cd98f 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1277,6 +1277,13 @@ static int ceph_reconfigure_fc(struct fs_context *fc)
else
ceph_clear_mount_opt(fsc, ASYNC_DIROPS);
+ if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) {
+ kfree(fsc->mount_options->mon_addr);
+ fsc->mount_options->mon_addr = fsopt->mon_addr;
+ fsopt->mon_addr = NULL;
+ pr_notice("ceph: monitor addresses recorded, but not used for reconnection");
+ }
+
sync_filesystem(fc->root->d_sb);
return 0;
}