diff options
author | Chunwei Chen <tuxoko@gmail.com> | 2014-03-28 15:08:21 +0800 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2014-04-10 14:28:38 -0700 |
commit | d4541210f3e07930dfefb6723d21cd8b313bb156 (patch) | |
tree | bafa3ba925de90a019871f8b064e133e0a4175e7 /include | |
parent | 408ec0d2e13188f6f500f7010b5bc5bc5bf5bb9c (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 <tuxoko@gmail.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2124
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev_compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index e45601bc8..be22ae700 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -286,6 +286,16 @@ struct req_iterator { bio_for_each_segment(bvl, _iter.bio, _iter.i) #endif /* HAVE_RQ_FOR_EACH_SEGMENT */ +#ifdef HAVE_BIO_BVEC_ITER +#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 +#else +#define BIO_BI_SECTOR(bio) (bio)->bi_sector +#define BIO_BI_SIZE(bio) (bio)->bi_size +#define BIO_BI_IDX(bio) (bio)->bi_idx +#endif + /* * Portable helper for correctly setting the FAILFAST flags. The * correct usage has changed 3 times from 2.6.12 to 2.6.38. |