From patchwork Tue Jul 27 17:46:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kulikov Vasiliy X-Patchwork-Id: 114576 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6RHlQxI024564 for ; Tue, 27 Jul 2010 17:47:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803Ab0G0RrE (ORCPT ); Tue, 27 Jul 2010 13:47:04 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:50980 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489Ab0G0RrB (ORCPT ); Tue, 27 Jul 2010 13:47:01 -0400 Received: by ewy23 with SMTP id 23so1400506ewy.19 for ; Tue, 27 Jul 2010 10:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=MNe1LSMVEoYTB9HfVRpC35qA6Oigx2x8aWajCcMUygI=; b=ef4hvVdz7PtwMQ8dMh1pUMi1BS8FZp7W7DUK8SsVo+r9NYq7CbygV1bk3YOri6AQeW tulwqxL6swMF5zBsD8rAkafGpoVi6cHr4X+ANZGG4eQn1NOGJJ6c4voWWuH7yixtz+Xn vAuDEczDUG3igTf8iFx5W5zHuYSL/DNmV7Zcw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=aNj/XDuAb1TFSD7jGUZYZVCfN3xBbMTNtH0Ev41h24ZVo5fgyobh0fm8/uDXcJUivC wWhfrCHTC6cdgAVE2IwD9CDkGrAqHwRhAlmrcsOXMBmpYBv4w79jxkRZ+f/fYlKOoW4r Vcb6qiAUA5+NiEt0tot+K0V0LsonD1oqhcURY= Received: by 10.14.127.80 with SMTP id c56mr1297213eei.23.1280252819767; Tue, 27 Jul 2010 10:46:59 -0700 (PDT) Received: from localhost (ppp85-140-162-106.pppoe.mtu-net.ru [85.140.162.106]) by mx.google.com with ESMTPS id x54sm7934194eeh.11.2010.07.27.10.46.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Jul 2010 10:46:58 -0700 (PDT) Date: Tue, 27 Jul 2010 21:46:53 +0400 From: Vasiliy Kulikov To: Miao Xie Cc: kernel-janitors@vger.kernel.org, Chris Mason , Tejun Heo , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] btrfs: set task state with schedule_timeout_uninterruptible() Message-ID: <20100727174653.GA21048@albatros> References: <1280132864-8266-1-git-send-email-segooon@gmail.com> <4C4E5560.9060905@cn.fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4C4E5560.9060905@cn.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 27 Jul 2010 17:47:26 +0000 (UTC) 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;