Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andreas Hindborg and committed by
Jens Axboe
11506b3c 453daece

+26 -7
+7 -1
include/linux/blk_types.h
··· 273 273 * Everything starting with bi_max_vecs will be preserved by bio_reset() 274 274 */ 275 275 276 - unsigned short bi_max_vecs; /* max bvl_vecs we can hold */ 276 + /* 277 + * Number of elements in `bi_io_vec` that were allocated for this bio. 278 + * Only used by the bio submitter to make `bio_add_page` fail once full 279 + * and to free the `bi_io_vec` allocation. Must not be used in drivers 280 + * and does not hold a useful value for cloned bios. 281 + */ 282 + unsigned short bi_max_vecs; 277 283 278 284 atomic_t __bi_cnt; /* pin count */ 279 285
+19 -6
include/linux/bvec.h
··· 75 75 } 76 76 77 77 struct bvec_iter { 78 - sector_t bi_sector; /* device address in 512 byte 79 - sectors */ 80 - unsigned int bi_size; /* residual I/O count */ 78 + /* 79 + * Current device address in 512 byte sectors. Only updated by the bio 80 + * iter wrappers and not the bvec iterator helpers themselves. 81 + */ 82 + sector_t bi_sector; 81 83 82 - unsigned int bi_idx; /* current index into bvl_vec */ 84 + /* 85 + * Remaining size in bytes. 86 + */ 87 + unsigned int bi_size; 83 88 84 - unsigned int bi_bvec_done; /* number of bytes completed in 85 - current bvec */ 89 + /* 90 + * Current index into the bvec array. This indexes into `bi_io_vec` when 91 + * iterating a bvec array that is part of a `bio`. 92 + */ 93 + unsigned int bi_idx; 94 + 95 + /* 96 + * Current offset in the bvec entry pointed to by `bi_idx`. 97 + */ 98 + unsigned int bi_bvec_done; 86 99 } __packed __aligned(4); 87 100 88 101 struct bvec_iter_all {