summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-10-03 16:56:25 -0400
committerJens Axboe <axboe@kernel.dk>2018-10-03 18:12:28 -0400
commit9305455acfa65a2749cd2329d027bf944b26e14c (patch)
tree98d0d773f25dea30e81b48294ec8ba5f3c9960b3
parente4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276 (diff)
block: Finish renaming REQ_DISCARD into REQ_OP_DISCARD
Some time ago REQ_DISCARD was renamed into REQ_OP_DISCARD. Some comments and documentation files were not updated however. Update these comments and documentation files. See also commit 4e1b2d52a80d ("block, fs, drivers: remove REQ_OP compat defs and related code"). Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Mike Christie <mchristi@redhat.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--Documentation/blockdev/zram.txt2
-rw-r--r--Documentation/device-mapper/log-writes.txt2
-rw-r--r--drivers/block/drbd/drbd_int.h2
-rw-r--r--drivers/block/drbd/drbd_main.c2
-rw-r--r--drivers/block/drbd/drbd_protocol.h4
-rw-r--r--drivers/block/drbd/drbd_req.c2
-rw-r--r--drivers/block/drbd/drbd_worker.c2
-rw-r--r--drivers/target/target_core_spc.c6
8 files changed, 11 insertions, 11 deletions
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
index 875b2b56b87f..3c1b5ab54bc0 100644
--- a/Documentation/blockdev/zram.txt
+++ b/Documentation/blockdev/zram.txt
@@ -190,7 +190,7 @@ whitespace:
190 notify_free Depending on device usage scenario it may account 190 notify_free Depending on device usage scenario it may account
191 a) the number of pages freed because of swap slot free 191 a) the number of pages freed because of swap slot free
192 notifications or b) the number of pages freed because of 192 notifications or b) the number of pages freed because of
193 REQ_DISCARD requests sent by bio. The former ones are 193 REQ_OP_DISCARD requests sent by bio. The former ones are
194 sent to a swap block device when a swap slot is freed, 194 sent to a swap block device when a swap slot is freed,
195 which implies that this disk is being used as a swap disk. 195 which implies that this disk is being used as a swap disk.
196 The latter ones are sent by filesystem mounted with 196 The latter ones are sent by filesystem mounted with
diff --git a/Documentation/device-mapper/log-writes.txt b/Documentation/device-mapper/log-writes.txt
index f4ebcbaf50f3..b638d124be6a 100644
--- a/Documentation/device-mapper/log-writes.txt
+++ b/Documentation/device-mapper/log-writes.txt
@@ -38,7 +38,7 @@ inconsistent file system.
38Any REQ_FUA requests bypass this flushing mechanism and are logged as soon as 38Any REQ_FUA requests bypass this flushing mechanism and are logged as soon as
39they complete as those requests will obviously bypass the device cache. 39they complete as those requests will obviously bypass the device cache.
40 40
41Any REQ_DISCARD requests are treated like WRITE requests. Otherwise we would 41Any REQ_OP_DISCARD requests are treated like WRITE requests. Otherwise we would
42have all the DISCARD requests, and then the WRITE requests and then the FLUSH 42have all the DISCARD requests, and then the WRITE requests and then the FLUSH
43request. Consider the following example: 43request. Consider the following example:
44 44
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 8a4c1328e6f9..1e47db57b9d2 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -429,7 +429,7 @@ enum {
429 __EE_CALL_AL_COMPLETE_IO, 429 __EE_CALL_AL_COMPLETE_IO,
430 __EE_MAY_SET_IN_SYNC, 430 __EE_MAY_SET_IN_SYNC,
431 431
432 /* is this a TRIM aka REQ_DISCARD? */ 432 /* is this a TRIM aka REQ_OP_DISCARD? */
433 __EE_IS_TRIM, 433 __EE_IS_TRIM,
434 434
435 /* In case a barrier failed, 435 /* In case a barrier failed,
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 15a9ffce9012..55fd104f1ed4 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1673,7 +1673,7 @@ static u32 bio_flags_to_wire(struct drbd_connection *connection,
1673 return bio->bi_opf & REQ_SYNC ? DP_RW_SYNC : 0; 1673 return bio->bi_opf & REQ_SYNC ? DP_RW_SYNC : 0;
1674} 1674}
1675 1675
1676/* Used to send write or TRIM aka REQ_DISCARD requests 1676/* Used to send write or TRIM aka REQ_OP_DISCARD requests
1677 * R_PRIMARY -> Peer (P_DATA, P_TRIM) 1677 * R_PRIMARY -> Peer (P_DATA, P_TRIM)
1678 */ 1678 */
1679int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *req) 1679int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *req)
diff --git a/drivers/block/drbd/drbd_protocol.h b/drivers/block/drbd/drbd_protocol.h
index c3081f93051c..48dabbb21e11 100644
--- a/drivers/block/drbd/drbd_protocol.h
+++ b/drivers/block/drbd/drbd_protocol.h
@@ -57,7 +57,7 @@ enum drbd_packet {
57 P_PROTOCOL_UPDATE = 0x2d, /* data sock: is used in established connections */ 57 P_PROTOCOL_UPDATE = 0x2d, /* data sock: is used in established connections */
58 /* 0x2e to 0x30 reserved, used in drbd 9 */ 58 /* 0x2e to 0x30 reserved, used in drbd 9 */
59 59
60 /* REQ_DISCARD. We used "discard" in different contexts before, 60 /* REQ_OP_DISCARD. We used "discard" in different contexts before,
61 * which is why I chose TRIM here, to disambiguate. */ 61 * which is why I chose TRIM here, to disambiguate. */
62 P_TRIM = 0x31, 62 P_TRIM = 0x31,
63 63
@@ -126,7 +126,7 @@ struct p_header100 {
126#define DP_UNPLUG 8 /* not used anymore */ 126#define DP_UNPLUG 8 /* not used anymore */
127#define DP_FUA 16 /* equals REQ_FUA */ 127#define DP_FUA 16 /* equals REQ_FUA */
128#define DP_FLUSH 32 /* equals REQ_PREFLUSH */ 128#define DP_FLUSH 32 /* equals REQ_PREFLUSH */
129#define DP_DISCARD 64 /* equals REQ_DISCARD */ 129#define DP_DISCARD 64 /* equals REQ_OP_DISCARD */
130#define DP_SEND_RECEIVE_ACK 128 /* This is a proto B write request */ 130#define DP_SEND_RECEIVE_ACK 128 /* This is a proto B write request */
131#define DP_SEND_WRITE_ACK 256 /* This is a proto C write request */ 131#define DP_SEND_WRITE_ACK 256 /* This is a proto C write request */
132#define DP_WSAME 512 /* equiv. REQ_WRITE_SAME */ 132#define DP_WSAME 512 /* equiv. REQ_WRITE_SAME */
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 19cac36e9737..1c4da17e902e 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -650,7 +650,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
650 case DISCARD_COMPLETED_NOTSUPP: 650 case DISCARD_COMPLETED_NOTSUPP:
651 case DISCARD_COMPLETED_WITH_ERROR: 651 case DISCARD_COMPLETED_WITH_ERROR:
652 /* I'd rather not detach from local disk just because it 652 /* I'd rather not detach from local disk just because it
653 * failed a REQ_DISCARD. */ 653 * failed a REQ_OP_DISCARD. */
654 mod_rq_state(req, m, RQ_LOCAL_PENDING, RQ_LOCAL_COMPLETED); 654 mod_rq_state(req, m, RQ_LOCAL_PENDING, RQ_LOCAL_COMPLETED);
655 break; 655 break;
656 656
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index c7ef48efe871..99255d0c9e2f 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -152,7 +152,7 @@ void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __releases(l
152 152
153 do_wake = list_empty(block_id == ID_SYNCER ? &device->sync_ee : &device->active_ee); 153 do_wake = list_empty(block_id == ID_SYNCER ? &device->sync_ee : &device->active_ee);
154 154
155 /* FIXME do we want to detach for failed REQ_DISCARD? 155 /* FIXME do we want to detach for failed REQ_OP_DISCARD?
156 * ((peer_req->flags & (EE_WAS_ERROR|EE_IS_TRIM)) == EE_WAS_ERROR) */ 156 * ((peer_req->flags & (EE_WAS_ERROR|EE_IS_TRIM)) == EE_WAS_ERROR) */
157 if (peer_req->flags & EE_WAS_ERROR) 157 if (peer_req->flags & EE_WAS_ERROR)
158 __drbd_chk_io_error(device, DRBD_WRITE_ERROR); 158 __drbd_chk_io_error(device, DRBD_WRITE_ERROR);
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index cb0461a10808..f459118bc11b 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -636,9 +636,9 @@ spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf)
636 636
637 /* 637 /*
638 * The unmap_zeroes_data set means that the underlying device supports 638 * The unmap_zeroes_data set means that the underlying device supports
639 * REQ_DISCARD and has the discard_zeroes_data bit set. This satisfies 639 * REQ_OP_DISCARD and has the discard_zeroes_data bit set. This
640 * the SBC requirements for LBPRZ, meaning that a subsequent read 640 * satisfies the SBC requirements for LBPRZ, meaning that a subsequent
641 * will return zeroes after an UNMAP or WRITE SAME (16) to an LBA 641 * read will return zeroes after an UNMAP or WRITE SAME (16) to an LBA
642 * See sbc4r36 6.6.4. 642 * See sbc4r36 6.6.4.
643 */ 643 */
644 if (((dev->dev_attrib.emulate_tpu != 0) || 644 if (((dev->dev_attrib.emulate_tpu != 0) ||