|
@@ -170,27 +170,11 @@ static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
|
|
|
{
|
|
|
iter->bi_sector += bytes >> 9;
|
|
|
|
|
|
- if (bio_no_advance_iter(bio)) {
|
|
|
+ if (bio_no_advance_iter(bio))
|
|
|
iter->bi_size -= bytes;
|
|
|
- iter->bi_done += bytes;
|
|
|
- } else {
|
|
|
+ else
|
|
|
bvec_iter_advance(bio->bi_io_vec, iter, bytes);
|
|
|
/* TODO: It is reasonable to complete bio with error here. */
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool bio_rewind_iter(struct bio *bio, struct bvec_iter *iter,
|
|
|
- unsigned int bytes)
|
|
|
-{
|
|
|
- iter->bi_sector -= bytes >> 9;
|
|
|
-
|
|
|
- if (bio_no_advance_iter(bio)) {
|
|
|
- iter->bi_size += bytes;
|
|
|
- iter->bi_done -= bytes;
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- return bvec_iter_rewind(bio->bi_io_vec, iter, bytes);
|
|
|
}
|
|
|
|
|
|
#define __bio_for_each_segment(bvl, bio, iter, start) \
|
|
@@ -353,6 +337,8 @@ struct bio_integrity_payload {
|
|
|
unsigned short bip_max_vcnt; /* integrity bio_vec slots */
|
|
|
unsigned short bip_flags; /* control flags */
|
|
|
|
|
|
+ struct bvec_iter bio_iter; /* for rewinding parent bio */
|
|
|
+
|
|
|
struct work_struct bip_work; /* I/O completion */
|
|
|
|
|
|
struct bio_vec *bip_vec;
|