• N
    drbd: use bio_clone_fast() instead of bio_clone() · 8cb0defb
    NeilBrown 提交于
    drbd does not modify the bi_io_vec of the cloned bio,
    so there is no need to clone that part.  So bio_clone_fast()
    is the better choice.
    For bio_clone_fast() we need to specify a bio_set.
    We could use fs_bio_set, which bio_clone() uses, or
    drbd_md_io_bio_set, which drbd uses for metadata, but it is
    generally best to avoid sharing bio_sets unless you can
    be certain that there are no interdependencies.
    
    So create a new bio_set, drbd_io_bio_set, and use bio_clone_fast().
    
    Also remove a "XXX cannot fail ???" comment because it definitely
    cannot fail - bio_clone_fast() doesn't fail if the GFP flags allow for
    sleeping.
    Reviewed-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NNeilBrown <neilb@suse.com>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    8cb0defb
drbd_int.h 80.9 KB