freebsd-dev/scripts
Etienne Dechamps b5a28807cd 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
2012-07-17 09:17:31 -07:00
..
zpios-profile Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
zpios-test Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
zpool-config Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
zpool-layout Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
common.sh.in Fix zconfig.sh non-optimal alignment 2012-02-09 13:23:28 -08:00
Makefile.am Remove spl/zfs modules as part of cleanup 2010-11-11 11:40:06 -08:00
Makefile.in Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
zconfig.sh Fix zconfig.sh non-optimal alignment 2012-02-09 13:23:28 -08:00
zfault.sh Disable 90-zfs.rules for test suite 2011-10-11 14:45:37 -07:00
zfs.sh Add default stack checking 2011-06-13 13:50:21 -07:00
zpios-sanity.sh Disable 90-zfs.rules for test suite 2011-10-11 14:45:37 -07:00
zpios-survey.sh Add linux zpios support 2010-08-31 13:42:01 -07:00
zpios.sh Always unload zpios.ko on exit 2011-06-02 10:25:35 -07:00
zpool-create.sh Add build system 2010-08-31 13:41:27 -07:00