mirror_zfs/lib/libspl/include/sys
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
..
dktp Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
sysevent Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
acl_impl.h Add linux libspl support 2010-08-31 13:41:59 -07:00
acl.h Add linux libspl support 2010-08-31 13:41:59 -07:00
bitmap.h Add linux libspl support 2010-08-31 13:41:59 -07:00
byteorder.h Add linux libspl support 2010-08-31 13:41:59 -07:00
callb.h Add linux libspl support 2010-08-31 13:41:59 -07:00
cmn_err.h Add linux libspl support 2010-08-31 13:41:59 -07:00
compress.h Add linux libspl support 2010-08-31 13:41:59 -07:00
cred.h Add linux libspl support 2010-08-31 13:41:59 -07:00
debug.h Add linux libspl support 2010-08-31 13:41:59 -07:00
dkio.h Fix for access beyond end of device error 2010-11-10 21:29:07 -08:00
dklabel.h Fix for access beyond end of device error 2010-11-10 21:29:07 -08:00
feature_tests.h Add linux libspl support 2010-08-31 13:41:59 -07:00
file.h Add linux libspl support 2010-08-31 13:41:59 -07:00
frame.h Add linux libspl support 2010-08-31 13:41:59 -07:00
int_limits.h Add linux libspl support 2010-08-31 13:41:59 -07:00
int_types.h Add linux libspl support 2010-08-31 13:41:59 -07:00
inttypes.h Add linux libspl support 2010-08-31 13:41:59 -07:00
isa_defs.h Define the needed ISA types for ARM 2012-05-03 11:18:54 -07:00
kmem.h Add linux libspl support 2010-08-31 13:41:59 -07:00
kstat.h Add linux libspl support 2010-08-31 13:41:59 -07:00
list_impl.h Add linux libspl support 2010-08-31 13:41:59 -07:00
list.h Add linux libspl support 2010-08-31 13:41:59 -07:00
machelf.h Add linux libspl support 2010-08-31 13:41:59 -07:00
Makefile.am Fix block device-related issues in zdb. 2010-12-14 09:52:46 -08:00
Makefile.in Move partition scanning from userspace to module. 2012-07-17 09:17:31 -07:00
mhd.h Add linux libspl support 2010-08-31 13:41:59 -07:00
mkdev.h Add linux libspl support 2010-08-31 13:41:59 -07:00
mntent.h Linux compat 2.6.39: mount_nodev() 2011-07-01 13:36:39 -07:00
mnttab.h Add 'zfs mount' support 2011-02-04 16:11:58 -08:00
mount.h Add overlay(-O) mount option support 2012-01-12 15:49:38 -08:00
note.h Add linux libspl support 2010-08-31 13:41:59 -07:00
param.h Correct MAXUID 2011-04-29 14:03:12 -07:00
priv.h Add linux libspl support 2010-08-31 13:41:59 -07:00
processor.h Add linux libspl support 2010-08-31 13:41:59 -07:00
sdt.h Add linux libspl support 2010-08-31 13:41:59 -07:00
stack.h Add linux libspl support 2010-08-31 13:41:59 -07:00
stat.h Fix block device-related issues in zdb. 2010-12-14 09:52:46 -08:00
stropts.h Add linux libspl support 2010-08-31 13:41:59 -07:00
sunddi.h Add linux libspl support 2010-08-31 13:41:59 -07:00
sysevent.h Add linux libspl support 2010-08-31 13:41:59 -07:00
sysmacros.h Add linux libspl support 2010-08-31 13:41:59 -07:00
systeminfo.h Add linux libspl support 2010-08-31 13:41:59 -07:00
systm.h Add linux libspl support 2010-08-31 13:41:59 -07:00
time.h Add linux libspl support 2010-08-31 13:41:59 -07:00
types32.h Add linux libspl support 2010-08-31 13:41:59 -07:00
types.h Add linux libspl support 2010-08-31 13:41:59 -07:00
tzfile.h Add linux libspl support 2010-08-31 13:41:59 -07:00
uio.h Add linux libspl support 2010-08-31 13:41:59 -07:00
utsname.h Add linux libspl support 2010-08-31 13:41:59 -07:00
va_list.h Add linux libspl support 2010-08-31 13:41:59 -07:00
varargs.h Add linux libspl support 2010-08-31 13:41:59 -07:00
vnode.h Add linux libspl support 2010-08-31 13:41:59 -07:00
vtoc.h Fix for access beyond end of device error 2010-11-10 21:29:07 -08:00
zone.h Add linux libspl support 2010-08-31 13:41:59 -07:00