Allow ZVOL bookmarks to be listed recursively

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #4503
Closes #5072
This commit is contained in:
loli10K 2016-09-07 19:34:20 +02:00 committed by Brian Behlendorf
parent 43924bfeaa
commit e33da554c5

View File

@ -444,13 +444,13 @@ zfs_for_each(int argc, char **argv, int flags, zfs_type_t types,
/* /*
* If we're recursive, then we always allow filesystems as * If we're recursive, then we always allow filesystems as
* arguments. If we also are interested in snapshots, then we * arguments. If we also are interested in snapshots or
* can take volumes as well. * bookmarks, then we can take volumes as well.
*/ */
argtype = types; argtype = types;
if (flags & ZFS_ITER_RECURSE) { if (flags & ZFS_ITER_RECURSE) {
argtype |= ZFS_TYPE_FILESYSTEM; argtype |= ZFS_TYPE_FILESYSTEM;
if (types & ZFS_TYPE_SNAPSHOT) if (types & (ZFS_TYPE_SNAPSHOT | ZFS_TYPE_BOOKMARK))
argtype |= ZFS_TYPE_VOLUME; argtype |= ZFS_TYPE_VOLUME;
} }