mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
block: Immutable bio vecs
This adds a mechanism by which we can advance a bio by an arbitrary number of bytes without modifying the biovec: bio->bi_iter.bi_bvec_done indicates the number of bytes completed in the current bvec. Various driver code still needs to be updated to not refer to the bvec directly before we can use this for interesting things, like efficient bio splitting. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com> Cc: Paul Clements <Paul.Clements@steeleye.com> Cc: drbd-user@lists.linbit.com Cc: nbd-general@lists.sourceforge.net
This commit is contained in:
parent
7988613b0e
commit
4550dd6c6b
7 changed files with 194 additions and 38 deletions
|
@ -750,9 +750,9 @@ struct req_iterator {
|
|||
__rq_for_each_bio(_iter.bio, _rq) \
|
||||
bio_for_each_segment(bvl, _iter.bio, _iter.iter)
|
||||
|
||||
#define rq_iter_last(rq, _iter) \
|
||||
#define rq_iter_last(bvec, _iter) \
|
||||
(_iter.bio->bi_next == NULL && \
|
||||
bio_iter_last(_iter.bio, _iter.iter))
|
||||
bio_iter_last(bvec, _iter.iter))
|
||||
|
||||
#ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
|
||||
# error "You should define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE for your platform"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue