Since it is nontrivial that nth_page() does not have to be used for a bio_vec, document this.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -12,8 +12,17 @@ · 11 unmodified lines | |||
| 12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
| 13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
| 14 | 14 | ||
| 15 | /* | 15 | /** |
| 16 | * was unsigned short, but we might as well be ready for > 64kB I/O pages | 16 | * struct bio_vec - a contiguous range of physical memory addresses |
| 17 | * @bv_page: First page associated with the address range. | ||
| 18 | * @bv_len: Number of bytes in the address range. | ||
| 19 | * @bv_offset: Start of the address range relative to the start of @bv_page. | ||
| 20 | * | ||
| 21 | * The following holds for a bvec if n * PAGE_SIZE < bv_offset + bv_len: | ||
| 22 | * | ||
| 23 | * nth_page(@bv_page, n) == @bv_page + n | ||
| 24 | * | ||
| 25 | * This holds because page_is_mergeable() checks the above property. | ||
| 17 | */ | 26 | */ |
| 18 | struct bio_vec { | 27 | struct bio_vec { |
| 19 | struct page *bv_page; | 28 | struct page *bv_page; |