diff options
author | Chunwei Chen <[email protected]> | 2014-03-28 15:08:21 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-04-10 14:28:38 -0700 |
commit | d4541210f3e07930dfefb6723d21cd8b313bb156 (patch) | |
tree | bafa3ba925de90a019871f8b064e133e0a4175e7 /config/kernel-bio-bvec-iter.m4 | |
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 <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2124
Diffstat (limited to 'config/kernel-bio-bvec-iter.m4')
-rw-r--r-- | config/kernel-bio-bvec-iter.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/kernel-bio-bvec-iter.m4 b/config/kernel-bio-bvec-iter.m4 new file mode 100644 index 000000000..64c989386 --- /dev/null +++ b/config/kernel-bio-bvec-iter.m4 @@ -0,0 +1,20 @@ +dnl # +dnl # 3.14 API change, +dnl # Immutable biovecs. A number of fields of struct bio are moved to +dnl # struct bvec_iter. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_BIO_BVEC_ITER], [ + AC_MSG_CHECKING([whether bio has bi_iter]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/bio.h> + ],[ + struct bio bio; + bio.bi_iter.bi_sector = 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BIO_BVEC_ITER, 1, [bio has bi_iter]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + |