diff options
| author | Mike Christie <mchristi@redhat.com> | 2016-06-05 15:32:25 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2016-06-07 15:41:38 -0400 |
| commit | 28a8f0d317bf225ff15008f5dd66ae16242dd843 (patch) | |
| tree | 4ed24aee241907a3612a61f8cc634acd10989c21 /drivers/block/drbd | |
| parent | a418090aa88b9b531ac1f504d6bb8c0e9b04ccb7 (diff) | |
block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH
To avoid confusion between REQ_OP_FLUSH, which is handled by
request_fn drivers, and upper layers requesting the block layer
perform a flush sequence along with possibly a WRITE, this patch
renames REQ_FLUSH to REQ_PREFLUSH.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd')
| -rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 4 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_main.c | 2 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_protocol.h | 2 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 2 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_req.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index f236a31cc095..d524973f94b3 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
| @@ -148,7 +148,7 @@ static int _drbd_md_sync_page_io(struct drbd_device *device, | |||
| 148 | device->md_io.error = -ENODEV; | 148 | device->md_io.error = -ENODEV; |
| 149 | 149 | ||
| 150 | if ((op == REQ_OP_WRITE) && !test_bit(MD_NO_FUA, &device->flags)) | 150 | if ((op == REQ_OP_WRITE) && !test_bit(MD_NO_FUA, &device->flags)) |
| 151 | op_flags |= REQ_FUA | REQ_FLUSH; | 151 | op_flags |= REQ_FUA | REQ_PREFLUSH; |
| 152 | op_flags |= REQ_SYNC | REQ_NOIDLE; | 152 | op_flags |= REQ_SYNC | REQ_NOIDLE; |
| 153 | 153 | ||
| 154 | bio = bio_alloc_drbd(GFP_NOIO); | 154 | bio = bio_alloc_drbd(GFP_NOIO); |
| @@ -847,7 +847,7 @@ int __drbd_change_sync(struct drbd_device *device, sector_t sector, int size, | |||
| 847 | unsigned long count = 0; | 847 | unsigned long count = 0; |
| 848 | sector_t esector, nr_sectors; | 848 | sector_t esector, nr_sectors; |
| 849 | 849 | ||
| 850 | /* This would be an empty REQ_FLUSH, be silent. */ | 850 | /* This would be an empty REQ_PREFLUSH, be silent. */ |
| 851 | if ((mode == SET_OUT_OF_SYNC) && size == 0) | 851 | if ((mode == SET_OUT_OF_SYNC) && size == 0) |
| 852 | return 0; | 852 | return 0; |
| 853 | 853 | ||
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index d55febcaa414..2b37744db0fa 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
| @@ -1609,7 +1609,7 @@ static u32 bio_flags_to_wire(struct drbd_connection *connection, | |||
| 1609 | if (connection->agreed_pro_version >= 95) | 1609 | if (connection->agreed_pro_version >= 95) |
| 1610 | return (bio->bi_rw & REQ_SYNC ? DP_RW_SYNC : 0) | | 1610 | return (bio->bi_rw & REQ_SYNC ? DP_RW_SYNC : 0) | |
| 1611 | (bio->bi_rw & REQ_FUA ? DP_FUA : 0) | | 1611 | (bio->bi_rw & REQ_FUA ? DP_FUA : 0) | |
| 1612 | (bio->bi_rw & REQ_FLUSH ? DP_FLUSH : 0) | | 1612 | (bio->bi_rw & REQ_PREFLUSH ? DP_FLUSH : 0) | |
| 1613 | (bio_op(bio) == REQ_OP_DISCARD ? DP_DISCARD : 0); | 1613 | (bio_op(bio) == REQ_OP_DISCARD ? DP_DISCARD : 0); |
| 1614 | else | 1614 | else |
| 1615 | return bio->bi_rw & REQ_SYNC ? DP_RW_SYNC : 0; | 1615 | return bio->bi_rw & REQ_SYNC ? DP_RW_SYNC : 0; |
diff --git a/drivers/block/drbd/drbd_protocol.h b/drivers/block/drbd/drbd_protocol.h index ef9245363dcc..129f8c76c9b1 100644 --- a/drivers/block/drbd/drbd_protocol.h +++ b/drivers/block/drbd/drbd_protocol.h | |||
| @@ -112,7 +112,7 @@ struct p_header100 { | |||
| 112 | #define DP_MAY_SET_IN_SYNC 4 | 112 | #define DP_MAY_SET_IN_SYNC 4 |
| 113 | #define DP_UNPLUG 8 /* not used anymore */ | 113 | #define DP_UNPLUG 8 /* not used anymore */ |
| 114 | #define DP_FUA 16 /* equals REQ_FUA */ | 114 | #define DP_FUA 16 /* equals REQ_FUA */ |
| 115 | #define DP_FLUSH 32 /* equals REQ_FLUSH */ | 115 | #define DP_FLUSH 32 /* equals REQ_PREFLUSH */ |
| 116 | #define DP_DISCARD 64 /* equals REQ_DISCARD */ | 116 | #define DP_DISCARD 64 /* equals REQ_DISCARD */ |
| 117 | #define DP_SEND_RECEIVE_ACK 128 /* This is a proto B write request */ | 117 | #define DP_SEND_RECEIVE_ACK 128 /* This is a proto B write request */ |
| 118 | #define DP_SEND_WRITE_ACK 256 /* This is a proto C write request */ | 118 | #define DP_SEND_WRITE_ACK 256 /* This is a proto C write request */ |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 6c5997894475..1ee002352ea2 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
| @@ -2158,7 +2158,7 @@ static unsigned long wire_flags_to_bio_flags(u32 dpf) | |||
| 2158 | { | 2158 | { |
| 2159 | return (dpf & DP_RW_SYNC ? REQ_SYNC : 0) | | 2159 | return (dpf & DP_RW_SYNC ? REQ_SYNC : 0) | |
| 2160 | (dpf & DP_FUA ? REQ_FUA : 0) | | 2160 | (dpf & DP_FUA ? REQ_FUA : 0) | |
| 2161 | (dpf & DP_FLUSH ? REQ_FLUSH : 0); | 2161 | (dpf & DP_FLUSH ? REQ_PREFLUSH : 0); |
| 2162 | } | 2162 | } |
| 2163 | 2163 | ||
| 2164 | static unsigned long wire_flags_to_bio_op(u32 dpf) | 2164 | static unsigned long wire_flags_to_bio_op(u32 dpf) |
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 2255dcfebd2b..eef6e9575b4e 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
| @@ -1132,7 +1132,7 @@ static int drbd_process_write_request(struct drbd_request *req) | |||
| 1132 | * replicating, in which case there is no point. */ | 1132 | * replicating, in which case there is no point. */ |
| 1133 | if (unlikely(req->i.size == 0)) { | 1133 | if (unlikely(req->i.size == 0)) { |
| 1134 | /* The only size==0 bios we expect are empty flushes. */ | 1134 | /* The only size==0 bios we expect are empty flushes. */ |
| 1135 | D_ASSERT(device, req->master_bio->bi_rw & REQ_FLUSH); | 1135 | D_ASSERT(device, req->master_bio->bi_rw & REQ_PREFLUSH); |
| 1136 | if (remote) | 1136 | if (remote) |
| 1137 | _req_mod(req, QUEUE_AS_DRBD_BARRIER); | 1137 | _req_mod(req, QUEUE_AS_DRBD_BARRIER); |
| 1138 | return remote; | 1138 | return remote; |
