diff options
Diffstat (limited to 'include/linux/bvec.h')
| -rw-r--r-- | include/linux/bvec.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index 7939b345ee7f..a7b7c016b9a3 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -34,6 +34,21 @@ struct bio_vec { unsigned int bv_offset; }; +/** + * bvec_set_page - initialize a bvec based off a struct page + * @bv: bvec to initialize + * @page: page the bvec should point to + * @len: length of the bvec + * @offset: offset into the page + */ +static inline void bvec_set_page(struct bio_vec *bv, struct page *page, + unsigned int len, unsigned int offset) +{ + bv->bv_page = page; + bv->bv_len = len; + bv->bv_offset = offset; +} + struct bvec_iter { sector_t bi_sector; /* device address in 512 byte sectors */ |
