Go to file
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
cmd Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
config Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
dracut Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
etc Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
include Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
lib Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
man Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
module Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
patches Add build system 2010-08-31 13:41:27 -07:00
scripts Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
AUTHORS Add Gunnar Beutner to AUTHORS for his contributions 2011-04-19 14:14:51 -07:00
autogen.sh Minor packaging fixes 2010-09-01 15:42:32 -07:00
ChangeLog Add build system 2010-08-31 13:41:27 -07:00
configure Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
configure.ac Set cmd paths in udev rules using --prefix 2011-03-25 10:05:09 -07:00
COPYING Relocate COPYING+COPYRIGHT, remove README cruft 2008-12-01 15:34:53 -08:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
DISCLAIMER Update COPYRIGHT and DISCLAIMER. 2010-05-18 10:32:23 -07:00
Makefile.am Add dracut support 2011-03-17 16:52:04 -07:00
Makefile.in Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
META Prep zfs-0.6.0-rc3 tag 2011-04-07 10:49:55 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix markdown rendering 2010-09-15 09:09:37 -07:00
zfs_config.h.in Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00
zfs-modules.spec.in Fix rebuildable RPMs for el6/ch5 2011-04-08 10:22:42 -07:00
zfs-script-config.sh.in Unconditionally load core kernel modules 2010-11-11 11:38:25 -08:00
ZFS.RELEASE Update to onnv_147 2010-08-26 14:24:34 -07:00
zfs.spec.in Add parted and lsscsi dependencies to zfs-test 2011-04-19 15:22:46 -07:00

Native ZFS for Linux! ZFS is an advanced file system and volume manager which was originally developed for Solaris. It has been successfully ported to FreeBSD and now there is a functional Linux ZFS kernel port too. The port currently includes a fully functional and stable SPA, DMU, and ZVOL with a ZFS Posix Layer (ZPL) on the way!

$ ./configure
$ make pkg

Full documentation for building, configuring, and using ZFS can be found at: http://zfsonlinux.org