Thread (8 messages) flat view 8 messages, 4 authors, 2017-03-09

Re: [PATCH 2/3] block: Separate zone requests from medium access requests

From: Bart Van Assche <hidden>
Date: 2017-02-28 16:57:22
Also in: linux-scsi

On Tue, 2017-02-28 at 19:25 +0900, Damien Le Moal wrote:
From: Bart Van Assche <redacted>
=20
Use blk_rq_accesses_medium() instead of !blk_rq_is_passthrough() to
ensure that code that is intended for normal medium access requests,
e.g. DISCARD, READ and WRITE requests, is not applied to
REQ_OP_ZONE_REPORT requests nor to REQ_OP_ZONE_RESET requests.
This allows excluding these zone requests from request accounting
and from request scheduling.
=20
Signed-off-by: Bart Van Assche <redacted>
Hello Damien,

Since you posted this patch you should have added your Signed-off-by. And
since you have edited this patch, you should have documented what you have
changed.
 static inline void req_set_nomerge(struct request_queue *q, struct reque=
st *req)
quoted hunk ↗ jump to hunk
diff --git a/block/elevator.c b/block/elevator.c
index 699d10f..cbf81c6 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -635,16 +635,20 @@ void __elv_add_request(struct request_queue *q, str=
uct request *rq, int where)
=20
 	rq->q =3D q;
=20
-	if (rq->rq_flags & RQF_SOFTBARRIER) {
+	if (!blk_rq_accesses_medium(rq)) {
+		/* Do not schedule zone requests */
+		where =3D ELEVATOR_INSERT_FRONT;
+	} if (rq->rq_flags & RQF_SOFTBARRIER) {
This change was not in the patch I sent to you. Additionally, this change
doesn't look properly formatted. Please make sure that the second "if" star=
ts
on a new line.
 		}
 	} else if (!(rq->rq_flags & RQF_ELVPRIV) &&
 		    (where =3D=3D ELEVATOR_INSERT_SORT ||
-		     where =3D=3D ELEVATOR_INSERT_SORT_MERGE))
+		     where =3D=3D ELEVATOR_INSERT_SORT_MERGE)) {
 		where =3D ELEVATOR_INSERT_BACK;
+	}
This change wasn't in my patch either. Since this change only adds a pair o=
f
braces, can it be left out?

Thanks,

Bart.=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help