diff options
author | Brian Behlendorf <[email protected]> | 2011-02-08 11:29:50 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-10 09:27:21 -0800 |
commit | 3c4988c83e4f278cd6c8076f6cdb8e4858d05840 (patch) | |
tree | 90340c0bc67bd8634affdf9d7d29c59837e640e6 /module/zfs/zvol.c | |
parent | 3558fd73b5d863304102f6745c26e0b592aca60a (diff) |
Add zp->z_is_zvol flag
A new flag is required for the zfs_rlock code to determine if
it is operation of the zvol of zpl dataset. This used to be
keyed off the zp->z_vnode, which was a hack to begin with, but
with the removal of vnodes we needed a dedicated flag.
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r-- | module/zfs/zvol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index b2a08fb43..3d829a3d4 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1062,6 +1062,8 @@ zvol_alloc(dev_t dev, const char *name) mutex_init(&zv->zv_znode.z_range_lock, NULL, MUTEX_DEFAULT, NULL); avl_create(&zv->zv_znode.z_range_avl, zfs_range_compare, sizeof (rl_t), offsetof(rl_t, r_node)); + zv->zv_znode.z_is_zvol = TRUE; + spin_lock_init(&zv->zv_lock); list_link_init(&zv->zv_next); |