diff mbox series

[v2,3/4] ceph: record updated mon_addr on remount

Message ID 20210702064821.148063-4-vshankar@redhat.com
State Superseded
Headers show
Series ceph: new mount device syntax | expand

Commit Message

Venky Shankar July 2, 2021, 6:48 a.m. UTC
Note that the new monitors are just shown in /proc/mounts.
Ceph does not (re)connect to new monitors yet.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
---
 fs/ceph/super.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 03e5f4bb2b6f..52f03505bb86 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1255,6 +1255,12 @@  static int ceph_reconfigure_fc(struct fs_context *fc)
 	else
 		ceph_clear_mount_opt(fsc, ASYNC_DIROPS);
 
+	if (strcmp(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;
+	}
+
 	sync_filesystem(fc->root->d_sb);
 	return 0;
 }