linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] Btrfs: remove residual code in delayed inode async helper
@ 2013-12-13 10:09 Miao Xie
  2013-12-13 10:09 ` [PATCH 2/6] Btrfs: don't run delayed nodes again after all nodes flush Miao Xie
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Miao Xie @ 2013-12-13 10:09 UTC (permalink / raw)
  To: linux-btrfs

Before applying the patch
  commit de3cb945db4d8eb3b046dc7a5ea89a893372750c
  title: Btrfs: improve the delayed inode throttling

We need requeue the async work after the current work was done, it
introduced a deadlock problem. So we wrote the code that this patch
removes to avoid the above problem. But after applying the above
patch, the deadlock problem didn't exist. So we should remove that
fix code.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/delayed-inode.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 8d292fb..e832621 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -1300,33 +1300,6 @@ again:
 	trans->block_rsv = &root->fs_info->delayed_block_rsv;
 
 	__btrfs_commit_inode_delayed_items(trans, path, delayed_node);
-	/*
-	 * Maybe new delayed items have been inserted, so we need requeue
-	 * the work. Besides that, we must dequeue the empty delayed nodes
-	 * to avoid the race between delayed items balance and the worker.
-	 * The race like this:
-	 * 	Task1				Worker thread
-	 * 					count == 0, needn't requeue
-	 * 					  also needn't insert the
-	 * 					  delayed node into prepare
-	 * 					  list again.
-	 * 	add lots of delayed items
-	 * 	queue the delayed node
-	 * 	  already in the list,
-	 * 	  and not in the prepare
-	 * 	  list, it means the delayed
-	 * 	  node is being dealt with
-	 * 	  by the worker.
-	 * 	do delayed items balance
-	 * 	  the delayed node is being
-	 * 	  dealt with by the worker
-	 * 	  now, just wait.
-	 * 	  				the worker goto idle.
-	 * Task1 will sleep until the transaction is commited.
-	 */
-	mutex_lock(&delayed_node->mutex);
-	btrfs_dequeue_delayed_node(root->fs_info->delayed_root, delayed_node);
-	mutex_unlock(&delayed_node->mutex);
 
 	trans->block_rsv = block_rsv;
 	btrfs_end_transaction_dmeta(trans, root);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-16 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 10:09 [PATCH 1/6] Btrfs: remove residual code in delayed inode async helper Miao Xie
2013-12-13 10:09 ` [PATCH 2/6] Btrfs: don't run delayed nodes again after all nodes flush Miao Xie
2013-12-13 10:09 ` [PATCH 3/6] Btrfs: cleanup code of btrfs_balance_delayed_items() Miao Xie
2013-12-13 10:09 ` [PATCH 4/6] Btrfs: remove btrfs_end_transaction_dmeta() Miao Xie
2013-12-16 15:00   ` David Sterba
2013-12-13 10:09 ` [PATCH 5/6] Btrfs: use flags instead of the bool variants in delayed node Miao Xie
2013-12-13 10:09 ` [PATCH 6/6] Btrfs: introduce the delayed inode ref deletion for the single link inode Miao Xie
2013-12-13 15:19   ` Josef Bacik

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).