Thread (25 messages) 25 messages, 9 authors, 2019-07-02

Re: [PATCH 3/6] block: remove the bi_phys_segments field in struct bio

From: Christoph Hellwig <hch@lst.de>
Date: 2019-06-07 16:46:00

On Fri, Jun 07, 2019 at 08:02:55AM +0200, Hannes Reinecke wrote:
quoted
+void blk_queue_split(struct request_queue *q, struct bio **bio)
+{
+	unsigned int nr_segs;
+
+	__blk_queue_split(q, bio, &nr_segs);
+}
 EXPORT_SYMBOL(blk_queue_split);
 
That looks a bit weird, and I guess some or other compiler might
complain here about nr_segs being unused.
Can't we modify __blk_queue_split() to accept a NULL argument here?
We could.  But that would bloat the fast path for absolutely no
reason.  Passing a by reference output argument that is then ignored
is a pretty common pattern.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help