linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: set task state with schedule_timeout_uninterruptible()
@ 2010-07-26  8:27 Kulikov Vasiliy
  2010-07-27  3:41 ` Miao Xie
  0 siblings, 1 reply; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-07-26  8:27 UTC (permalink / raw)
  To: kernel-janitors; +Cc: Chris Mason, Tejun Heo, linux-btrfs, linux-kernel

worker_loop() uses schedule_timeout() without setting state to
STATE_(UN)INTERRUPTIBLE. As it is called in cycle without checking of
pending signals, use schedule_timeout_uninterruptible().

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 fs/btrfs/async-thread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index 7ec1409..54eb070 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -362,7 +362,7 @@ again:
 				 * worker->working is still 1, so nobody
 				 * is going to try and wake us up
 				 */
-				schedule_timeout(1);
+				schedule_timeout_uninterruptible(1);
 				smp_mb();
 				if (!list_empty(&worker->pending) ||
 				    !list_empty(&worker->prio_pending))
-- 
1.7.0.4

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

* Re: [PATCH] btrfs: set task state with schedule_timeout_uninterruptible()
  2010-07-26  8:27 [PATCH] btrfs: set task state with schedule_timeout_uninterruptible() Kulikov Vasiliy
@ 2010-07-27  3:41 ` Miao Xie
  2010-07-27 17:46   ` [PATCH v2] " Vasiliy Kulikov
  0 siblings, 1 reply; 3+ messages in thread
From: Miao Xie @ 2010-07-27  3:41 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: kernel-janitors, Chris Mason, Tejun Heo, linux-btrfs,
	linux-kernel

On Mon, 26 Jul 2010 12:27:43 +0400, Kulikov Vasiliy wrote:
> worker_loop() uses schedule_timeout() without setting state to
> STATE_(UN)INTERRUPTIBLE. As it is called in cycle without checking of
> pending signals, use schedule_timeout_uninterruptible().
> 
> Signed-off-by: Kulikov Vasiliy<segooon@gmail.com>
> ---
>   fs/btrfs/async-thread.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
> index 7ec1409..54eb070 100644
> --- a/fs/btrfs/async-thread.c
> +++ b/fs/btrfs/async-thread.c
> @@ -362,7 +362,7 @@ again:
>   				 * worker->working is still 1, so nobody
>   				 * is going to try and wake us up
>   				 */
> -				schedule_timeout(1);
> +				schedule_timeout_uninterruptible(1);

I found there is the same problem in the other place of the btrfs,
could you fix them?

Thanks!
Miao

>   				smp_mb();
>   				if (!list_empty(&worker->pending) ||
>   				    !list_empty(&worker->prio_pending))

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

* [PATCH v2] btrfs: set task state with schedule_timeout_uninterruptible()
  2010-07-27  3:41 ` Miao Xie
@ 2010-07-27 17:46   ` Vasiliy Kulikov
  0 siblings, 0 replies; 3+ messages in thread
From: Vasiliy Kulikov @ 2010-07-27 17:46 UTC (permalink / raw)
  To: Miao Xie; +Cc: kernel-janitors, Chris Mason, Tejun Heo, linux-btrfs,
	linux-kernel

schedule_timeout() is used without setting state to
STATE_(UN)INTERRUPTIBLE. As it is called without checking of pending
signals, use schedule_timeout_uninterruptible() instead.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 fs/btrfs/async-thread.c |    2 +-
 fs/btrfs/extent-tree.c  |    6 +++---
 fs/btrfs/ordered-data.c |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index 7ec1409..54eb070 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -362,7 +362,7 @@ again:
 				 * worker->working is still 1, so nobody
 				 * is going to try and wake us up
 				 */
-				schedule_timeout(1);
+				schedule_timeout_uninterruptible(1);
 				smp_mb();
 				if (!list_empty(&worker->pending) ||
 				    !list_empty(&worker->prio_pending))
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 32d0940..5b55a20 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -365,7 +365,7 @@ again:
 			up_read(&fs_info->extent_commit_sem);
 			mutex_unlock(&caching_ctl->mutex);
 			if (btrfs_transaction_in_commit(fs_info))
-				schedule_timeout(1);
+				schedule_timeout_uninterruptible(1);
 			else
 				cond_resched();
 			goto again;
@@ -2237,7 +2237,7 @@ again:
 			node = rb_next(node);
 		}
 		spin_unlock(&delayed_refs->lock);
-		schedule_timeout(1);
+		schedule_timeout_uninterruptible(1);
 		goto again;
 	}
 out:
@@ -3686,7 +3686,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
 	int ret;
 
 	if (btrfs_transaction_in_commit(root->fs_info))
-		schedule_timeout(1);
+		schedule_timeout_uninterruptible(1);
 
 	num_bytes = ALIGN(num_bytes, root->sectorsize);
 again:
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index e56c72b..9ff49e5 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -576,7 +576,7 @@ again:
 	}
 	if (found || test_range_bit(&BTRFS_I(inode)->io_tree, start, orig_end,
 			   EXTENT_DELALLOC, 0, NULL)) {
-		schedule_timeout(1);
+		schedule_timeout_uninterruptible(1);
 		goto again;
 	}
 	return 0;
-- 
1.7.0.4

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

end of thread, other threads:[~2010-07-27 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26  8:27 [PATCH] btrfs: set task state with schedule_timeout_uninterruptible() Kulikov Vasiliy
2010-07-27  3:41 ` Miao Xie
2010-07-27 17:46   ` [PATCH v2] " Vasiliy Kulikov

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