• Home
  • Raw
  • Download

Lines Matching refs:bvec

59 static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec,
149 static inline bool is_partial_io(struct bio_vec *bvec) in is_partial_io() argument
151 return bvec->bv_len != PAGE_SIZE; in is_partial_io()
154 static inline bool is_partial_io(struct bio_vec *bvec) in is_partial_io() argument
184 static void update_position(u32 *index, int *offset, struct bio_vec *bvec) in update_position() argument
186 *index += (*offset + bvec->bv_len) / PAGE_SIZE; in update_position()
187 *offset = (*offset + bvec->bv_len) % PAGE_SIZE; in update_position()
585 static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, in read_from_bdev_async() argument
596 if (!bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset)) { in read_from_bdev_async()
667 struct bio_vec bvec; in writeback_store() local
669 bvec.bv_page = page; in writeback_store()
670 bvec.bv_len = PAGE_SIZE; in writeback_store()
671 bvec.bv_offset = 0; in writeback_store()
712 if (zram_bvec_read(zram, &bvec, index, 0, NULL)) { in writeback_store()
725 bio_add_page(&bio, bvec.bv_page, bvec.bv_len, in writeback_store()
726 bvec.bv_offset); in writeback_store()
791 struct bio_vec bvec; member
802 read_from_bdev_async(zram, &zw->bvec, entry, bio); in zram_sync_read()
810 static int read_from_bdev_sync(struct zram *zram, struct bio_vec *bvec, in read_from_bdev_sync() argument
815 work.bvec = *bvec; in read_from_bdev_sync()
828 static int read_from_bdev_sync(struct zram *zram, struct bio_vec *bvec, in read_from_bdev_sync() argument
836 static int read_from_bdev(struct zram *zram, struct bio_vec *bvec, in read_from_bdev() argument
841 return read_from_bdev_sync(zram, bvec, entry, parent); in read_from_bdev()
843 return read_from_bdev_async(zram, bvec, entry, parent); in read_from_bdev()
847 static int read_from_bdev(struct zram *zram, struct bio_vec *bvec, in read_from_bdev() argument
1238 struct bio_vec bvec; in __zram_bvec_read() local
1242 bvec.bv_page = page; in __zram_bvec_read()
1243 bvec.bv_len = PAGE_SIZE; in __zram_bvec_read()
1244 bvec.bv_offset = 0; in __zram_bvec_read()
1245 return read_from_bdev(zram, &bvec, in __zram_bvec_read()
1290 static int zram_bvec_read(struct zram *zram, struct bio_vec *bvec, in zram_bvec_read() argument
1296 page = bvec->bv_page; in zram_bvec_read()
1297 if (is_partial_io(bvec)) { in zram_bvec_read()
1304 ret = __zram_bvec_read(zram, page, index, bio, is_partial_io(bvec)); in zram_bvec_read()
1308 if (is_partial_io(bvec)) { in zram_bvec_read()
1309 void *dst = kmap_atomic(bvec->bv_page); in zram_bvec_read()
1312 memcpy(dst + bvec->bv_offset, src + offset, bvec->bv_len); in zram_bvec_read()
1317 if (is_partial_io(bvec)) in zram_bvec_read()
1323 static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec, in __zram_bvec_write() argument
1332 struct page *page = bvec->bv_page; in __zram_bvec_write()
1441 static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, in zram_bvec_write() argument
1449 vec = *bvec; in zram_bvec_write()
1450 if (is_partial_io(bvec)) { in zram_bvec_write()
1464 src = kmap_atomic(bvec->bv_page); in zram_bvec_write()
1466 memcpy(dst + offset, src + bvec->bv_offset, bvec->bv_len); in zram_bvec_write()
1477 if (is_partial_io(bvec)) in zram_bvec_write()
1525 static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index, in zram_bvec_rw() argument
1532 ret = zram_bvec_read(zram, bvec, index, offset, bio); in zram_bvec_rw()
1533 flush_dcache_page(bvec->bv_page); in zram_bvec_rw()
1536 ret = zram_bvec_write(zram, bvec, index, offset, bio); in zram_bvec_rw()
1557 struct bio_vec bvec; in __zram_make_request() local
1576 bio_for_each_segment(bvec, bio, iter) { in __zram_make_request()
1577 struct bio_vec bv = bvec; in __zram_make_request()
1578 unsigned int unwritten = bvec.bv_len; in __zram_make_request()