freebsd-dev/scripts
Brian Behlendorf ba6a24026c Remove ZFC_IOC_*_MINOR ioctl()s
Early versions of ZFS coordinated the creation and destruction
of device minors from userspace.  This was inherently racy and
in late 2009 these ioctl()s were removed leaving everything up
to the kernel.  This significantly simplified the code.

However, we never picked up these changes in ZoL since we'd
already significantly adjusted this code for Linux.  This patch
aims to rectify that by finally removing ZFC_IOC_*_MINOR ioctl()s
and moving all the functionality down in to the kernel.  Since
this cleanup will change the kernel/user ABI it's being done
in the same tag as the previous libzfs_core ABI changes.  This
will minimize, but not eliminate, the disruption to end users.

Once merged ZoL, Illumos, and FreeBSD will basically be back
in sync in regards to handling ZVOLs in the common code.  While
each platform must have its own custom zvol.c implemenation the
interfaces provided are consistent.

NOTES:

1) This patch introduces one subtle change in behavior which
   could not be easily avoided.  Prior to this change callers
   of 'zfs create -V ...' were guaranteed that upon exit the
   /dev/zvol/ block device link would be created or an error
   returned.  That's no longer the case.  The utilities will no
   longer block waiting for the symlink to be created.  Callers
   are now responsible for blocking, this is why a 'udev_wait'
   call was added to the 'label' function in scripts/common.sh.

2) The read-only behavior of a ZVOL now solely depends on if
   the ZVOL_RDONLY bit is set in zv->zv_flags.  The redundant
   policy setting in the gendisk structure was removed.  This
   both simplifies the code and allows us to safely leverage
   set_disk_ro() to issue a KOBJ_CHANGE uevent.  See the
   comment in the code for futher details on this.

3) Because __zvol_create_minor() and zvol_alloc() may now be
   called in a sync task they must use KM_PUSHPAGE.

References:
  illumos/illumos-gate@681d9761e8

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #1969
2013-12-16 09:15:57 -08:00
..
zpios-profile Replace libexecdir with datadir 2013-03-06 15:46:40 -08:00
zpios-test Replace libexecdir with datadir 2013-03-06 15:46:40 -08:00
zpool-config Replace libexecdir with datadir 2013-03-06 15:46:40 -08:00
.gitignore Remove autotools products 2012-08-27 11:47:44 -07:00
common.sh.in Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
cstyle.pl Add cstyle.pl utility and cstyle.1 man page 2013-10-30 11:36:30 -07:00
dkms.mkconf Use requested kernel for dkms builds 2013-03-21 12:51:06 -07:00
dkms.postinst Refresh RPM packaging 2013-03-18 15:33:17 -07:00
kmodtool Add kmod repo integration 2013-08-01 09:48:07 -07:00
Makefile.am Add cstyle.pl utility and cstyle.1 man page 2013-10-30 11:36:30 -07:00
smb.sh Implemented sharing datasets via SMB using libshare 2012-12-03 09:42:15 -08:00
zconfig.sh Open pools asynchronously after module load 2013-07-03 09:24:38 -07:00
zfault.sh Disable 90-zfs.rules for test suite 2011-10-11 14:45:37 -07:00
zfs2zol-patch.sed Add script to fix file names in upstream patches 2013-10-29 10:30:43 -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 build: resolve orthographic and other grammatical errors 2013-04-02 10:44:52 -07:00
zpool-create.sh Add build system 2010-08-31 13:41:27 -07:00