aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-io.c')
-rw-r--r--drivers/md/dm-io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index a89f41f00757..3a2e6a2f8bdd 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -364,6 +364,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,
364 return -EIO; 364 return -EIO;
365 } 365 }
366 366
367retry:
367 io.error_bits = 0; 368 io.error_bits = 0;
368 io.eopnotsupp_bits = 0; 369 io.eopnotsupp_bits = 0;
369 atomic_set(&io.count, 1); /* see dispatch_io() */ 370 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,
382 } 383 }
383 set_current_state(TASK_RUNNING); 384 set_current_state(TASK_RUNNING);
384 385
386 if (io.eopnotsupp_bits && (rw & (1 << BIO_RW_BARRIER))) {
387 rw &= ~(1 << BIO_RW_BARRIER);
388 goto retry;
389 }
390
385 if (error_bits) 391 if (error_bits)
386 *error_bits = io.error_bits; 392 *error_bits = io.error_bits;
387 393