aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev_disk.c
diff options
context:
space:
mode:
authorChunwei Chen <[email protected]>2014-03-28 15:08:21 +0800
committerBrian Behlendorf <[email protected]>2014-04-10 14:28:38 -0700
commitd4541210f3e07930dfefb6723d21cd8b313bb156 (patch)
treebafa3ba925de90a019871f8b064e133e0a4175e7 /module/zfs/vdev_disk.c
parent408ec0d2e13188f6f500f7010b5bc5bc5bf5bb9c (diff)
Linux 3.14 compat: Immutable biovec changes in vdev_disk.c
bi_sector, bi_size and bi_idx are moved from bio to bio->bi_iter. This patch creates BIO_BI_*(bio) macros to hide the differences. Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #2124
Diffstat (limited to 'module/zfs/vdev_disk.c')
-rw-r--r--module/zfs/vdev_disk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 5bd38e983..cb0cdd7bb 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -432,11 +432,11 @@ BIO_END_IO_PROTO(vdev_disk_physio_completion, bio, size, error)
"bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d\n"
"bi_idx: %d, bi_size: %d, bi_end_io: %p, bi_cnt: %d\n",
bio->bi_next, bio->bi_flags, bio->bi_rw, bio->bi_vcnt,
- bio->bi_idx, bio->bi_size, bio->bi_end_io,
+ BIO_BI_IDX(bio), BIO_BI_SIZE(bio), bio->bi_end_io,
atomic_read(&bio->bi_cnt));
#ifndef HAVE_2ARGS_BIO_END_IO_T
- if (bio->bi_size)
+ if (BIO_BI_SIZE(bio))
return (1);
#endif /* HAVE_2ARGS_BIO_END_IO_T */
@@ -556,7 +556,7 @@ retry:
vdev_disk_dio_get(dr);
dr->dr_bio[i]->bi_bdev = bdev;
- dr->dr_bio[i]->bi_sector = bio_offset >> 9;
+ BIO_BI_SECTOR(dr->dr_bio[i]) = bio_offset >> 9;
dr->dr_bio[i]->bi_rw = dr->dr_rw;
dr->dr_bio[i]->bi_end_io = vdev_disk_physio_completion;
dr->dr_bio[i]->bi_private = dr;
@@ -565,8 +565,8 @@ retry:
bio_size = bio_map(dr->dr_bio[i], bio_ptr, bio_size);
/* Advance in buffer and construct another bio if needed */
- bio_ptr += dr->dr_bio[i]->bi_size;
- bio_offset += dr->dr_bio[i]->bi_size;
+ bio_ptr += BIO_BI_SIZE(dr->dr_bio[i]);
+ bio_offset += BIO_BI_SIZE(dr->dr_bio[i]);
}
/* Extra reference to protect dio_request during submit_bio */