summaryrefslogtreecommitdiff
path: root/include/linux/bvec.h
diff options
context:
space:
mode:
authorAndreas Hindborg <a.hindborg@kernel.org>2026-02-14 12:12:54 +0300
committerJens Axboe <axboe@kernel.dk>2026-02-14 17:43:27 +0300
commit11506b3c233fcead6eba2842d17ec29c84f550d4 (patch)
tree899fff6c420aeb62798d496e10922ee5c812152c /include/linux/bvec.h
parent453daece381e60df20da16c49ccc6a9bc5c6515a (diff)
downloadlinux-11506b3c233fcead6eba2842d17ec29c84f550d4.tar.xz
block: update docs for bio and bvec_iter
The documentation for bio and bvec_iter refers to a vector named bvl_vec. This does not exist. Update the documentation comment with correct use. Also update documentation comments for remaining fields of `bvec_iter` to improve readability. The fields of `bvec_iter` is using a mix of tabs and spaces for indentation. While at it, change them all to tabs, which is most prevalent in this struct definition. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
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 {