diff options
author | Ming Lei <ming.lei@canonical.com> | 2016-02-26 23:40:50 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-03 14:42:49 -0700 |
commit | 7bcd79ac50d9d83350a835bdb91c04ac9e098412 (patch) | |
tree | b8161854b8ec9825e7b9fabf2299231130eaf574 /scripts | |
parent | e3c2ef41f88e50c8557270868600d3132028af3b (diff) |
block: bio: introduce helpers to get the 1st and last bvec
The bio passed to bio_will_gap() may be fast cloned from upper
layer(dm, md, bcache, fs, ...), or from bio splitting in block
core.
Unfortunately bio_will_gap() just figures out the last bvec via
'bi_io_vec[prev->bi_vcnt - 1]' directly, and this way is obviously
wrong.
This patch introduces two helpers for getting the first and last
bvec of one bio for fixing the issue.
Cc: stable@vger.kernel.org
Reported-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions