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 3c266e1611..26ed819e0b 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 05e70be6b6..f82f9c5448 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 0ff5b4bc54..dec3e3a2a4 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 d6ce3ae34b..19f6f8f9d4 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 8182ab346c..4181ec9059 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 b29bfd7d65..a10ef6a412 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 9ceb47448b..a3c892d62d 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 c518542cea..1a52546ac0 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 6b21c3e405..5d6e8f5048 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 c7291cb36f..a81b68e4e6 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 0000000000..0d5d2b120d --- /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 c3321ed8df..492fbab14c 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 02a0715573..60888993be 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 88640a7166..e129b33d78 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 f47e747f10..c137babbee 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 e70c16afc6..91e0c66886 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 f841c6c00c..d2e80ec88f 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 daf68b3a9b..69404f1822 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 d05018dd11..ba9cda2306 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 e2ad9533f7..66dea01bf0 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 ce196fb890..67ba4c65dd 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 139d3e436a..76c242d697 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 421b2851f7..e78d325f52 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 00f109db1c..d7dc9a359a 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 c47aa7d895..8feb5cb25a 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 be5ddf1ec0..e88eb672c4 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 67e9a0f440..d822b500c2 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 bbb7265ee9..663d54286a 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 625adc54e6..1208d621a2 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 66ba65f700..e2b4aa50ad 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 c0836280a1..7fe64136e3 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 243eaeb128..593934b772 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 35c2b14034..906440c152 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 b0b29bf2a3..af21c135a4 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 f984554742..3ae681fd02 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 d787d8a8b3..95057be2e9 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 f3950b9b1c..47b1406d2d 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 64bfe3990f..8123c17c06 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 6b0525ea6b..27375fd803 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 e10cd8078e..a291362b1c 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 96bced0bf1..a45a726122 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 c209c2961e..1ccac2bbb5 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 0a8d529235..6dfceda5a7 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 ba491bc548..011e28b958 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 bd356296e3..ec50f356ef 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 0030fa3d12..24c9a5e601 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 5fd446dc61..939ab8f72d 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 d8b181d9f5..c8c5520d49 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 2f09157e35..442d83c90e 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