History

block: Document the bio_vec properties

Since it is nontrivial that nth_page() does not have to be used for a bio_vec, document this.

Bart Van Assche committed 6 years ago

Commit 854b5f01 parent c1527c01 file · +11 −2Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/bvec.h+11−2
@@ -12,8 +12,17 @@ · 11 unmodified lines
1212 #include <linux/errno.h>
1313 #include <linux/mm.h>
1414
15−/*
16− * was unsigned short, but we might as well be ready for > 64kB I/O pages
15+/**
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.
1726 */
1827 struct bio_vec {
1928 struct page *bv_page;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t