• Kent Overstreet's avatar
    block: simplify bio_add_page() · c66a14d0
    Kent Overstreet authored
    Since generic_make_request() can now handle arbitrary size bios, all we
    have to do is make sure the bvec array doesn't overflow.
    __bio_add_page() doesn't need to call ->merge_bvec_fn(), where
    we can get rid of unnecessary code paths.
    
    Removing the call to ->merge_bvec_fn() is also fine, as no driver that
    implements support for BLOCK_PC commands even has a ->merge_bvec_fn()
    method.
    
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    [dpark: rebase and resolve merge conflicts, change a couple of comments,
     make bio_add_page() warn once upon a cloned bio.]
    Signed-off-by: default avatarDongsu Park <dpark@posteo.net>
    Signed-off-by: default avatarMing Lin <ming.l@ssi.samsung.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    c66a14d0
bio.c 48.8 KB