block: Introduce new bio_split()
The new bio_split() can split arbitrary bios - it's not restricted to
single page bios, like the old bio_split() (previously renamed to
bio_pair_split()). It also has different semantics - it doesn't allocate
a struct bio_pair, leaving it up to the caller to handle completions.
Then convert the existing bio_pair_split() users to the new bio_split()
- and also nvme, which was open coding bio splitting.
(We have to take that BUG_ON() out of bio_integrity_trim() because this
bio_split() needs to use it, and there's no reason it has to be used on
bios marked as cloned; BIO_CLONED doesn't seem to have clearly
documented semantics anyways.)
Signed-off-by:
Kent Overstreet <kmo@daterainc.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Neil Brown <neilb@suse.de>
Showing
- drivers/block/nvme-core.c 9 additions, 97 deletionsdrivers/block/nvme-core.c
- drivers/block/pktcdvd.c 74 additions, 62 deletionsdrivers/block/pktcdvd.c
- drivers/md/bcache/bcache.h 0 additions, 1 deletiondrivers/md/bcache/bcache.h
- drivers/md/bcache/io.c 2 additions, 80 deletionsdrivers/md/bcache/io.c
- drivers/md/bcache/request.c 6 additions, 6 deletionsdrivers/md/bcache/request.c
- drivers/md/linear.c 48 additions, 48 deletionsdrivers/md/linear.c
- drivers/md/raid0.c 28 additions, 49 deletionsdrivers/md/raid0.c
- drivers/md/raid10.c 47 additions, 66 deletionsdrivers/md/raid10.c
- fs/bio.c 36 additions, 0 deletionsfs/bio.c
- include/linux/bio.h 22 additions, 0 deletionsinclude/linux/bio.h
Please register or sign in to comment