ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Venky Shankar <vshankar@redhat.com>
To: jlayton@redhat.com, idryomov@gmail.com, lhenriques@suse.de
Cc: pdonnell@redhat.com, ceph-devel@vger.kernel.org,
	Venky Shankar <vshankar@redhat.com>
Subject: [PATCH v4 4/5] ceph: record updated mon_addr on remount
Date: Wed, 14 Jul 2021 15:35:53 +0530	[thread overview]
Message-ID: <20210714100554.85978-5-vshankar@redhat.com> (raw)
In-Reply-To: <20210714100554.85978-1-vshankar@redhat.com>

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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index d8c6168b7fcd..d3a5a3729c5b 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1268,6 +1268,13 @@ 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;
+		printk(KERN_NOTICE "ceph: monitor addresses recorded, but not used for reconnection");
+	}
+
 	sync_filesystem(fc->root->d_sb);
 	return 0;
 }
-- 
2.27.0


  parent reply	other threads:[~2021-07-14 10:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 10:05 [PATCH v4 0/5] ceph: new mount device syntax Venky Shankar
2021-07-14 10:05 ` [PATCH v4 1/5] ceph: generalize addr/ip parsing based on delimiter Venky Shankar
2021-07-14 10:05 ` [PATCH v4 2/5] ceph: rename parse_fsid() to ceph_parse_fsid() and export Venky Shankar
2021-07-14 10:05 ` [PATCH v4 3/5] ceph: new device mount syntax Venky Shankar
2021-07-14 10:05 ` Venky Shankar [this message]
2021-07-14 16:17   ` [PATCH v4 4/5] ceph: record updated mon_addr on remount Jeff Layton
2021-07-14 16:35     ` Luis Henriques
2021-07-14 18:15       ` Jeff Layton
2021-07-15 11:42         ` Luis Henriques
2021-07-15  5:52     ` Venky Shankar
2021-07-14 18:05   ` Jeff Layton
2021-07-14 10:05 ` [PATCH v4 5/5] doc: document new CephFS mount device syntax Venky Shankar
2021-07-14 15:33 ` [PATCH v4 0/5] ceph: new " Jeff Layton
2021-07-16 18:47 ` Jeff Layton
2021-07-19  7:03   ` Venky Shankar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210714100554.85978-5-vshankar@redhat.com \
    --to=vshankar@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=lhenriques@suse.de \
    --cc=pdonnell@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).