Page MenuHomeFreeBSD

Extend 'zfs holds -r' to accept a dataset, instead of only a snapshot as input
ClosedPublic

Authored by allanjude on Oct 23 2015, 8:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 2:16 AM
Unknown Object (File)
Dec 11 2023, 3:45 PM
Unknown Object (File)
Nov 27 2023, 8:55 AM
Unknown Object (File)
Nov 23 2023, 3:41 PM
Unknown Object (File)
Nov 15 2023, 3:36 PM
Unknown Object (File)
Nov 9 2023, 2:25 PM
Unknown Object (File)
Nov 5 2023, 1:57 PM
Unknown Object (File)
Oct 28 2023, 10:29 PM
Subscribers

Details

Test Plan

zfs holds dataset@snapshot
zfs holds -r dataset@snapshot
zfs holds -r dataset

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 921
Build 921: arc lint + arc unit

Event Timeline

allanjude retitled this revision from to Extend 'zfs holds -r' to accept a dataset, instead of only a snapshot as input.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added a reviewer: dteske.
dteske edited edge metadata.

Nice work. I gauge this on style(9) rules (NULL used properly; '\0' used properly; proper comparison of pointer to NULL versus treating it as boolean; et cetera), validation of logic-reversal (== becomes !=), validation of removal of error message given context of change (allow dataset arguments as well as snapshots), and of course this change meets the goal of minimal-changes to reach desired effect.

Short of actually running the code myself, I'd say this patch looks dandy. [Again,] Nice work!

This revision is now accepted and ready to land.Oct 23 2015, 8:54 PM

This is a good start, but you also need to update the manpage and help message (see get_usage()).

Once this is in FreeBSD, would you consider upstreaming it to OpenZFS? (https://github.com/openzfs/openzfs)

allanjude edited edge metadata.

Updated with feedback from mahrens

add support for -d, to limit depth of search
add support for -p, to print values as literals (raw timestamp instead of date text)
update usage message
update man page

This revision now requires review to proceed.Oct 24 2015, 7:06 PM
bapt edited edge metadata.
This revision is now accepted and ready to land.Oct 24 2015, 7:07 PM

This is a good start, but you also need to update the manpage and help message (see get_usage()).

done (and more)

Once this is in FreeBSD, would you consider upstreaming it to OpenZFS? (https://github.com/openzfs/openzfs)

Of course.

cddl/contrib/opensolaris/cmd/zfs/zfs.8
275–278

I think you should also add a detailed description of the new -H, -p, and -d flags. (feel free to copy/paste the descriptions from "zfs list").

allanjude edited edge metadata.

Add missing text to man page

This revision now requires review to proceed.Oct 25 2015, 5:18 PM
mahrens edited edge metadata.
This revision is now accepted and ready to land.Oct 25 2015, 7:51 PM
bapt edited edge metadata.
smh edited edge metadata.
This revision was automatically updated to reflect the committed changes.