From patchwork Tue Jun 1 09:56:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 103511 X-Patchwork-Delegate: jbrassow@redhat.com Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o51CQ38Y006447 for ; Tue, 1 Jun 2010 12:26:39 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o51CObC6017023; Tue, 1 Jun 2010 08:24:38 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o51A0xv7002868 for ; Tue, 1 Jun 2010 06:00:59 -0400 Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.7]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o51A0lCt031713; Tue, 1 Jun 2010 06:00:47 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o51A0b9a026891; Tue, 1 Jun 2010 06:00:37 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 1F78E8A908; Tue, 1 Jun 2010 12:00:37 +0200 (CEST) From: NeilBrown To: Heinz Mauelshagen , Alasdair G Kergon Date: Tue, 01 Jun 2010 19:56:20 +1000 Message-ID: <20100601095620.565.81802.stgit@notabene.brown> In-Reply-To: <20100601094414.565.3638.stgit@notabene.brown> References: <20100601094414.565.3638.stgit@notabene.brown> User-Agent: StGit/0.15 MIME-Version: 1.0 X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.7 X-loop: dm-devel@redhat.com Cc: linux-raid@vger.kernel.org, dm-devel@redhat.com Subject: [dm-devel] [PATCH 19/24] md/bitmap: clean up plugging calls. 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: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 12:26:39 +0000 (UTC) diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 8af4d65..3f04699 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1296,7 +1296,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect prepare_to_wait(&bitmap->overflow_wait, &__wait, TASK_UNINTERRUPTIBLE); spin_unlock_irq(&bitmap->lock); - blk_unplug(bitmap->mddev->queue); + md_unplug(bitmap->mddev); schedule(); finish_wait(&bitmap->overflow_wait, &__wait); continue; @@ -1306,7 +1306,6 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect case 0: bitmap_file_set_bit(bitmap, offset); bitmap_count_page(bitmap, offset, 1); - blk_plug_device_unlocked(bitmap->mddev->queue); /* fall through */ case 1: *bmc = 2; diff --git a/drivers/md/md.c b/drivers/md/md.c index 21f3c35..f24efd2 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6600,7 +6600,7 @@ int md_allow_write(mddev_t *mddev) } EXPORT_SYMBOL_GPL(md_allow_write); -static void md_unplug(mddev_t *mddev) +void md_unplug(mddev_t *mddev) { if (mddev->queue) blk_unplug(mddev->queue); diff --git a/drivers/md/md.h b/drivers/md/md.h index 6f2c568..a97e4b0 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -506,6 +506,7 @@ extern int md_integrity_register(mddev_t *mddev); extern void md_integrity_add_rdev(mdk_rdev_t *rdev, mddev_t *mddev); extern int strict_strtoul_scaled(const char *cp, unsigned long *res, int scale); extern void restore_bitmap_write_access(struct file *file); +extern void md_unplug(mddev_t *mddev); extern void mddev_init(mddev_t *mddev); extern int md_run(mddev_t *mddev);