From: David Sterba <dsterba@suse.cz>
To: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/1] btrfs: Fix NO_SPACE bug caused by delayed-iput
Date: Wed, 18 Mar 2015 16:59:56 +0100 [thread overview]
Message-ID: <20150318155956.GC20767@suse.cz> (raw)
In-Reply-To: <00d101d0522b$befc6df0$3cf549d0$@cn.fujitsu.com>
On Fri, Feb 27, 2015 at 09:21:43AM +0800, Zhao Lei wrote:
> Hi, David Sterba
>
> * From: David Sterba [mailto:dsterba@suse.cz]
> > Sent: Friday, February 27, 2015 6:29 AM
> > To: Zhaolei
> > Cc: linux-btrfs@vger.kernel.org
> > Subject: Re: [PATCH 1/1] btrfs: Fix NO_SPACE bug caused by delayed-iput
> >
> > On Thu, Feb 26, 2015 at 11:20:23AM +0800, Zhaolei wrote:
> > > --- a/fs/btrfs/transaction.c
> > > +++ b/fs/btrfs/transaction.c
> > > @@ -2068,8 +2068,12 @@ int btrfs_commit_transaction(struct
> > > btrfs_trans_handle *trans,
> > >
> > > kmem_cache_free(btrfs_trans_handle_cachep, trans);
> > >
> > > - if (current != root->fs_info->transaction_kthread)
> > > + if (current != root->fs_info->transaction_kthread) {
> > > btrfs_run_delayed_iputs(root);
> >
> > Using a mutex for this kind of synchronization is not entirely correct though it
> > works.
> >
> rw sem is best way I thought which was choosed from
> mutex, rw_sem, and wait_queue, although the function name is not
> self documented...
> Do you have some suggestion for this kind of synchronization?
No better ideas at the moment, please proceed.
prev parent reply other threads:[~2015-03-18 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 3:20 [PATCH 0/1] btrfs: Fix NO_SPACE bug caused by delayed-iput Zhaolei
2015-02-26 3:20 ` [PATCH 1/1] " Zhaolei
2015-02-26 22:29 ` David Sterba
2015-02-27 1:21 ` Zhao Lei
2015-03-18 15:59 ` 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=20150318155956.GC20767@suse.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=zhaolei@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.