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