From patchwork Fri Apr 10 05:15:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 17542 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3A5Fm13014660 for ; Fri, 10 Apr 2009 05:15:48 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 633B961A3CE; Fri, 10 Apr 2009 01:15:49 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n3A5Flpm013700 for ; Fri, 10 Apr 2009 01:15:47 -0400 Received: from hs20-bc2-1.build.redhat.com (hs20-bc2-1.build.redhat.com [10.10.28.34]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3A5FpEZ021110; Fri, 10 Apr 2009 01:15:51 -0400 Received: from hs20-bc2-1.build.redhat.com (localhost.localdomain [127.0.0.1]) by hs20-bc2-1.build.redhat.com (8.13.1/8.13.1) with ESMTP id n3A5FhMN003067; Fri, 10 Apr 2009 01:15:43 -0400 Received: from localhost (mpatocka@localhost) by hs20-bc2-1.build.redhat.com (8.13.1/8.13.1/Submit) with ESMTP id n3A5Fhw2003059; Fri, 10 Apr 2009 01:15:43 -0400 X-Authentication-Warning: hs20-bc2-1.build.redhat.com: mpatocka owned process doing -bs Date: Fri, 10 Apr 2009 01:15:43 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@hs20-bc2-1.build.redhat.com To: dm-devel@redhat.com In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-loop: dm-devel@redhat.com Cc: Alasdair G Kergon Subject: [dm-devel] [PATCH 11/11] bottom-layer barrier support X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 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 Flush supoprt for dm-delay target. Signed-off-by: Mikulas Patocka --- drivers/md/dm-delay.c | 3 +++ 1 file changed, 3 insertions(+) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux-2.6.30-rc1-devel/drivers/md/dm-delay.c =================================================================== --- linux-2.6.30-rc1-devel.orig/drivers/md/dm-delay.c 2009-04-10 06:28:25.000000000 +0200 +++ linux-2.6.30-rc1-devel/drivers/md/dm-delay.c 2009-04-10 06:33:45.000000000 +0200 @@ -198,6 +198,7 @@ out: mutex_init(&dc->timer_lock); atomic_set(&dc->may_delay, 1); + ti->num_flush_requests = 1; ti->private = dc; return 0; @@ -281,6 +282,8 @@ static int delay_map(struct dm_target *t bio->bi_bdev = dc->dev_write->bdev; bio->bi_sector = dc->start_write + (bio->bi_sector - ti->begin); + if (!bio_sectors(bio)) + bio->bi_sector = 0; return delay_bio(dc, dc->write_delay, bio); }