Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2019 10:00:32 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350893 - head/cddl/contrib/opensolaris/cmd/zfs
Message-ID:  <201908121000.x7CA0WSI036072@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Mon Aug 12 10:00:32 2019
New Revision: 350893
URL: https://svnweb.freebsd.org/changeset/base/350893

Log:
  Allow ZVOL bookmarks to be listed recursively
  
  Many thanks to cryx-freebsd@h3q.com for reporting the problem and
  submitting a fix.  I have chosen to take an equivalent but textually
  different patch from ZoL just to avoid increasing divergence between
  OpenZFS flavours.
  
  ZoL commit:	zfsonlinux/zfse33da554c5daf0103b093f44ab5b90ad6c064c3f
  Author:		loli10K <ezomori.nozomu@gmail.com>
  Date:		Wed Sep 7 19:34:20 2016 +0200
  PR:		197821
  Submitted by:	cryx-freebsd@h3q.com (alternative version)
  Reported by:	cryx-freebsd@h3q.com
  Obtained from:	ZoL
  MFC after:	1 week

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c	Mon Aug 12 09:20:02 2019	(r350892)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c	Mon Aug 12 10:00:32 2019	(r350893)
@@ -445,13 +445,13 @@ zfs_for_each(int argc, char **argv, int flags, zfs_typ
 
 		/*
 		 * If we're recursive, then we always allow filesystems as
-		 * arguments.  If we also are interested in snapshots, then we
-		 * can take volumes as well.
+		 * arguments.  If we also are interested in snapshots or
+		 * bookmarks, then we can take volumes as well.
 		 */
 		argtype = types;
 		if (flags & ZFS_ITER_RECURSE) {
 			argtype |= ZFS_TYPE_FILESYSTEM;
-			if (types & ZFS_TYPE_SNAPSHOT)
+			if (types & (ZFS_TYPE_SNAPSHOT | ZFS_TYPE_BOOKMARK))
 				argtype |= ZFS_TYPE_VOLUME;
 		}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908121000.x7CA0WSI036072>