From: Al Viro <viro@ZenIV.linux.org.uk>
To: Miao Xie <miaoxie@huawei.com>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>,
linux-btrfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH RESEND v4 6/8] vfs: Add get_vfsmount_sb() function to get vfsmount from a given sb.
Date: Fri, 30 Jan 2015 06:15:52 +0000 [thread overview]
Message-ID: <20150130061550.GJ29656@ZenIV.linux.org.uk> (raw)
In-Reply-To: <54CB17F1.2070902@huawei.com>
On Fri, Jan 30, 2015 at 01:34:41PM +0800, Miao Xie wrote:
> > First of all, ->s_umount is not a mutex; it's rwsem. So you mean
> > down_read_trylock(). As for the transient failures - grep for down_write
> > on it... E.g. have somebody call mount() from the same device. We call
> > sget(), which finds existing superblock and calls grab_super(). Sure,
> > that ->s_umount will be released shortly, but in the meanwhile your trylock
> > will fail...
>
> I know it, so I suggested to return -EBUSY in the previous mail.
> I think it is acceptable method, mount/umount operations are not so many
> after all.
Er... What for, when there's a trivial variant that doesn't suffer those
spurious -EBUSY? Seriously, just move sysfs removals up to make sure
that any possible fs shutdown won't progress past those during sysfs IO and
use sb_want_write/sb_dont_write to make sure it'll stay r/w for the duration.
What's the problem?
next prev parent reply other threads:[~2015-01-30 6:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1422498281-20493-1-git-send-email-quwenruo@cn.fujitsu.com>
2015-01-29 2:24 ` [PATCH RESEND v4 6/8] vfs: Add get_vfsmount_sb() function to get vfsmount from a given sb Qu Wenruo
2015-01-29 12:37 ` David Sterba
2015-01-29 15:23 ` Al Viro
2015-01-30 1:11 ` Qu Wenruo
2015-01-30 2:09 ` Al Viro
2015-01-30 2:20 ` Qu Wenruo
2015-01-30 0:52 ` Miao Xie
2015-01-30 1:44 ` Qu Wenruo
2015-01-30 2:02 ` Qu Wenruo
2015-01-30 3:22 ` Miao Xie
2015-01-30 3:30 ` Qu Wenruo
2015-01-30 2:14 ` Al Viro
2015-01-30 4:14 ` Miao Xie
2015-01-30 4:37 ` Al Viro
2015-01-30 5:34 ` Miao Xie
2015-01-30 6:15 ` Al Viro [this message]
2015-01-30 5:30 ` Qu Wenruo
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=20150130061550.GJ29656@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=quwenruo@cn.fujitsu.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).