From patchwork Mon Feb 1 15:19:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikanth Karthikesan X-Patchwork-Id: 76102 X-Patchwork-Delegate: agk@redhat.com 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 o11FRIfd020905 for ; Mon, 1 Feb 2010 15:27:54 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 o11FIjNF019369; Mon, 1 Feb 2010 10:18:46 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o11FIhsa011467 for ; Mon, 1 Feb 2010 10:18:43 -0500 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o11FIcJp019865; Mon, 1 Feb 2010 10:18:38 -0500 Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o11FIMEY028156; Mon, 1 Feb 2010 10:18:23 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6D19F74609; Mon, 1 Feb 2010 16:18:22 +0100 (CET) From: Nikanth Karthikesan Organization: suse.de To: dm-devel@redhat.com Date: Mon, 1 Feb 2010 20:49:26 +0530 User-Agent: KMail/1.12.2 (Linux/2.6.31.8-0.1-desktop; KDE/4.3.1; x86_64; ; ) MIME-Version: 1.0 Message-Id: <201002012049.27132.knikanth@suse.de> X-RedHat-Spam-Score: -6 (AWL,RCVD_IN_DNSWL_HI) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.8 X-loop: dm-devel@redhat.com Cc: Alasdair G Kergon , Milan Broz Subject: [dm-devel] [PATCH] dm_crypt: Issue all previous bios before remapping barrier bio 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]); Mon, 01 Feb 2010 15:27:55 +0000 (UTC) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a936372..be68e70 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1252,6 +1252,7 @@ static int crypt_map(struct dm_target *ti, struct bio *bio, if (unlikely(bio_empty_barrier(bio))) { cc = ti->private; + flush_workqueue(cc->io_queue); bio->bi_bdev = cc->dev->bdev; return DM_MAPIO_REMAPPED; }