aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoeblk.c2
-rw-r--r--drivers/block/brd.c2
-rw-r--r--drivers/block/drbd/drbd_actlog.c8
-rw-r--r--drivers/block/drbd/drbd_main.c6
-rw-r--r--drivers/block/drbd/drbd_receiver.c22
-rw-r--r--drivers/block/drbd/drbd_req.c2
-rw-r--r--drivers/block/loop.c2
-rw-r--r--drivers/block/pktcdvd.c2
-rw-r--r--drivers/block/umem.c2
9 files changed, 24 insertions, 24 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 035cefe4045..65deffde60a 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -173,7 +173,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
173 BUG(); 173 BUG();
174 bio_endio(bio, -ENXIO); 174 bio_endio(bio, -ENXIO);
175 return 0; 175 return 0;
176 } else if (bio_rw_flagged(bio, BIO_RW_BARRIER)) { 176 } else if (bio->bi_rw & REQ_HARDBARRIER) {
177 bio_endio(bio, -EOPNOTSUPP); 177 bio_endio(bio, -EOPNOTSUPP);
178 return 0; 178 return 0;
179 } else if (bio->bi_io_vec == NULL) { 179 } else if (bio->bi_io_vec == NULL) {
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index f1bf79d9bc0..1b218c6b682 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -340,7 +340,7 @@ static int brd_make_request(struct request_queue *q, struct bio *bio)
340 get_capacity(bdev->bd_disk)) 340 get_capacity(bdev->bd_disk))
341 goto out; 341 goto out;
342 342
343 if (unlikely(bio_rw_flagged(bio, BIO_RW_DISCARD))) { 343 if (unlikely(bio->bi_rw & REQ_DISCARD)) {
344 err = 0; 344 err = 0;
345 discard_from_brd(brd, sector, bio->bi_size); 345 discard_from_brd(brd, sector, bio->bi_size);
346 goto out; 346 goto out;
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index df018990c42..9400845d602 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -79,8 +79,8 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev,
79 md_io.error = 0; 79 md_io.error = 0;
80 80
81 if ((rw & WRITE) && !test_bit(MD_NO_BARRIER, &mdev->flags)) 81 if ((rw & WRITE) && !test_bit(MD_NO_BARRIER, &mdev->flags))
82 rw |= (1 << BIO_RW_BARRIER); 82 rw |= REQ_HARDBARRIER;
83 rw |= ((1<<BIO_RW_UNPLUG) | (1<<BIO_RW_SYNCIO)); 83 rw |= REQ_UNPLUG | REQ_SYNC;
84 84
85 retry: 85 retry:
86 bio = bio_alloc(GFP_NOIO, 1); 86 bio = bio_alloc(GFP_NOIO, 1);
@@ -103,11 +103,11 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev,
103 /* check for unsupported barrier op. 103 /* check for unsupported barrier op.
104 * would rather check on EOPNOTSUPP, but that is not reliable. 104 * would rather check on EOPNOTSUPP, but that is not reliable.
105 * don't try again for ANY return value != 0 */ 105 * don't try again for ANY return value != 0 */
106 if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER) && !ok)) { 106 if (unlikely((bio->bi_rw & REQ_HARDBARRIER) && !ok)) {
107 /* Try again with no barrier */ 107 /* Try again with no barrier */
108 dev_warn(DEV, "Barriers not supported on meta data device - disabling\n"); 108 dev_warn(DEV, "Barriers not supported on meta data device - disabling\n");
109 set_bit(MD_NO_BARRIER, &mdev->flags); 109 set_bit(MD_NO_BARRIER, &mdev->flags);
110 rw &= ~(1 << BIO_RW_BARRIER); 110 rw &= ~REQ_HARDBARRIER;
111 bio_put(bio); 111 bio_put(bio);
112 goto retry; 112 goto retry;
113 } 113 }
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 7258c95e895..e2ab13d99d6 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2425,15 +2425,15 @@ int drbd_send_dblock(struct drbd_conf *mdev, struct drbd_request *req)
2425 /* NOTE: no need to check if barriers supported here as we would 2425 /* NOTE: no need to check if barriers supported here as we would
2426 * not pass the test in make_request_common in that case 2426 * not pass the test in make_request_common in that case
2427 */ 2427 */
2428 if (bio_rw_flagged(req->master_bio, BIO_RW_BARRIER)) { 2428 if (req->master_bio->bi_rw & REQ_HARDBARRIER) {
2429 dev_err(DEV, "ASSERT FAILED would have set DP_HARDBARRIER\n"); 2429 dev_err(DEV, "ASSERT FAILED would have set DP_HARDBARRIER\n");
2430 /* dp_flags |= DP_HARDBARRIER; */ 2430 /* dp_flags |= DP_HARDBARRIER; */
2431 } 2431 }
2432 if (bio_rw_flagged(req->master_bio, BIO_RW_SYNCIO)) 2432 if (req->master_bio->bi_rw & REQ_SYNC)
2433 dp_flags |= DP_RW_SYNC; 2433 dp_flags |= DP_RW_SYNC;
2434 /* for now handle SYNCIO and UNPLUG 2434 /* for now handle SYNCIO and UNPLUG
2435 * as if they still were one and the same flag */ 2435 * as if they still were one and the same flag */
2436 if (bio_rw_flagged(req->master_bio, BIO_RW_UNPLUG)) 2436 if (req->master_bio->bi_rw & REQ_UNPLUG)
2437 dp_flags |= DP_RW_SYNC; 2437 dp_flags |= DP_RW_SYNC;
2438 if (mdev->state.conn >= C_SYNC_SOURCE && 2438 if (mdev->state.conn >= C_SYNC_SOURCE &&
2439 mdev->state.conn <= C_PAUSED_SYNC_T) 2439 mdev->state.conn <= C_PAUSED_SYNC_T)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index dff48701b84..cba1deb7b27 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1180,7 +1180,7 @@ next_bio:
1180 bio->bi_sector = sector; 1180 bio->bi_sector = sector;
1181 bio->bi_bdev = mdev->ldev->backing_bdev; 1181 bio->bi_bdev = mdev->ldev->backing_bdev;
1182 /* we special case some flags in the multi-bio case, see below 1182 /* we special case some flags in the multi-bio case, see below
1183 * (BIO_RW_UNPLUG, BIO_RW_BARRIER) */ 1183 * (REQ_UNPLUG, REQ_HARDBARRIER) */
1184 bio->bi_rw = rw; 1184 bio->bi_rw = rw;
1185 bio->bi_private = e; 1185 bio->bi_private = e;
1186 bio->bi_end_io = drbd_endio_sec; 1186 bio->bi_end_io = drbd_endio_sec;
@@ -1209,16 +1209,16 @@ next_bio:
1209 bios = bios->bi_next; 1209 bios = bios->bi_next;
1210 bio->bi_next = NULL; 1210 bio->bi_next = NULL;
1211 1211
1212 /* strip off BIO_RW_UNPLUG unless it is the last bio */ 1212 /* strip off REQ_UNPLUG unless it is the last bio */
1213 if (bios) 1213 if (bios)
1214 bio->bi_rw &= ~(1<<BIO_RW_UNPLUG); 1214 bio->bi_rw &= ~REQ_UNPLUG;
1215 1215
1216 drbd_generic_make_request(mdev, fault_type, bio); 1216 drbd_generic_make_request(mdev, fault_type, bio);
1217 1217
1218 /* strip off BIO_RW_BARRIER, 1218 /* strip off REQ_HARDBARRIER,
1219 * unless it is the first or last bio */ 1219 * unless it is the first or last bio */
1220 if (bios && bios->bi_next) 1220 if (bios && bios->bi_next)
1221 bios->bi_rw &= ~(1<<BIO_RW_BARRIER); 1221 bios->bi_rw &= ~REQ_HARDBARRIER;
1222 } while (bios); 1222 } while (bios);
1223 maybe_kick_lo(mdev); 1223 maybe_kick_lo(mdev);
1224 return 0; 1224 return 0;
@@ -1233,7 +1233,7 @@ fail:
1233} 1233}
1234 1234
1235/** 1235/**
1236 * w_e_reissue() - Worker callback; Resubmit a bio, without BIO_RW_BARRIER set 1236 * w_e_reissue() - Worker callback; Resubmit a bio, without REQ_HARDBARRIER set
1237 * @mdev: DRBD device. 1237 * @mdev: DRBD device.
1238 * @w: work object. 1238 * @w: work object.
1239 * @cancel: The connection will be closed anyways (unused in this callback) 1239 * @cancel: The connection will be closed anyways (unused in this callback)
@@ -1245,7 +1245,7 @@ int w_e_reissue(struct drbd_conf *mdev, struct drbd_work *w, int cancel) __relea
1245 (and DE_BARRIER_IN_NEXT_EPOCH_ISSUED in the previous Epoch) 1245 (and DE_BARRIER_IN_NEXT_EPOCH_ISSUED in the previous Epoch)
1246 so that we can finish that epoch in drbd_may_finish_epoch(). 1246 so that we can finish that epoch in drbd_may_finish_epoch().
1247 That is necessary if we already have a long chain of Epochs, before 1247 That is necessary if we already have a long chain of Epochs, before
1248 we realize that BIO_RW_BARRIER is actually not supported */ 1248 we realize that REQ_HARDBARRIER is actually not supported */
1249 1249
1250 /* As long as the -ENOTSUPP on the barrier is reported immediately 1250 /* As long as the -ENOTSUPP on the barrier is reported immediately
1251 that will never trigger. If it is reported late, we will just 1251 that will never trigger. If it is reported late, we will just
@@ -1824,14 +1824,14 @@ static int receive_Data(struct drbd_conf *mdev, struct p_header *h)
1824 epoch = list_entry(e->epoch->list.prev, struct drbd_epoch, list); 1824 epoch = list_entry(e->epoch->list.prev, struct drbd_epoch, list);
1825 if (epoch == e->epoch) { 1825 if (epoch == e->epoch) {
1826 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags); 1826 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags);
1827 rw |= (1<<BIO_RW_BARRIER); 1827 rw |= REQ_HARDBARRIER;
1828 e->flags |= EE_IS_BARRIER; 1828 e->flags |= EE_IS_BARRIER;
1829 } else { 1829 } else {
1830 if (atomic_read(&epoch->epoch_size) > 1 || 1830 if (atomic_read(&epoch->epoch_size) > 1 ||
1831 !test_bit(DE_CONTAINS_A_BARRIER, &epoch->flags)) { 1831 !test_bit(DE_CONTAINS_A_BARRIER, &epoch->flags)) {
1832 set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags); 1832 set_bit(DE_BARRIER_IN_NEXT_EPOCH_ISSUED, &epoch->flags);
1833 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags); 1833 set_bit(DE_CONTAINS_A_BARRIER, &e->epoch->flags);
1834 rw |= (1<<BIO_RW_BARRIER); 1834 rw |= REQ_HARDBARRIER;
1835 e->flags |= EE_IS_BARRIER; 1835 e->flags |= EE_IS_BARRIER;
1836 } 1836 }
1837 } 1837 }
@@ -1841,10 +1841,10 @@ static int receive_Data(struct drbd_conf *mdev, struct p_header *h)
1841 dp_flags = be32_to_cpu(p->dp_flags); 1841 dp_flags = be32_to_cpu(p->dp_flags);
1842 if (dp_flags & DP_HARDBARRIER) { 1842 if (dp_flags & DP_HARDBARRIER) {
1843 dev_err(DEV, "ASSERT FAILED would have submitted barrier request\n"); 1843 dev_err(DEV, "ASSERT FAILED would have submitted barrier request\n");
1844 /* rw |= (1<<BIO_RW_BARRIER); */ 1844 /* rw |= REQ_HARDBARRIER; */
1845 } 1845 }
1846 if (dp_flags & DP_RW_SYNC) 1846 if (dp_flags & DP_RW_SYNC)
1847 rw |= (1<<BIO_RW_SYNCIO) | (1<<BIO_RW_UNPLUG); 1847 rw |= REQ_SYNC | REQ_UNPLUG;
1848 if (dp_flags & DP_MAY_SET_IN_SYNC) 1848 if (dp_flags & DP_MAY_SET_IN_SYNC)
1849 e->flags |= EE_MAY_SET_IN_SYNC; 1849 e->flags |= EE_MAY_SET_IN_SYNC;
1850 1850
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 654f1ef5cbb..f761d98a4e9 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -997,7 +997,7 @@ int drbd_make_request_26(struct request_queue *q, struct bio *bio)
997 * because of those XXX, this is not yet enabled, 997 * because of those XXX, this is not yet enabled,
998 * i.e. in drbd_init_set_defaults we set the NO_BARRIER_SUPP bit. 998 * i.e. in drbd_init_set_defaults we set the NO_BARRIER_SUPP bit.
999 */ 999 */
1000 if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER) && test_bit(NO_BARRIER_SUPP, &mdev->flags))) { 1000 if (unlikely(bio->bi_rw & REQ_HARDBARRIER) && test_bit(NO_BARRIER_SUPP, &mdev->flags)) {
1001 /* dev_warn(DEV, "Rejecting barrier request as underlying device does not support\n"); */ 1001 /* dev_warn(DEV, "Rejecting barrier request as underlying device does not support\n"); */
1002 bio_endio(bio, -EOPNOTSUPP); 1002 bio_endio(bio, -EOPNOTSUPP);
1003 return 0; 1003 return 0;
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 6120922f459..fedfdb7d3cd 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -476,7 +476,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio)
476 pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset; 476 pos = ((loff_t) bio->bi_sector << 9) + lo->lo_offset;
477 477
478 if (bio_rw(bio) == WRITE) { 478 if (bio_rw(bio) == WRITE) {
479 bool barrier = bio_rw_flagged(bio, BIO_RW_BARRIER); 479 bool barrier = (bio->bi_rw & REQ_HARDBARRIER);
480 struct file *file = lo->lo_backing_file; 480 struct file *file = lo->lo_backing_file;
481 481
482 if (barrier) { 482 if (barrier) {
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 8a549db2aa7..9f3e4454274 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1221,7 +1221,7 @@ static int pkt_start_recovery(struct packet_data *pkt)
1221 pkt->bio->bi_flags = 1 << BIO_UPTODATE; 1221 pkt->bio->bi_flags = 1 << BIO_UPTODATE;
1222 pkt->bio->bi_idx = 0; 1222 pkt->bio->bi_idx = 0;
1223 1223
1224 BUG_ON(pkt->bio->bi_rw != (1 << BIO_RW)); 1224 BUG_ON(pkt->bio->bi_rw != REQ_WRITE);
1225 BUG_ON(pkt->bio->bi_vcnt != pkt->frames); 1225 BUG_ON(pkt->bio->bi_vcnt != pkt->frames);
1226 BUG_ON(pkt->bio->bi_size != pkt->frames * CD_FRAMESIZE); 1226 BUG_ON(pkt->bio->bi_size != pkt->frames * CD_FRAMESIZE);
1227 BUG_ON(pkt->bio->bi_end_io != pkt_end_io_packet_write); 1227 BUG_ON(pkt->bio->bi_end_io != pkt_end_io_packet_write);
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index 2f9470ff8f7..8be57151f5d 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -478,7 +478,7 @@ static void process_page(unsigned long data)
478 le32_to_cpu(desc->local_addr)>>9, 478 le32_to_cpu(desc->local_addr)>>9,
479 le32_to_cpu(desc->transfer_size)); 479 le32_to_cpu(desc->transfer_size));
480 dump_dmastat(card, control); 480 dump_dmastat(card, control);
481 } else if (test_bit(BIO_RW, &bio->bi_rw) && 481 } else if ((bio->bi_rw & REQ_WRITE) &&
482 le32_to_cpu(desc->local_addr) >> 9 == 482 le32_to_cpu(desc->local_addr) >> 9 ==
483 card->init_size) { 483 card->init_size) {
484 card->init_size += le32_to_cpu(desc->transfer_size) >> 9; 484 card->init_size += le32_to_cpu(desc->transfer_size) >> 9;