From: Liu Bo <bo.li.liu@oracle.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: remove rcu_barrier in btrfs_close_devices
Date: Wed, 11 Oct 2017 11:02:49 -0600 [thread overview]
Message-ID: <20171011170249.GC16979@dhcp-10-211-47-181.usdhcp.oraclecorp.com> (raw)
In-Reply-To: <82a3be82-f2a9-d0bd-b34c-71f98df0e571@oracle.com>
On Wed, Oct 11, 2017 at 03:41:23PM +0800, Anand Jain wrote:
>
>
> On 10/11/2017 02:11 PM, Anand Jain wrote:
> >
> >
> > On 10/11/2017 05:51 AM, Liu Bo wrote:
> > > It was introduced because btrfs used to do blkdev_put in a deferred
> > > work, now that btrfs has put blkdev in place, this rcu_barrier can be
> > > removed.
>
> On the 2nd thought, modprobe -r btrfs would still need rcu_barrier(), some
> where else outside of umount context ?
Thanks a lot for the comments.
modprobe -r btrfs will do btrfs_cleanup_fs_uuids(), where it cleanup
every %fs_devices on the list, but when we do btrfs_close_devices(), we
have replaced the devices on the list with dummy ones which only have
the same name and uuid, so modprobe -r btrfs will free those instead
of what we were using, this change won't cause a problem for it.
Thanks,
-liubo
>
> Thanks, Anand
>
>
> > Reviewed-by: Anand Jain <anand.jain@oracle.com>
> >
> > Thanks, Anand
> >
> >
> > > Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> > > ---
> > > fs/btrfs/volumes.c | 6 ------
> > > 1 file changed, 6 deletions(-)
> > >
> > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> > > index 0e8f16c..d983cea 100644
> > > --- a/fs/btrfs/volumes.c
> > > +++ b/fs/btrfs/volumes.c
> > > @@ -958,12 +958,6 @@ int btrfs_close_devices(struct btrfs_fs_devices
> > > *fs_devices)
> > > __btrfs_close_devices(fs_devices);
> > > free_fs_devices(fs_devices);
> > > }
> > > - /*
> > > - * Wait for rcu kworkers under __btrfs_close_devices
> > > - * to finish all blkdev_puts so device is really
> > > - * free when umount is done.
> > > - */
> > > - rcu_barrier();
> > > return ret;
> > > }
> > >
next prev parent reply other threads:[~2017-10-11 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 21:51 [PATCH] Btrfs: remove rcu_barrier in btrfs_close_devices Liu Bo
2017-10-11 6:11 ` Anand Jain
2017-10-11 7:41 ` Anand Jain
2017-10-11 17:02 ` Liu Bo [this message]
2017-10-30 16:25 ` David Sterba
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=20171011170249.GC16979@dhcp-10-211-47-181.usdhcp.oraclecorp.com \
--to=bo.li.liu@oracle.com \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@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).