All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: dm-devel@redhat.com
Cc: Alasdair G Kergon <agk@redhat.com>, Milan Broz <mbroz@redhat.com>
Subject: [PATCH] dm_crypt: Issue all previous bios before remapping barrier bio
Date: Mon, 1 Feb 2010 20:49:26 +0530	[thread overview]
Message-ID: <201002012049.27132.knikanth@suse.de> (raw)

Before remapping a barrier bio, make sure that there are no un-issued
pending I/O in the workqueue. Otherwise a dm_flush would simply add
a barrier request to the underlying device, without issuing the bio's
queued in the dm_crypt device.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

--

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;
 	}

             reply	other threads:[~2010-02-01 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 15:19 Nikanth Karthikesan [this message]
2010-02-01 15:39 ` [PATCH] dm_crypt: Issue all previous bios before remapping barrier bio Milan Broz
2010-02-02 12:47   ` Mikulas Patocka
2010-02-03  6:09     ` Nikanth Karthikesan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002012049.27132.knikanth@suse.de \
    --to=knikanth@suse.de \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=mbroz@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.