mirror_zfs/scripts/zpool-config
Brian Behlendorf df554c148e 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 <github@fajar.net>
Closes #68
Closes #84
2011-05-02 08:54:40 -07:00
..
dm0-raid0.sh Add build system 2010-08-31 13:41:27 -07:00
file-raid0.sh Add build system 2010-08-31 13:41:27 -07:00
file-raid10.sh Add build system 2010-08-31 13:41:27 -07:00
file-raidz2.sh Add build system 2010-08-31 13:41:27 -07:00
file-raidz.sh Add build system 2010-08-31 13:41:27 -07:00
hda-raid0.sh Add build system 2010-08-31 13:41:27 -07:00
lo-faulty-raid0.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-faulty-raid10.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-faulty-raidz2.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-faulty-raidz3.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-faulty-raidz.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-raid0.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-raid10.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-raidz2.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
lo-raidz.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
Makefile.am Replace custom zpool configs with generic configs 2010-11-08 14:03:36 -08:00
Makefile.in Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
md0-raid5.sh Add build system 2010-08-31 13:41:27 -07:00
md0-raid10.sh Add build system 2010-08-31 13:41:27 -07:00
ram0-raid0.sh Add build system 2010-08-31 13:41:27 -07:00
scsi_debug-noraid.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
scsi_debug-raid0.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
scsi_debug-raid10.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
scsi_debug-raidz2.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
scsi_debug-raidz3.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
scsi_debug-raidz.sh Add zfault zpool configurations and tests 2010-10-12 15:20:03 -07:00
sda-raid0.sh Add build system 2010-08-31 13:41:27 -07:00
zpool-raid0.sh Replace custom zpool configs with generic configs 2010-11-08 14:03:36 -08:00
zpool-raid10.sh Replace custom zpool configs with generic configs 2010-11-08 14:03:36 -08:00
zpool-raidz.sh Replace custom zpool configs with generic configs 2010-11-08 14:03:36 -08:00