diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index b4845b14740d..ec012f030240 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -586,7 +586,7 @@ static void dec_pending(struct dm_io *io, int error) | |||
586 | */ | 586 | */ |
587 | spin_lock_irqsave(&md->deferred_lock, flags); | 587 | spin_lock_irqsave(&md->deferred_lock, flags); |
588 | if (__noflush_suspending(md)) { | 588 | if (__noflush_suspending(md)) { |
589 | if (!bio_barrier(io->bio)) | 589 | if (!bio_rw_flagged(io->bio, BIO_RW_BARRIER)) |
590 | bio_list_add_head(&md->deferred, | 590 | bio_list_add_head(&md->deferred, |
591 | io->bio); | 591 | io->bio); |
592 | } else | 592 | } else |
@@ -598,7 +598,7 @@ static void dec_pending(struct dm_io *io, int error) | |||
598 | io_error = io->error; | 598 | io_error = io->error; |
599 | bio = io->bio; | 599 | bio = io->bio; |
600 | 600 | ||
601 | if (bio_barrier(bio)) { | 601 | if (bio_rw_flagged(bio, BIO_RW_BARRIER)) { |
602 | /* | 602 | /* |
603 | * There can be just one barrier request so we use | 603 | * There can be just one barrier request so we use |
604 | * a per-device variable for error reporting. | 604 | * a per-device variable for error reporting. |
@@ -1209,7 +1209,7 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio) | |||
1209 | 1209 | ||
1210 | ci.map = dm_get_table(md); | 1210 | ci.map = dm_get_table(md); |
1211 | if (unlikely(!ci.map)) { | 1211 | if (unlikely(!ci.map)) { |
1212 | if (!bio_barrier(bio)) | 1212 | if (!bio_rw_flagged(bio, BIO_RW_BARRIER)) |
1213 | bio_io_error(bio); | 1213 | bio_io_error(bio); |
1214 | else | 1214 | else |
1215 | if (!md->barrier_error) | 1215 | if (!md->barrier_error) |
@@ -1321,7 +1321,7 @@ static int _dm_request(struct request_queue *q, struct bio *bio) | |||
1321 | * we have to queue this io for later. | 1321 | * we have to queue this io for later. |
1322 | */ | 1322 | */ |
1323 | if (unlikely(test_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags)) || | 1323 | if (unlikely(test_bit(DMF_QUEUE_IO_TO_THREAD, &md->flags)) || |
1324 | unlikely(bio_barrier(bio))) { | 1324 | unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { |
1325 | up_read(&md->io_lock); | 1325 | up_read(&md->io_lock); |
1326 | 1326 | ||
1327 | if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) && | 1327 | if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) && |
@@ -1344,7 +1344,7 @@ static int dm_make_request(struct request_queue *q, struct bio *bio) | |||
1344 | { | 1344 | { |
1345 | struct mapped_device *md = q->queuedata; | 1345 | struct mapped_device *md = q->queuedata; |
1346 | 1346 | ||
1347 | if (unlikely(bio_barrier(bio))) { | 1347 | if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER))) { |
1348 | bio_endio(bio, -EOPNOTSUPP); | 1348 | bio_endio(bio, -EOPNOTSUPP); |
1349 | return 0; | 1349 | return 0; |
1350 | } | 1350 | } |
@@ -2164,7 +2164,7 @@ static void dm_wq_work(struct work_struct *work) | |||
2164 | if (dm_request_based(md)) | 2164 | if (dm_request_based(md)) |
2165 | generic_make_request(c); | 2165 | generic_make_request(c); |
2166 | else { | 2166 | else { |
2167 | if (bio_barrier(c)) | 2167 | if (bio_rw_flagged(c, BIO_RW_BARRIER)) |
2168 | process_barrier(md, c); | 2168 | process_barrier(md, c); |
2169 | else | 2169 | else |
2170 | __split_and_process_bio(md, c); | 2170 | __split_and_process_bio(md, c); |