aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2015-12-08 12:37:24 -0800
committerBrian Behlendorf <[email protected]>2015-12-15 16:21:43 -0800
commit2727b9d3b63a938c1797d31378e6a5a1dcd43573 (patch)
treef85bd88b0ab3c09fecf27f39af6e736f8ae20815 /include
parent502923bb447cdf4f9bc1271a46dfc11d5e0f2e9b (diff)
Use uio for zvol_{read,write}
Since uio now supports bvec, we can convert bio into uio and reuse dmu_{read,write}_uio. This way, we can remove some duplicate code. Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4078
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev_compat.h2
-rw-r--r--include/sys/dmu.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h
index 868b89c55..0cb07207e 100644
--- a/include/linux/blkdev_compat.h
+++ b/include/linux/blkdev_compat.h
@@ -118,6 +118,7 @@ get_disk_ro(struct gendisk *disk)
#define BIO_BI_SECTOR(bio) (bio)->bi_iter.bi_sector
#define BIO_BI_SIZE(bio) (bio)->bi_iter.bi_size
#define BIO_BI_IDX(bio) (bio)->bi_iter.bi_idx
+#define BIO_BI_SKIP(bio) (bio)->bi_iter.bi_bvec_done
#define bio_for_each_segment4(bv, bvp, b, i) \
bio_for_each_segment((bv), (b), (i))
typedef struct bvec_iter bvec_iterator_t;
@@ -125,6 +126,7 @@ typedef struct bvec_iter bvec_iterator_t;
#define BIO_BI_SECTOR(bio) (bio)->bi_sector
#define BIO_BI_SIZE(bio) (bio)->bi_size
#define BIO_BI_IDX(bio) (bio)->bi_idx
+#define BIO_BI_SKIP(bio) (0)
#define bio_for_each_segment4(bv, bvp, b, i) \
bio_for_each_segment((bvp), (b), (i))
typedef int bvec_iterator_t;
diff --git a/include/sys/dmu.h b/include/sys/dmu.h
index d9434db46..6bf51975e 100644
--- a/include/sys/dmu.h
+++ b/include/sys/dmu.h
@@ -710,9 +710,6 @@ void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
dmu_tx_t *tx);
#ifdef _KERNEL
#include <linux/blkdev_compat.h>
-int dmu_read_bio(objset_t *os, uint64_t object, struct bio *bio);
-int dmu_write_bio(objset_t *os, uint64_t object, struct bio *bio,
- dmu_tx_t *tx);
int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size);
int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size);
int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size,