aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-02-25 14:36:01 +0700
committerBrian Behlendorf <[email protected]>2011-05-02 08:54:40 -0700
commitdf554c148ecfdfb7e597f8ab7eee71388b24a19d (patch)
treef55979c7c3c842464a896e1551f93b3cfbd3e66f /configure
parente90a3de3e8b52061aeb0717b031a956cc1e705d5 (diff)
Fix 'zfs set volsize=N pool/dataset'
This change fixes a kernel panic which would occur when resizing a dataset which was not open. The objset_t stored in the zvol_state_t will be set to NULL when the block device is closed. To avoid this issue we pass the correct objset_t as the third arg. The code has also been updated to correctly notify the kernel when the block device capacity changes. For 2.6.28 and newer kernels the capacity change will be immediately detected. For earlier kernels the capacity change will be detected when the device is next opened. This is a known limitation of older kernels. Online ext3 resize test case passes on 2.6.28+ kernels: $ dd if=/dev/zero of=/tmp/zvol bs=1M count=1 seek=1023 $ zpool create tank /tmp/zvol $ zfs create -V 500M tank/zd0 $ mkfs.ext3 /dev/zd0 $ mkdir /mnt/zd0 $ mount /dev/zd0 /mnt/zd0 $ df -h /mnt/zd0 $ zfs set volsize=800M tank/zd0 $ resize2fs /dev/zd0 $ df -h /mnt/zd0 Original-patch-by: Fajar A. Nugraha <[email protected]> Closes #68 Closes #84
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure80
1 files changed, 80 insertions, 0 deletions
diff --git a/configure b/configure
index 5e501eefb..b0d1b8a1e 100755
--- a/configure
+++ b/configure
@@ -14398,6 +14398,46 @@ _ACEOF
+ { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
+$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
+ grep -q -E '[[:space:]]check_disk_size_change[[: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.*(check_disk_size_change)" "$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_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
+
+ fi
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
+
+ fi
+
+
+
if test "$LINUX_OBJ" != "$LINUX"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
fi
@@ -18484,6 +18524,46 @@ _ACEOF
+ { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
+$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
+ grep -q -E '[[:space:]]check_disk_size_change[[: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.*(check_disk_size_change)" "$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_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
+
+ fi
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
+
+ fi
+
+
+
if test "$LINUX_OBJ" != "$LINUX"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
fi