Thread (50 messages) 50 messages, 8 authors, 2012-09-03

Re: [PATCH v6 03/13] block: Add bio_reset()

From: Tejun Heo <tj@kernel.org>
Date: 2012-08-22 19:51:59
Also in: dm-devel, lkml

On Wed, Aug 22, 2012 at 11:34:26AM -0700, Tejun Heo wrote:
On Wed, Aug 22, 2012 at 10:04:00AM -0700, Kent Overstreet wrote:
quoted
Reusing bios is something that's been highly frowned upon in the past,
but driver code keeps doing it anyways. If it's going to happen anyways,
we should provide a generic method.

This'll help with getting rid of bi_destructor - drivers/block/pktcdvd.c
was open coding it, by doing a bio_init() and resetting bi_destructor.

v5: Add a define BIO_RESET_BITS, to be very explicit about what parts of
bio->bi_flags are saved.
v6: Further commenting verbosity, per Tejun

Signed-off-by: Kent Overstreet <redacted>
CC: Jens Axboe <axboe@kernel.dk>
Given some users are converted later.

 Acked-by: Tejun Heo [off-list ref]
Noticed it was a bit fuzzy which fields get reset and which aren't and
had a off-line discussion with Kent.  The conclusion was that
bi_end_io and bi_private should be reset and bi_integrity should be
freed on bio_reset().

Thanks.

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