summaryrefslogtreecommitdiff
path: root/include/linux/bvec.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2026-04-16 22:01:18 +0300
committerJiri Kosina <jkosina@suse.com>2026-04-16 22:01:18 +0300
commitd4eb7b2da66c848709e31585b9c371fa234abc39 (patch)
tree5c6311cfa45567ecdcb8946a2252da7d55d1ac10 /include/linux/bvec.h
parent8b9a097eb2fc37b486afd81388c693bf3ab44466 (diff)
parent69c02ffde6ed4d535fa4e693a9e572729cad3d0d (diff)
downloadlinux-d4eb7b2da66c848709e31585b9c371fa234abc39.tar.xz
Merge branch 'for-7.1/core-v2' into for-linus
- fixed handling of 0-sized reports (Dmitry Torokhov) - convert core code to __free() (Dmitry Torokhov) - support for multiple batteries per HID device (Lucas Zampieri)
Diffstat (limited to 'include/linux/bvec.h')
-rw-r--r--include/linux/bvec.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 3fc0efa0825b..06fb60471aaf 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -75,14 +75,27 @@ static inline void bvec_set_virt(struct bio_vec *bv, void *vaddr,
}
struct bvec_iter {
- sector_t bi_sector; /* device address in 512 byte
- sectors */
- unsigned int bi_size; /* residual I/O count */
-
- unsigned int bi_idx; /* current index into bvl_vec */
-
- unsigned int bi_bvec_done; /* number of bytes completed in
- current bvec */
+ /*
+ * Current device address in 512 byte sectors. Only updated by the bio
+ * iter wrappers and not the bvec iterator helpers themselves.
+ */
+ sector_t bi_sector;
+
+ /*
+ * Remaining size in bytes.
+ */
+ unsigned int bi_size;
+
+ /*
+ * Current index into the bvec array. This indexes into `bi_io_vec` when
+ * iterating a bvec array that is part of a `bio`.
+ */
+ unsigned int bi_idx;
+
+ /*
+ * Current offset in the bvec entry pointed to by `bi_idx`.
+ */
+ unsigned int bi_bvec_done;
} __packed __aligned(4);
struct bvec_iter_all {