Re: [PATCH 1/1] btrfs: Fix NO_SPACE bug caused by delayed-iput

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 27, 2015 at 09:21:43AM +0800, Zhao Lei wrote:
> Hi, David Sterba
> 
> * From: David Sterba [mailto:dsterba@xxxxxxx]
> > Sent: Friday, February 27, 2015 6:29 AM
> > To: Zhaolei
> > Cc: linux-btrfs@xxxxxxxxxxxxxxx
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux