From patchwork Thu Jan 28 06:32:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junichi Nomura X-Patchwork-Id: 75561 Received: from mx01.util.phx2.redhat.com (mx1-phx2.redhat.com [209.132.183.26]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o0S6bT4l009451 for ; Thu, 28 Jan 2010 06:38:06 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.util.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0S6ZKip010400; Thu, 28 Jan 2010 01:35:22 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0S6ZKxn031640 for ; Thu, 28 Jan 2010 01:35:20 -0500 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.13]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0S6ZDvL027549 for ; Thu, 28 Jan 2010 01:35:13 -0500 Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.193]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0S6Z1hT026547 for ; Thu, 28 Jan 2010 01:35:01 -0500 Received: from mailgate3.nec.co.jp ([10.7.69.160]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id o0S6YEc6009377; Thu, 28 Jan 2010 15:34:14 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id o0S6YEn18271; Thu, 28 Jan 2010 15:34:14 +0900 (JST) Received: from mail03.kamome.nec.co.jp (mail03.kamome.nec.co.jp [10.25.43.7]) by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id o0S6YESM006131; Thu, 28 Jan 2010 15:34:14 +0900 (JST) Received: from saigo.jp.nec.com ([10.26.220.6] [10.26.220.6]) by mail03.kamome.nec.co.jp with ESMTP id BT-MMP-179954; Thu, 28 Jan 2010 15:32:38 +0900 Received: from ronnie.linux.bs1.fc.nec.co.jp ([10.34.125.103] [10.34.125.103]) by mail.jp.nec.com with ESMTP; Thu, 28 Jan 2010 15:32:38 +0900 Message-ID: <4B612F89.7020503@ce.jp.nec.com> Date: Thu, 28 Jan 2010 15:32:41 +0900 From: "Jun'ichi Nomura" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fran=E7ois_Figarola?= , hch@infradead.org References: <20100122160740.6c16c22d.akpm@linux-foundation.org> <20100128134205.352044bd@notabene> In-Reply-To: <20100128134205.352044bd@notabene> X-RedHat-Spam-Score: 0 () X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.13 X-loop: dm-devel@redhat.com Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, device-mapper development , Al Viro , Andrew Morton Subject: Re: [dm-devel] [BUG] kernel 2.6.32.x hangs during boot process X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 28 Jan 2010 06:38:06 +0000 (UTC) diff --git a/fs/block_dev.c b/fs/block_dev.c index 73d6a73..600261f 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -246,7 +246,9 @@ struct super_block *freeze_bdev(struct block_device *bdev) if (!sb) goto out; if (sb->s_flags & MS_RDONLY) { - deactivate_locked_super(sb); + sb->s_frozen = SB_FREEZE_TRANS; + smp_wmb(); + up_write(&sb->s_umount); mutex_unlock(&bdev->bd_fsfreeze_mutex); return sb; } @@ -307,7 +309,7 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb) BUG_ON(sb->s_bdev != bdev); down_write(&sb->s_umount); if (sb->s_flags & MS_RDONLY) - goto out_deactivate; + goto out_unfrozen; if (sb->s_op->unfreeze_fs) { error = sb->s_op->unfreeze_fs(sb); @@ -321,11 +323,11 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb) } } +out_unfrozen: sb->s_frozen = SB_UNFROZEN; smp_wmb(); wake_up(&sb->s_wait_unfrozen); -out_deactivate: if (sb) deactivate_locked_super(sb); out_unlock: