]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: record updated mon_addr on remount
authorVenky Shankar <vshankar@redhat.com>
Wed, 14 Jul 2021 10:05:53 +0000 (15:35 +0530)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 1 Dec 2021 16:23:29 +0000 (17:23 +0100)
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>
fs/ceph/super.c

index 05bf7c849e38e5a23a6839a5732700cbeb7ea62d..d401b5ee6d646d1e1777fe11949e7a35044d53fc 100644 (file)
@@ -1280,6 +1280,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;
 }