Move partition scanning from userspace to module.
Currently, zpool online -e (dynamic vdev expansion) doesn't work on whole disks because we're invoking ioctl(BLKRRPART) from userspace while ZFS still has a partition open on the disk, which results in EBUSY. This patch moves the BLKRRPART invocation from the zpool utility to the module. Specifically, this is done just before opening the device in vdev_disk_open() which is called inside vdev_reopen(). This requires jumping through some hoops to get to the disk device from the partition device, and to make sure we can still open the partition after the BLKRRPART call. Note that this new code path is triggered on dynamic vdev expansion only; other actions, like creating a new pool, are unchanged and still call BLKRRPART from userspace. This change also depends on API changes which are available in 2.6.37 and latter kernels. The build system has been updated to detect this, but there is no compatibility mode for older kernels. This means that online expansion will NOT be available in older kernels. However, it will still be possible to expand the vdev offline. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #808
This commit is contained in:
parent
fb7eb3e3e9
commit
b5a28807cd
@ -85,6 +85,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -94,6 +95,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -65,6 +65,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -74,6 +75,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
19
config/kernel-blkdev-get.m4
Normal file
19
config/kernel-blkdev-get.m4
Normal file
@ -0,0 +1,19 @@
|
||||
dnl #
|
||||
dnl # 2.6.37 API change
|
||||
dnl # Added 3rd argument for the active holder, previously this was
|
||||
dnl # hardcoded to NULL.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_3ARG_BLKDEV_GET], [
|
||||
AC_MSG_CHECKING([whether blkdev_get() wants 3 args])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct block_device *bdev = NULL;
|
||||
(void) blkdev_get(bdev, 0, NULL);
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_3ARG_BLKDEV_GET, 1, [blkdev_get() wants 3 args])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
11
config/kernel-get-gendisk.m4
Normal file
11
config/kernel-get-gendisk.m4
Normal file
@ -0,0 +1,11 @@
|
||||
dnl #
|
||||
dnl # 2.6.34 API change
|
||||
dnl # Verify the get_gendisk() symbol is exported.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_GET_GENDISK], [
|
||||
ZFS_CHECK_SYMBOL_EXPORT(
|
||||
[get_gendisk],
|
||||
[block/genhd.c],
|
||||
[AC_DEFINE(HAVE_GET_GENDISK, 1, [get_gendisk() is available])],
|
||||
[])
|
||||
])
|
@ -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_3ARG_BLKDEV_GET
|
||||
ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH
|
||||
ZFS_AC_KERNEL_OPEN_BDEV_EXCLUSIVE
|
||||
ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
|
||||
@ -34,6 +35,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
ZFS_AC_KERNEL_BLK_RQ_POS
|
||||
ZFS_AC_KERNEL_BLK_RQ_SECTORS
|
||||
ZFS_AC_KERNEL_GET_DISK_RO
|
||||
ZFS_AC_KERNEL_GET_GENDISK
|
||||
ZFS_AC_KERNEL_RQ_IS_SYNC
|
||||
ZFS_AC_KERNEL_RQ_FOR_EACH_SEGMENT
|
||||
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
|
||||
|
238
configure
vendored
238
configure
vendored
@ -12840,6 +12840,72 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
|
||||
$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.c
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
#include <linux/fs.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
struct block_device *bdev = NULL;
|
||||
(void) blkdev_get(bdev, 0, NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
||||
|
||||
rm -Rf build && mkdir -p build
|
||||
echo "obj-m := conftest.o" >build/Makefile
|
||||
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_3ARG_BLKDEV_GET 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -Rf build
|
||||
|
||||
|
||||
|
||||
|
||||
{ $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:]]' \
|
||||
@ -14790,6 +14856,59 @@ fi
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether symbol get_gendisk is exported" >&5
|
||||
$as_echo_n "checking whether symbol get_gendisk is exported... " >&6; }
|
||||
grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
|
||||
$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
|
||||
export=0
|
||||
for file in block/genhd.c; do
|
||||
grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" "$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_GET_GENDISK 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_GET_GENDISK 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
|
||||
$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
|
||||
tmp_flags="$EXTRA_KCFLAGS"
|
||||
@ -18988,6 +19107,72 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
|
||||
$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.c
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
#include <linux/fs.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
|
||||
struct block_device *bdev = NULL;
|
||||
(void) blkdev_get(bdev, 0, NULL);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
|
||||
|
||||
rm -Rf build && mkdir -p build
|
||||
echo "obj-m := conftest.o" >build/Makefile
|
||||
if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_3ARG_BLKDEV_GET 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
else
|
||||
$as_echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
rm -Rf build
|
||||
|
||||
|
||||
|
||||
|
||||
{ $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:]]' \
|
||||
@ -20938,6 +21123,59 @@ fi
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether symbol get_gendisk is exported" >&5
|
||||
$as_echo_n "checking whether symbol get_gendisk is exported... " >&6; }
|
||||
grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
|
||||
$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
|
||||
export=0
|
||||
for file in block/genhd.c; do
|
||||
grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" "$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_GET_GENDISK 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_GET_GENDISK 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
|
||||
$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
|
||||
tmp_flags="$EXTRA_KCFLAGS"
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -229,6 +229,7 @@ struct partition64 {
|
||||
extern int efi_alloc_and_init(int, uint32_t, struct dk_gpt **);
|
||||
extern int efi_alloc_and_read(int, struct dk_gpt **);
|
||||
extern int efi_write(int, struct dk_gpt *);
|
||||
extern int efi_rescan(int);
|
||||
extern void efi_free(struct dk_gpt *);
|
||||
extern int efi_type(int);
|
||||
extern void efi_err_check(struct dk_gpt *);
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -497,10 +497,9 @@ efi_ioctl(int fd, int cmd, dk_efi_t *dk_ioc)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
static int
|
||||
efi_rescan(int fd)
|
||||
int efi_rescan(int fd)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
int retry = 5;
|
||||
int error;
|
||||
|
||||
@ -512,10 +511,10 @@ efi_rescan(int fd)
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
check_label(int fd, dk_efi_t *dk_ioc)
|
||||
@ -1304,12 +1303,6 @@ efi_write(int fd, struct dk_gpt *vtoc)
|
||||
(void) write_pmbr(fd, vtoc);
|
||||
free(dk_ioc.dki_data);
|
||||
|
||||
#if defined(__linux__)
|
||||
rval = efi_rescan(fd);
|
||||
if (rval)
|
||||
return (VT_ERROR);
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -2097,6 +2097,9 @@ zpool_relabel_disk(libzfs_handle_t *hdl, const char *path, const char *msg)
|
||||
* It's possible that we might encounter an error if the device
|
||||
* does not have any unallocated space left. If so, we simply
|
||||
* ignore that error and continue on.
|
||||
*
|
||||
* Also, we don't call efi_rescan() - that would just return EBUSY.
|
||||
* The module will do it for us in vdev_disk_open().
|
||||
*/
|
||||
error = efi_use_whole_disk(fd);
|
||||
(void) close(fd);
|
||||
@ -3847,7 +3850,7 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
|
||||
vtoc->efi_parts[8].p_size = resv;
|
||||
vtoc->efi_parts[8].p_tag = V_RESERVED;
|
||||
|
||||
if ((rval = efi_write(fd, vtoc)) != 0) {
|
||||
if ((rval = efi_write(fd, vtoc)) != 0 || (rval = efi_rescan(fd)) != 0) {
|
||||
/*
|
||||
* Some block drivers (like pcata) may not support EFI
|
||||
* GPT labels. Print out a helpful error message dir-
|
||||
|
@ -64,6 +64,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -73,6 +74,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -158,10 +158,75 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Expanding a whole disk vdev involves invoking BLKRRPART on the
|
||||
* whole disk device. This poses a problem, because BLKRRPART will
|
||||
* return EBUSY if one of the disk's partitions is open. That's why
|
||||
* we have to do it here, just before opening the data partition.
|
||||
* Unfortunately, BLKRRPART works by dropping all partitions and
|
||||
* recreating them, which means that for a short time window, all
|
||||
* /dev/sdxN device files disappear (until udev recreates them).
|
||||
* This means two things:
|
||||
* - When we open the data partition just after a BLKRRPART, we
|
||||
* can't do it using the normal device file path because of the
|
||||
* obvious race condition with udev. Instead, we use reliable
|
||||
* kernel APIs to get a handle to the new partition device from
|
||||
* the whole disk device.
|
||||
* - Because vdev_disk_open() initially needs to find the device
|
||||
* using its path, multiple vdev_disk_open() invocations in
|
||||
* short succession on the same disk with BLKRRPARTs in the
|
||||
* middle have a high probability of failure (because of the
|
||||
* race condition with udev). A typical situation where this
|
||||
* might happen is when the zpool userspace tool does a
|
||||
* TRYIMPORT immediately followed by an IMPORT. For this
|
||||
* reason, we only invoke BLKRRPART in the module when strictly
|
||||
* necessary (zpool online -e case), and rely on userspace to
|
||||
* do it when possible.
|
||||
*/
|
||||
static struct block_device *
|
||||
vdev_disk_rrpart(const char *path, int mode, vdev_disk_t *vd)
|
||||
{
|
||||
#if defined(HAVE_3ARG_BLKDEV_GET) && defined(HAVE_GET_GENDISK)
|
||||
struct block_device *bdev, *result = ERR_PTR(-ENXIO);
|
||||
struct gendisk *disk;
|
||||
int error, partno;
|
||||
|
||||
bdev = vdev_bdev_open(path, vdev_bdev_mode(mode), vd);
|
||||
if (IS_ERR(bdev))
|
||||
return bdev;
|
||||
|
||||
disk = get_gendisk(bdev->bd_dev, &partno);
|
||||
vdev_bdev_close(bdev, vdev_bdev_mode(mode));
|
||||
|
||||
if (disk) {
|
||||
bdev = bdget(disk_devt(disk));
|
||||
if (bdev) {
|
||||
error = blkdev_get(bdev, vdev_bdev_mode(mode), vd);
|
||||
if (error == 0)
|
||||
error = ioctl_by_bdev(bdev, BLKRRPART, 0);
|
||||
vdev_bdev_close(bdev, vdev_bdev_mode(mode));
|
||||
}
|
||||
|
||||
bdev = bdget_disk(disk, partno);
|
||||
if (bdev) {
|
||||
error = blkdev_get(bdev,
|
||||
vdev_bdev_mode(mode) | FMODE_EXCL, vd);
|
||||
if (error == 0)
|
||||
result = bdev;
|
||||
}
|
||||
put_disk(disk);
|
||||
}
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
#endif /* defined(HAVE_3ARG_BLKDEV_GET) && defined(HAVE_GET_GENDISK) */
|
||||
}
|
||||
|
||||
static int
|
||||
vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *ashift)
|
||||
{
|
||||
struct block_device *bdev;
|
||||
struct block_device *bdev = ERR_PTR(-ENXIO);
|
||||
vdev_disk_t *vd;
|
||||
int mode, block_size;
|
||||
|
||||
@ -190,6 +255,9 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *ashift)
|
||||
* level vdev validation.
|
||||
*/
|
||||
mode = spa_mode(v->vdev_spa);
|
||||
if (v->vdev_wholedisk && v->vdev_expanding)
|
||||
bdev = vdev_disk_rrpart(v->vdev_path, mode, vd);
|
||||
if (IS_ERR(bdev))
|
||||
bdev = vdev_bdev_open(v->vdev_path, vdev_bdev_mode(mode), vd);
|
||||
if (IS_ERR(bdev)) {
|
||||
kmem_free(vd, sizeof(vdev_disk_t));
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -62,6 +62,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -71,6 +72,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -63,6 +63,7 @@ am__aclocal_m4_deps = \
|
||||
$(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-blkdev-get.m4 \
|
||||
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
|
||||
$(top_srcdir)/config/kernel-create-umode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-d-make-root.m4 \
|
||||
@ -72,6 +73,7 @@ am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/kernel-fmode-t.m4 \
|
||||
$(top_srcdir)/config/kernel-fsync.m4 \
|
||||
$(top_srcdir)/config/kernel-get-disk-ro.m4 \
|
||||
$(top_srcdir)/config/kernel-get-gendisk.m4 \
|
||||
$(top_srcdir)/config/kernel-insert-inode-locked.m4 \
|
||||
$(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
|
||||
$(top_srcdir)/config/kernel-kobj-name-len.m4 \
|
||||
|
@ -9,6 +9,9 @@
|
||||
/* bio_end_io_t wants 2 args */
|
||||
#undef HAVE_2ARGS_BIO_END_IO_T
|
||||
|
||||
/* blkdev_get() wants 3 args */
|
||||
#undef HAVE_3ARG_BLKDEV_GET
|
||||
|
||||
/* security_inode_init_security wants 6 args */
|
||||
#undef HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY
|
||||
|
||||
@ -147,6 +150,9 @@
|
||||
/* blk_disk_ro() is available */
|
||||
#undef HAVE_GET_DISK_RO
|
||||
|
||||
/* get_gendisk() is available */
|
||||
#undef HAVE_GET_GENDISK
|
||||
|
||||
/* Define to 1 if licensed under the GPL */
|
||||
#undef HAVE_GPL_ONLY_SYMBOLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user