History

block: change how we get page references in bio_iov_iter_get_pages

Instead of needing a special macro to iterate over all pages in a bvec just do a second passs over the whole bio. This also matches what we do on the release side. The release side helper is moved up to where we need the get helper to clearly express the symmetry.

Christoph Hellwig committed 7 years ago

Commit 7321ecb1 parent 14eacf12 files · +25 −31Browse files

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

Unified · Split

include/linux/bvec.h+0−5
@@ -189,9 +189,4 @@ static inline void mp_bvec_last_segment(const struct bio_vec *bvec, · 188 unmodified lines
189 }189 }
190}190}
191 191
192#define mp_bvec_for_each_page(pg, bv, i) \
193 for (i = (bv)->bv_offset / PAGE_SIZE; \
194 (i <= (((bv)->bv_offset + (bv)->bv_len - 1) / PAGE_SIZE)) && \
195 (pg = bvec_nth_page((bv)->bv_page, i)); i += 1)
196
197#endif /* __LINUX_BVEC_ITER_H */192#endif /* __LINUX_BVEC_ITER_H */

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