diff options
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 3 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 9 |
4 files changed, 4 insertions, 12 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 2096628d6e65..aca302492ff2 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -80,7 +80,7 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev, | |||
80 | 80 | ||
81 | if ((rw & WRITE) && !test_bit(MD_NO_FUA, &mdev->flags)) | 81 | if ((rw & WRITE) && !test_bit(MD_NO_FUA, &mdev->flags)) |
82 | rw |= REQ_FUA; | 82 | rw |= REQ_FUA; |
83 | rw |= REQ_UNPLUG | REQ_SYNC; | 83 | rw |= REQ_SYNC; |
84 | 84 | ||
85 | bio = bio_alloc(GFP_NOIO, 1); | 85 | bio = bio_alloc(GFP_NOIO, 1); |
86 | bio->bi_bdev = bdev->md_bdev; | 86 | bio->bi_bdev = bdev->md_bdev; |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 0b5718e19586..b0bd27dfc1e8 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -377,7 +377,7 @@ union p_header { | |||
377 | #define DP_HARDBARRIER 1 /* depricated */ | 377 | #define DP_HARDBARRIER 1 /* depricated */ |
378 | #define DP_RW_SYNC 2 /* equals REQ_SYNC */ | 378 | #define DP_RW_SYNC 2 /* equals REQ_SYNC */ |
379 | #define DP_MAY_SET_IN_SYNC 4 | 379 | #define DP_MAY_SET_IN_SYNC 4 |
380 | #define DP_UNPLUG 8 /* equals REQ_UNPLUG */ | 380 | #define DP_UNPLUG 8 /* not used anymore */ |
381 | #define DP_FUA 16 /* equals REQ_FUA */ | 381 | #define DP_FUA 16 /* equals REQ_FUA */ |
382 | #define DP_FLUSH 32 /* equals REQ_FLUSH */ | 382 | #define DP_FLUSH 32 /* equals REQ_FLUSH */ |
383 | #define DP_DISCARD 64 /* equals REQ_DISCARD */ | 383 | #define DP_DISCARD 64 /* equals REQ_DISCARD */ |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 6049cb85310d..8a43ce0edeed 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2477,12 +2477,11 @@ static u32 bio_flags_to_wire(struct drbd_conf *mdev, unsigned long bi_rw) | |||
2477 | { | 2477 | { |
2478 | if (mdev->agreed_pro_version >= 95) | 2478 | if (mdev->agreed_pro_version >= 95) |
2479 | return (bi_rw & REQ_SYNC ? DP_RW_SYNC : 0) | | 2479 | return (bi_rw & REQ_SYNC ? DP_RW_SYNC : 0) | |
2480 | (bi_rw & REQ_UNPLUG ? DP_UNPLUG : 0) | | ||
2481 | (bi_rw & REQ_FUA ? DP_FUA : 0) | | 2480 | (bi_rw & REQ_FUA ? DP_FUA : 0) | |
2482 | (bi_rw & REQ_FLUSH ? DP_FLUSH : 0) | | 2481 | (bi_rw & REQ_FLUSH ? DP_FLUSH : 0) | |
2483 | (bi_rw & REQ_DISCARD ? DP_DISCARD : 0); | 2482 | (bi_rw & REQ_DISCARD ? DP_DISCARD : 0); |
2484 | else | 2483 | else |
2485 | return bi_rw & (REQ_SYNC | REQ_UNPLUG) ? DP_RW_SYNC : 0; | 2484 | return bi_rw & REQ_SYNC ? DP_RW_SYNC : 0; |
2486 | } | 2485 | } |
2487 | 2486 | ||
2488 | /* Used to send write requests | 2487 | /* Used to send write requests |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 84132f8bf8a4..8e68be939deb 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1100,8 +1100,6 @@ next_bio: | |||
1100 | /* > e->sector, unless this is the first bio */ | 1100 | /* > e->sector, unless this is the first bio */ |
1101 | bio->bi_sector = sector; | 1101 | bio->bi_sector = sector; |
1102 | bio->bi_bdev = mdev->ldev->backing_bdev; | 1102 | bio->bi_bdev = mdev->ldev->backing_bdev; |
1103 | /* we special case some flags in the multi-bio case, see below | ||
1104 | * (REQ_UNPLUG) */ | ||
1105 | bio->bi_rw = rw; | 1103 | bio->bi_rw = rw; |
1106 | bio->bi_private = e; | 1104 | bio->bi_private = e; |
1107 | bio->bi_end_io = drbd_endio_sec; | 1105 | bio->bi_end_io = drbd_endio_sec; |
@@ -1130,10 +1128,6 @@ next_bio: | |||
1130 | bios = bios->bi_next; | 1128 | bios = bios->bi_next; |
1131 | bio->bi_next = NULL; | 1129 | bio->bi_next = NULL; |
1132 | 1130 | ||
1133 | /* strip off REQ_UNPLUG unless it is the last bio */ | ||
1134 | if (bios) | ||
1135 | bio->bi_rw &= ~REQ_UNPLUG; | ||
1136 | |||
1137 | drbd_generic_make_request(mdev, fault_type, bio); | 1131 | drbd_generic_make_request(mdev, fault_type, bio); |
1138 | } while (bios); | 1132 | } while (bios); |
1139 | return 0; | 1133 | return 0; |
@@ -1621,12 +1615,11 @@ static unsigned long write_flags_to_bio(struct drbd_conf *mdev, u32 dpf) | |||
1621 | { | 1615 | { |
1622 | if (mdev->agreed_pro_version >= 95) | 1616 | if (mdev->agreed_pro_version >= 95) |
1623 | return (dpf & DP_RW_SYNC ? REQ_SYNC : 0) | | 1617 | return (dpf & DP_RW_SYNC ? REQ_SYNC : 0) | |
1624 | (dpf & DP_UNPLUG ? REQ_UNPLUG : 0) | | ||
1625 | (dpf & DP_FUA ? REQ_FUA : 0) | | 1618 | (dpf & DP_FUA ? REQ_FUA : 0) | |
1626 | (dpf & DP_FLUSH ? REQ_FUA : 0) | | 1619 | (dpf & DP_FLUSH ? REQ_FUA : 0) | |
1627 | (dpf & DP_DISCARD ? REQ_DISCARD : 0); | 1620 | (dpf & DP_DISCARD ? REQ_DISCARD : 0); |
1628 | else | 1621 | else |
1629 | return dpf & DP_RW_SYNC ? (REQ_SYNC | REQ_UNPLUG) : 0; | 1622 | return dpf & DP_RW_SYNC ? REQ_SYNC : 0; |
1630 | } | 1623 | } |
1631 | 1624 | ||
1632 | /* mirrored write */ | 1625 | /* mirrored write */ |