From: David Sterba <dsterba@suse.cz>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org, clm@fb.com, stable@vger.kernel.org
Subject: Re: [PATCH] btrfs: do not return EBUSY on concurrent subvolume mounts
Date: Thu, 28 Apr 2016 18:17:57 +0200 [thread overview]
Message-ID: <20160428161757.GV29353@twin.jikos.cz> (raw)
In-Reply-To: <1461770076-13000-1-git-send-email-dsterba@suse.com>
On Wed, Apr 27, 2016 at 05:14:36PM +0200, David Sterba wrote:
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -1588,8 +1588,6 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
> if (s->s_root) {
> btrfs_close_devices(fs_devices);
> free_fs_info(fs_info);
> - if ((flags ^ s->s_flags) & MS_RDONLY)
> - error = -EBUSY;
And this is a wrong fix. It will break the existing semantics of mixed
ro/rw mounts. With this change, it's not possible to mount the first
subvol ro and the rest with rw. The mount succeeds, but does not lead to
the right result.
At least now I have a better idea where the race happens, btrfs_subvol
between vfs_kern_mount and the remount.
prev parent reply other threads:[~2016-04-28 16:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 15:14 [PATCH] btrfs: do not return EBUSY on concurrent subvolume mounts David Sterba
2016-04-27 19:34 ` Josef Bacik
2016-04-27 23:22 ` Liu Bo
2016-04-28 9:12 ` David Sterba
2016-04-28 10:05 ` David Sterba
2016-04-28 10:01 ` Filipe Manana
2016-04-28 16:17 ` David Sterba [this message]
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=20160428161757.GV29353@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=stable@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