[dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

Christoph Hellwig hch at infradead.org
Wed Nov 8 15:05:59 UTC 2017


On Wed, Nov 08, 2017 at 07:38:44AM -0500, Mikulas Patocka wrote:
> > To be honest I think we should just remove bio_kmap_irq.  It is currently
> > unused and assumes there is only a single bvec to map.
> 
> It could be removed from include/linux/bio.h and moved to my driver. But 
> if we leave it in bio.h, it could be used by others as well.
> 
> bio_kmap_irq can iterate over the whole bio if we use bio_advance on the 
> bio.

The bio_kmap_irq name implies it maps the whole bio, but it only maps
the current segment.  Now if there were plenty of users and it was
non-trivial we could say we should fix the name and documentation.
But given how trivial it is I'd rather have you open code it to clearly
document what you are doing.




More information about the dm-devel mailing list