freebsd-nq/include/sys
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
..
fm 3246 ZFS I/O deadman thread 2013-05-01 17:05:52 -07:00
fs Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
arc.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
avl_impl.h
avl.h
bplist.h
bpobj.h
bptree.h
dbuf.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
ddt.h Illumos #3742 2013-11-04 10:55:25 -08:00
dmu_impl.h Illumos #3834 2013-11-05 12:15:00 -08:00
dmu_objset.h Illumos #3875 2013-11-04 11:27:41 -08:00
dmu_send.h Illumos #3834 2013-11-05 12:15:00 -08:00
dmu_traverse.h Illumos #3498 panic in arc_read() 2013-07-02 13:34:31 -07:00
dmu_tx.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
dmu_zfetch.h Fix zstream_t incorrect type 2013-12-10 10:09:27 -08:00
dmu.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
dnode.h Illumos #4047 2013-11-05 12:23:35 -08:00
dsl_dataset.h Illumos #3996 2013-11-05 12:23:11 -08:00
dsl_deadlist.h
dsl_deleg.h Illumos #2882, #2883, #2900 2013-09-04 15:49:00 -07:00
dsl_destroy.h Illumos #3888 2013-11-04 11:18:14 -08:00
dsl_dir.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
dsl_pool.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
dsl_prop.h Illumos #3464 2013-09-04 16:01:24 -07:00
dsl_scan.h Illumos #3956, #3957, #3958, #3959, #3960, #3961, #3962 2013-11-05 12:23:05 -08:00
dsl_synctask.h Illumos #3464 2013-09-04 16:01:24 -07:00
dsl_userhold.h Illumos #3740 2013-11-04 11:17:48 -08:00
efi_partition.h
Makefile.am Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
metaslab_impl.h Illumos #3954, #4080, #4081 2013-11-05 12:25:01 -08:00
metaslab.h Illumos #3464 2013-09-04 16:01:24 -07:00
nvpair_impl.h
nvpair.h Illumos #3464 2013-09-04 16:01:24 -07:00
refcount.h Illumos #3464 2013-09-04 16:01:24 -07:00
rrwlock.h Illumos #3464 2013-09-04 16:01:24 -07:00
sa_impl.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
sa.h
spa_boot.h
spa_impl.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
spa.h Illumos #3537 2013-10-31 09:16:03 -07:00
space_map.h Illumos #3742 2013-11-04 10:55:25 -08:00
txg_impl.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
txg.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
u8_textprep_data.h
u8_textprep.h
uberblock_impl.h
uberblock.h
uio_impl.h
unique.h Illumos #3742 2013-11-04 10:55:25 -08:00
uuid.h
vdev_disk.h
vdev_file.h
vdev_impl.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
vdev.h 3246 ZFS I/O deadman thread 2013-05-01 17:05:52 -07:00
xvattr.h
zap_impl.h
zap_leaf.h Illumos #3742 2013-11-04 10:55:25 -08:00
zap.h Illumos #3742 2013-11-04 10:55:25 -08:00
zfeature.h Illumos #3464 2013-09-04 16:01:24 -07:00
zfs_acl.h Illumos #3742 2013-11-04 10:55:25 -08:00
zfs_context.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
zfs_ctldir.h
zfs_debug.h Illumos #3956, #3957, #3958, #3959, #3960, #3961, #3962 2013-11-05 12:23:05 -08:00
zfs_delay.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
zfs_dir.h
zfs_fuid.h
zfs_ioctl.h Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00
zfs_onexit.h
zfs_rlock.h Illumos #3742 2013-11-04 10:55:25 -08:00
zfs_sa.h
zfs_stat.h
zfs_vfsops.h Posix ACL Support 2013-10-29 14:54:26 -07:00
zfs_vnops.h Linux 3.11 compat: fops->iterate() 2013-08-15 16:19:07 -07:00
zfs_znode.h Only commit the ZIL once in zpl_writepages() (msync() case). 2013-11-23 15:08:29 -08:00
zil_impl.h
zil.h Only commit the ZIL once in zpl_writepages() (msync() case). 2013-11-23 15:08:29 -08:00
zio_checksum.h
zio_compress.h Illumos #3742 2013-11-04 10:55:25 -08:00
zio_impl.h Illumos #3836 2013-11-05 12:14:56 -08:00
zio.h Illumos #4045 write throttle & i/o scheduler performance work 2013-12-06 09:32:43 -08:00
zpl.h Add I/O Read/Write Accounting 2013-11-21 08:56:24 -08:00
zrlock.h
zvol.h Remove ZFC_IOC_*_MINOR ioctl()s 2013-12-16 09:15:57 -08:00