From 075d33a32a8e9cd92557eda7d79bc7627f2016a2 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 22 Jun 2009 10:12:26 +0100 Subject: [PATCH] --- yaml --- r: 154258 b: refs/heads/master c: 51aa322849581f1a73594e48ea0df63f914ee6a2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/md/dm-io.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ebdb4ca64e05..8417b8b48593 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5af443a7e1c0864100cc44525a9821aa2a2f4719 +refs/heads/master: 51aa322849581f1a73594e48ea0df63f914ee6a2 diff --git a/trunk/drivers/md/dm-io.c b/trunk/drivers/md/dm-io.c index a89f41f00757..3a2e6a2f8bdd 100644 --- a/trunk/drivers/md/dm-io.c +++ b/trunk/drivers/md/dm-io.c @@ -364,6 +364,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, return -EIO; } +retry: io.error_bits = 0; io.eopnotsupp_bits = 0; atomic_set(&io.count, 1); /* see dispatch_io() */ @@ -382,6 +383,11 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, } set_current_state(TASK_RUNNING); + if (io.eopnotsupp_bits && (rw & (1 << BIO_RW_BARRIER))) { + rw &= ~(1 << BIO_RW_BARRIER); + goto retry; + } + if (error_bits) *error_bits = io.error_bits;