]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Add support for asynchronous zvol minor operations
authorBoris Protopopov <boris.protopopov@actifio.com>
Sat, 22 Mar 2014 09:07:14 +0000 (05:07 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 10 Mar 2016 17:49:22 +0000 (09:49 -0800)
commita0bd735adb1b1eb81fef10b4db102ee051c4d4ff
tree121fcde3000a116f0c33143b28a530a87fd6073a
parenteb0856779f7b57162c9179f238104f6d6e150745
Add support for asynchronous zvol minor operations

zfsonlinux issue #2217 - zvol minor operations: check snapdev
property before traversing snapshots of a dataset

zfsonlinux issue #3681 - lock order inversion between zvol_open()
and dsl_pool_sync()...zvol_rename_minors()

Create a per-pool zvol taskq for asynchronous zvol tasks.
There are a few key design decisions to be aware of.

* Each taskq must be single threaded to ensure tasks are always
  processed in the order in which they were dispatched.

* There is a taskq per-pool in order to keep the pools independent.
  This way if one pool is suspended it will not impact another.

* The preferred location to dispatch a zvol minor task is a sync
  task.  In this context there is easy access to the spa_t and
  minimal error handling is required because the sync task must
  succeed.

Support for asynchronous zvol minor operations address issue #3681.

Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2217
Closes #3678
Closes #3681
12 files changed:
include/sys/spa_impl.h
include/sys/zvol.h
lib/libzpool/kernel.c
module/zfs/dmu_objset.c
module/zfs/dmu_send.c
module/zfs/dsl_dataset.c
module/zfs/dsl_destroy.c
module/zfs/dsl_dir.c
module/zfs/spa.c
module/zfs/zfs_ioctl.c
module/zfs/zvol.c
scripts/zconfig.sh