Thread (18 messages) 18 messages, 6 authors, 2018-07-23

Re: [PATCH 1/2] blk-mq: export setting request completion state

From: Christoph Hellwig <hch@lst.de>
Date: 2018-07-23 08:09:41
Also in: linux-nvme

+/*
+ * Returns true if request was not in flight.
+ */
+static inline bool blk_mq_mark_complete(struct request *rq)
+{
+	return (cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) !=
+			MQ_RQ_IN_FLIGHT);
+}
This needs a much better comment describing when and how to use it.

Also the outer braces in the return statement are not required.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help