Page MenuHomeFreeBSD

Make 'zfs release' accept a filesystem instead of only snapshots
Needs ReviewPublic

Authored by allanjude on Nov 2 2015, 10:31 PM.

Details

Reviewers
mahrens
bapt
smh
Group Reviewers
ZFS
Summary

If you want to release all holds of tag 'foo' from pool/fs@snap1 and pool/fs@snap2 ..., you currently have to run 'zfs release'
with each snapshot as an argument. With this change:
zfs release foo pool/fs
will iterate over each snapshot, and release any hold with tag=foo
zfs release -r foo pool/fs
would also release tag 'foo' from pool/fs/child@othersnap etc.

Diff Detail

Repository
rS FreeBSD src repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1011
Build 1014: arc lint + arc unit

Event Timeline

allanjude updated this revision to Diff 9900.Nov 2 2015, 10:31 PM
allanjude retitled this revision from to Make 'zfs release' accept a filesystem instead of only snapshots.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: ZFS, mahrens, smh, bapt.
mahrens edited edge metadata.Nov 2 2015, 10:48 PM

What is the use case for this? AFAIK it isn't possible to create all those holds with one zfs command (there's just "zfs holds -r <snapshot>" which creates a hold on one snapshot per filesystem.

Also, the UI seems confusing because you can not do "zfs hold <fs>", (and there is no such thing as a hold on a filesystem) but you can do "zfs release <fs>".