Thread (5 messages) 5 messages, 3 authors, 2020-01-09

Re: [PATCH V2] block: add bio_truncate to fix guard_bio_eod

From: Ming Lei <hidden>
Date: 2020-01-09 02:05:41
Also in: linux-fsdevel

On Wed, Jan 08, 2020 at 05:37:35AM -0800, Christoph Hellwig wrote:
quoted
+void bio_truncate(struct bio *bio, unsigned new_size)
This function really needs a kerneldoc or similar comment describing
what it does in detail.
OK, will do that.
quoted
+	if (bio_data_dir(bio) != READ)
+		goto exit;
This really should check the passed in op for REQ_OP_READ directly instead
of just the direction on the potentially not fully set up bio.
It has been addressed in:

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=block-5.5&id=802ca0381befe29ba0783e08e3369f9e87ef9d0d


Thanks,
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help