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
This commit is contained in:
Chunwei Chen
2014-03-28 15:08:21 +08:00
committed by Brian Behlendorf
parent 408ec0d2e1
commit d4541210f3
4 changed files with 36 additions and 5 deletions
+10
View File
@@ -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.