- struct bio * bio_split(struct bio * bio, int sectors, gfp_t gfp, struct bio_set * bs);
- bio to split
- number of sectors to split from the front of bio
- gfp mask
- bio set to allocate from
Allocates and returns a new bio which represents sectors from the start of bio, and updates bio to represent the remaining sectors.
The newly allocated bio will point to bio's bi_io_vec; it is the caller's responsibility to ensure that bio is not freed before the split.