From: Andrei Vagin <avagin@openvz.org>
To: David Howells <dhowells@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, Andrei Vagin <avagin@gmail.com>
Subject: [PATCH dhowells/mount-api 1/2] fs/fsconfig: handle FSCONFIG_CMD_RECONFIGURE
Date: Fri, 10 Aug 2018 15:00:26 -0700 [thread overview]
Message-ID: <20180810220027.2735-1-avagin@openvz.org> (raw)
From: Andrei Vagin <avagin@gmail.com>
It looks like everything is already prepared for that and we only need
to call do_remount_sb() to apply changes from fs_context.
Signed-off-by: Andrei Vagin <avagin@gmail.com>
---
fs/fsopen.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/fs/fsopen.c b/fs/fsopen.c
index e79bb5b085d6..6991230a7b59 100644
--- a/fs/fsopen.c
+++ b/fs/fsopen.c
@@ -273,7 +273,25 @@ static int vfs_fsconfig_action(struct fs_context *fc, enum fsconfig_command cmd)
else
fc->phase = FS_CONTEXT_FAILED;
return ret;
+ case FSCONFIG_CMD_RECONFIGURE:
+ {
+ struct super_block *sb;
+
+ if (fc->phase != FS_CONTEXT_RECONF_PARAMS)
+ return -EBUSY;
+ fc->phase = FS_CONTEXT_RECONFIGURING;
+ sb = fc->root->d_sb;
+ down_write(&sb->s_umount);
+ ret = do_remount_sb(sb, 0, NULL, 0, 0, fc);
+ up_write(&sb->s_umount);
+
+ if (ret == 0)
+ fc->phase = FS_CONTEXT_CREATE_PARAMS;
+ else
+ fc->phase = FS_CONTEXT_FAILED;
+ return ret;
+ }
default:
return -EOPNOTSUPP;
}
--
2.17.1
next reply other threads:[~2018-08-11 0:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 22:00 Andrei Vagin [this message]
2018-08-10 22:00 ` [PATCH dhowells/mount-api 2/2] selftests: implement a test for a new mount API Andrei Vagin
2018-08-20 23:47 ` Dave Chinner
2018-08-10 22:52 ` [PATCH dhowells/mount-api 1/2] fs/fsconfig: handle FSCONFIG_CMD_RECONFIGURE David Howells
2018-08-10 22:55 ` [PATCH dhowells/mount-api 2/2] selftests: implement a test for a new mount API David Howells
2018-08-20 23:29 ` Andrei Vagin
2018-08-21 9:19 ` David Howells
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=20180810220027.2735-1-avagin@openvz.org \
--to=avagin@openvz.org \
--cc=avagin@gmail.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
/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).