freebsd-dev/lib/libzfs
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
..
libzfs_changelist.c Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
libzfs_config.c Illumos #3464 2013-09-04 16:01:24 -07:00
libzfs_dataset.c Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
libzfs_diff.c Illumos #3464 2013-09-04 16:01:24 -07:00
libzfs_fru.c Illumos #3464 2013-09-04 16:01:24 -07:00
libzfs_graph.c Illumos #3464 2013-09-04 16:01:24 -07:00
libzfs_import.c Fix libblkid support 2013-10-10 16:56:51 -07:00
libzfs_iter.c Illumos #4061 2013-11-05 12:24:10 -08:00
libzfs_mount.c Handle concurrent snapshot automounts failing due to EBUSY. 2013-11-08 10:45:14 -08:00
libzfs_pool.c Remove the slog restriction on bootfs pools 2013-11-14 14:28:35 -08:00
libzfs_sendrecv.c Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
libzfs_status.c Illumos #3818 2013-11-04 11:18:14 -08:00
libzfs_util.c Illumos #2882, #2883, #2900 2013-09-04 15:49:00 -07:00
Makefile.am Fix libzfs_core changes to follow GNU libtool guidelines 2013-10-10 16:56:51 -07:00