Reusing the bio won't work in cases where the bio gets split.+ write_bio->bi_iter.bi_size = chunk;
+ ret = submit_bio_wait(write_bio);
+ kfree(write_bio);
blk_mq_map_bio_put(write_bio) ?
or bio_uninit(write_bio); kfree(write_bio)?
hmm...
It continuously allocates and releases memory for bio,
Why don't you just allocate and reuse bio outside the loop?
Agree, we will update this in next version.