From 45066d1f20a582fc8229776503b1cdd554d7fde4 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 22 Feb 2011 14:55:35 -0800 Subject: [PATCH] Linux 2.6.38 compat, blkdev_get_by_path() The open_bdev_exclusive() function has been replaced (again) by the more generic blkdev_get_by_path() function. Additionally, the counterpart function close_bdev_exclusive() has been replaced by blkdev_put(). Because these functions are more generic versions of the functions they replaced the compatibility macro must add the FMODE_EXCL mask to ensure they are exclusive. Closes #114 --- Makefile.in | 1 + cmd/Makefile.in | 1 + cmd/zdb/Makefile.in | 1 + cmd/zfs/Makefile.in | 1 + cmd/zinject/Makefile.in | 1 + cmd/zpios/Makefile.in | 1 + cmd/zpool/Makefile.in | 1 + cmd/zpool_id/Makefile.in | 1 + cmd/zpool_layout/Makefile.in | 1 + cmd/ztest/Makefile.in | 1 + config/kernel-blkdev-get-by-path.m4 | 13 ++++ config/kernel.m4 | 1 + configure | 80 +++++++++++++++++++++ etc/Makefile.in | 1 + include/Makefile.in | 1 + include/linux/Makefile.in | 1 + include/linux/blkdev_compat.h | 21 +++++- include/sys/Makefile.in | 1 + include/sys/fm/Makefile.in | 1 + include/sys/fm/fs/Makefile.in | 1 + include/sys/fs/Makefile.in | 1 + lib/Makefile.in | 1 + lib/libavl/Makefile.in | 1 + lib/libefi/Makefile.in | 1 + lib/libnvpair/Makefile.in | 1 + lib/libspl/Makefile.in | 1 + lib/libspl/asm-generic/Makefile.in | 1 + lib/libspl/asm-i386/Makefile.in | 1 + lib/libspl/asm-x86_64/Makefile.in | 1 + lib/libspl/include/Makefile.in | 1 + lib/libspl/include/ia32/Makefile.in | 1 + lib/libspl/include/ia32/sys/Makefile.in | 1 + lib/libspl/include/rpc/Makefile.in | 1 + lib/libspl/include/sys/Makefile.in | 1 + lib/libspl/include/sys/dktp/Makefile.in | 1 + lib/libspl/include/sys/sysevent/Makefile.in | 1 + lib/libspl/include/util/Makefile.in | 1 + lib/libunicode/Makefile.in | 1 + lib/libuutil/Makefile.in | 1 + lib/libzfs/Makefile.in | 1 + lib/libzpool/Makefile.in | 1 + man/Makefile.in | 1 + man/man8/Makefile.in | 1 + scripts/Makefile.in | 1 + scripts/zpios-profile/Makefile.in | 1 + scripts/zpios-test/Makefile.in | 1 + scripts/zpool-config/Makefile.in | 1 + scripts/zpool-layout/Makefile.in | 1 + zfs_config.h.in | 3 + 49 files changed, 159 insertions(+), 3 deletions(-) create mode 100644 config/kernel-blkdev-get-by-path.m4 diff --git a/Makefile.in b/Makefile.in index 3c266e161..26ed819e0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 05e70be6b..f82f9c544 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index 0ff5b4bc5..dec3e3a2a 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index d6ce3ae34..19f6f8f9d 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 8182ab346..4181ec905 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index b29bfd7d6..a10ef6a41 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index 9ceb47448..a3c892d62 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index c518542ce..1a52546ac 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index 6b21c3e40..5d6e8f504 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index c7291cb36..a81b68e4e 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -53,6 +53,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/config/kernel-blkdev-get-by-path.m4 b/config/kernel-blkdev-get-by-path.m4 new file mode 100644 index 000000000..0d5d2b120 --- /dev/null +++ b/config/kernel-blkdev-get-by-path.m4 @@ -0,0 +1,13 @@ +dnl # +dnl # 2.6.38 API change +dnl # open_bdev_exclusive() changed to blkdev_get_by_path() +dnl # close_bdev_exclusive() changed to blkdev_put() +dnl # +AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [ + ZFS_CHECK_SYMBOL_EXPORT( + [blkdev_get_by_path], + [fs/block_dev.c], + [AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH, 1, + [blkdev_get_by_path() is available])], + []) +]) diff --git a/config/kernel.m4 b/config/kernel.m4 index c3321ed8d..492fbab14 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -8,6 +8,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS ZFS_AC_KERNEL_TYPE_FMODE_T ZFS_AC_KERNEL_KOBJ_NAME_LEN + ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE diff --git a/configure b/configure index 02a071557..60888993b 100755 --- a/configure +++ b/configure @@ -12382,6 +12382,46 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 +$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 $as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ @@ -16261,6 +16301,46 @@ fi + { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5 +$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; } + grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \ + $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in fs/block_dev.c; do + grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLKDEV_GET_BY_PATH 1 +_ACEOF + + fi + + + { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5 $as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; } grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \ diff --git a/etc/Makefile.in b/etc/Makefile.in index 88640a716..e129b33d7 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/Makefile.in b/include/Makefile.in index f47e747f1..c137babbe 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index e70c16afc..91e0c6688 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/linux/blkdev_compat.h b/include/linux/blkdev_compat.h index f841c6c00..d2e80ec88 100644 --- a/include/linux/blkdev_compat.h +++ b/include/linux/blkdev_compat.h @@ -280,16 +280,31 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags) #endif /* HAVE_2ARGS_BIO_END_IO_T */ /* - * 2.6.28 API change + * 2.6.38 - 2.6.x API, + * blkdev_get_by_path() + * blkdev_put() + * + * 2.6.28 - 2.6.37 API, + * open_bdev_exclusive() + * close_bdev_exclusive() + * + * 2.6.12 - 2.6.27 API, + * open_bdev_excl() + * close_bdev_excl() + * * Used to exclusively open a block device from within the kernel. */ -#ifdef HAVE_OPEN_BDEV_EXCLUSIVE +#if defined(HAVE_BLKDEV_GET_BY_PATH) +# define vdev_bdev_open(path, md, hld) blkdev_get_by_path(path, \ + (md) | FMODE_EXCL, hld) +# define vdev_bdev_close(bdev, md) blkdev_put(bdev, (md) | FMODE_EXCL) +#elif defined(HAVE_OPEN_BDEV_EXCLUSIVE) # define vdev_bdev_open(path, md, hld) open_bdev_exclusive(path, md, hld) # define vdev_bdev_close(bdev, md) close_bdev_exclusive(bdev, md) #else # define vdev_bdev_open(path, md, hld) open_bdev_excl(path, md, hld) # define vdev_bdev_close(bdev, md) close_bdev_excl(bdev) -#endif /* HAVE_OPEN_BDEV_EXCLUSIVE */ +#endif /* HAVE_BLKDEV_GET_BY_PATH | HAVE_OPEN_BDEV_EXCLUSIVE */ /* * 2.6.22 API change diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index daf68b3a9..69404f182 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index d05018dd1..ba9cda230 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index e2ad9533f..66dea01bf 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index ce196fb89..67ba4c65d 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 139d3e436..76c242d69 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 421b2851f..e78d325f5 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index 00f109db1..d7dc9a359 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index c47aa7d89..8feb5cb25 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index be5ddf1ec..e88eb672c 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 67e9a0f44..d822b500c 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index bbb7265ee..663d54286 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 625adc54e..1208d621a 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index 66ba65f70..e2b4aa50a 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index c0836280a..7fe64136e 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index 243eaeb12..593934b77 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 35c2b1403..906440c15 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index b0b29bf2a..af21c135a 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index f98455474..3ae681fd0 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index d787d8a8b..95057be2e 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index f3950b9b1..47b1406d2 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index 64bfe3990..8123c17c0 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 6b0525ea6..27375fd80 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index e10cd8078..a291362b1 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index 96bced0bf..a45a72612 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index c209c2961..1ccac2bbb 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index 0a8d52923..6dfceda5a 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -50,6 +50,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index ba491bc54..011e28b95 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index bd356296e..ec50f356e 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index 0030fa3d1..24c9a5e60 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index 5fd446dc6..939ab8f72 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index d8b181d9f..c8c5520d4 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-bytes.m4 \ $(top_srcdir)/config/kernel-blk-rq-pos.m4 \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ + $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fmode-t.m4 \ $(top_srcdir)/config/kernel-fsync.m4 \ diff --git a/zfs_config.h.in b/zfs_config.h.in index 2f09157e3..442d83c90 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -33,6 +33,9 @@ /* BIO_RW_SYNCIO is defined */ #undef HAVE_BIO_RW_SYNCIO +/* blkdev_get_by_path() is available */ +#undef HAVE_BLKDEV_GET_BY_PATH + /* blk_end_request() is available */ #undef HAVE_BLK_END_REQUEST