Commit 9305455a authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe
Browse files

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 4e1b2d52 ("block, fs,
drivers: remove REQ_OP compat defs and related code").

Signed-off-by: default avatarBart 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: default avatarJens Axboe <axboe@kernel.dk>
parent e4f3aa2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ whitespace:
 notify_free      Depending on device usage scenario it may account
                  a) the number of pages freed because of swap slot free
                  notifications or b) the number of pages freed because of
                  REQ_DISCARD requests sent by bio. The former ones are
                  REQ_OP_DISCARD requests sent by bio. The former ones are
                  sent to a swap block device when a swap slot is freed,
                  which implies that this disk is being used as a swap disk.
                  The latter ones are sent by filesystem mounted with
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ inconsistent file system.
Any REQ_FUA requests bypass this flushing mechanism and are logged as soon as
they complete as those requests will obviously bypass the device cache.

Any REQ_DISCARD requests are treated like WRITE requests.  Otherwise we would
Any REQ_OP_DISCARD requests are treated like WRITE requests.  Otherwise we would
have all the DISCARD requests, and then the WRITE requests and then the FLUSH
request.  Consider the following example:

+1 −1
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ enum {
	__EE_CALL_AL_COMPLETE_IO,
	__EE_MAY_SET_IN_SYNC,

	/* is this a TRIM aka REQ_DISCARD? */
	/* is this a TRIM aka REQ_OP_DISCARD? */
	__EE_IS_TRIM,

	/* In case a barrier failed,
+1 −1
Original line number Diff line number Diff line
@@ -1673,7 +1673,7 @@ static u32 bio_flags_to_wire(struct drbd_connection *connection,
		return bio->bi_opf & REQ_SYNC ? DP_RW_SYNC : 0;
}

/* Used to send write or TRIM aka REQ_DISCARD requests
/* Used to send write or TRIM aka REQ_OP_DISCARD requests
 * R_PRIMARY -> Peer	(P_DATA, P_TRIM)
 */
int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *req)
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ enum drbd_packet {
	P_PROTOCOL_UPDATE     = 0x2d, /* data sock: is used in established connections */
        /* 0x2e to 0x30 reserved, used in drbd 9 */

	/* REQ_DISCARD. We used "discard" in different contexts before,
	/* REQ_OP_DISCARD. We used "discard" in different contexts before,
	 * which is why I chose TRIM here, to disambiguate. */
	P_TRIM                = 0x31,

@@ -126,7 +126,7 @@ struct p_header100 {
#define DP_UNPLUG             8 /* not used anymore   */
#define DP_FUA               16 /* equals REQ_FUA     */
#define DP_FLUSH             32 /* equals REQ_PREFLUSH   */
#define DP_DISCARD           64 /* equals REQ_DISCARD */
#define DP_DISCARD           64 /* equals REQ_OP_DISCARD */
#define DP_SEND_RECEIVE_ACK 128 /* This is a proto B write request */
#define DP_SEND_WRITE_ACK   256 /* This is a proto C write request */
#define DP_WSAME            512 /* equiv. REQ_WRITE_SAME */
Loading