Repository navigation
Conversation
Crow-Control
left a comment
There was a problem hiding this comment.
I'm not to much into bookmarks/snapshots to review your TODO's and such.
But I do have a few notes about terminology.
I do notice about 20% of this PR seems to be renaming snapshot to target, I don't think thats really needed and might needlessly confuse users.
|
I addressed most of the review comments. Open issues:
|
|
We talked about this PR on the OpenZFS montly call. From the notes:
|
7410710 to
fa99694
Compare
|
Changes in the force-push:
Planned changes after next review round:
|
cbacbc2 to
95bb9e7
Compare
|
95bb9e7 to
93972b0
Compare
932e69e to
8be1578
Compare
|
The The CentOS 7 failure: doesn't really seem to be a failure (I did not mark it as SKIP anywhere) The coverage test fails in ztest, but I cannot reproduce the crashes on my machine. @ahrens @pcd1193182 I think this PR is ripe for another round of code review. See the checkboxes in prior comments for what changed since the last one. Thanks! |
Sorry about that, it was a CI related infrastructure failure was has now been sorted out for the next run.
Right, unrelated and recently fixed in master by e5030fb.
The ztest failures look to be unrelated, but the reported memory leak should be looked in to. |
8be1578 to
12d6367
Compare
Opened the respective PRs, one for each commit. |
|
@problame thanks for splitting out those small changes. They've now been merged. |
febe935 to
a737442
Compare
a737442 to
9f1b054
Compare
|
addressed @ahrens 's last review comments:
|
|
Something about the codecov upload / processing seems to be broken again (cc @behlendorf ) Apart from that, all pending review remarks have been addressed. |
This feature allows copying existing bookmarks using
```
zfs bookmark fs#target fs#newbookmark
```
There are some niche use cases for such functionality,
e.g. when using bookmarks as markers for replication progress.
Copying redaction bookmarks produces a normal bookmark that
cannot be used for redacted send (we are not duplicating
the redaction object).
ZCP support for bookmarking (both creation and copying) will be
implemented in a separate patch based on this work.
Overview:
- Terminology:
- source = existing snapshot or bookmark
- new/bmark = new bookmark
- Implement bookmark copying in `dsl_bookmark.c`
- create new bookmark node
- copy source's `zbn_phys` to new's `zbn_phys`
- zero-out redaction object id in copy
- Extend existing bookmark ioctl nvlist schema to accept
bookmarks as sources
- => `dsl_bookmark_create_nvl_validate` is authoritative
- use `dsl_dataset_is_before` check for both snapshot
and bookmark sources
- Adjust CLI
- refactor shortname expansion logic in `zfs_do_bookmark`
- Update man pages
- warn about redaction bookmark handling
- Add test cases
- CLI
- pyyzfs libzfs_core bindings
Signed-off-by: Christian Schwarz <me@cschwarz.com>
supports bookmark creation and cloning Signed-off-by: Christian Schwarz <me@cschwarz.com>
9f1b054 to
8967bcf
Compare
|
Addressed @pcd1193182 's remarks:
|
Codecov Report
@@ Coverage Diff @@
## master #9571 +/- ##
========================================
- Coverage 79% 79% -<1%
========================================
Files 385 385
Lines 122282 122372 +90
========================================
- Hits 96838 96791 -47
- Misses 25444 25581 +137
Continue to review full report at Codecov.
|
|
The CI failure seems like a flaky test. |
| @@ -22,11 +22,15 @@ | |||
|
|
|||
|
|
|||
| # https://stackoverflow.com/a/1695250 | |||
There was a problem hiding this comment.
I realize that this is "just" contrib code, but it would be preferable for the comment to explain the code. We could consider also linking to an external expanded explanation if needed, while weighing the risk of this link becoming stale. I also realize you aren't adding this link, but if you have time, fixing this would be appreciated.
We could explain why we can't use the built-in python enums (presumably because we want to support pre-2.4 python installs); explain approximately what this code does (creates a new type?); and that this is the canonical way of doing so on old python. It may then not be necessary to include the external link.
There was a problem hiding this comment.
I just cargo-culted generalized the existing enum type constructor/generator to do what I needed it to do.
I'd guess the intention behind the link was to point a future developer to practical examples for enum type construction.
FWIW: The stackoverflow page is archived on archive.org ¯_(ツ)_/¯
I figure future work should replace _constants.py with code-generation anyways, so I guess this is not a blocker for merging this feature.
There was a problem hiding this comment.
This potentially looks like a good candidate to cleanup in another PR if someone is interested. Python 2 officially went EOL in January 2020 so bumping the minimum supported Python version to 3.4 makes sense. I tend to agree this doesn't need to block this feature.
| @@ -22,11 +22,15 @@ | |||
|
|
|||
|
|
|||
| # https://stackoverflow.com/a/1695250 | |||
There was a problem hiding this comment.
This potentially looks like a good candidate to cleanup in another PR if someone is interested. Python 2 officially went EOL in January 2020 so bumping the minimum supported Python version to 3.4 makes sense. I tend to agree this doesn't need to block this feature.
Add support for bookmark creation and cloning. Reviewed-by: Matt Ahrens <matt@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Christian Schwarz <me@cschwarz.com> Closes #9571
This feature allows copying existing bookmarks using
zfs bookmark fs#target fs#newbookmark
There are some niche use cases for such functionality,
e.g. when using bookmarks as markers for replication progress.
Copying redaction bookmarks produces a normal bookmark that
cannot be used for redacted send (we are not duplicating
the redaction object).
ZCP support for bookmarking (both creation and copying) will be
implemented in a separate patch based on this work.
Overview:
- Terminology:
- source = existing snapshot or bookmark
- new/bmark = new bookmark
- Implement bookmark copying in `dsl_bookmark.c`
- create new bookmark node
- copy source's `zbn_phys` to new's `zbn_phys`
- zero-out redaction object id in copy
- Extend existing bookmark ioctl nvlist schema to accept
bookmarks as sources
- => `dsl_bookmark_create_nvl_validate` is authoritative
- use `dsl_dataset_is_before` check for both snapshot
and bookmark sources
- Adjust CLI
- refactor shortname expansion logic in `zfs_do_bookmark`
- Update man pages
- warn about redaction bookmark handling
- Add test cases
- CLI
- pyyzfs libzfs_core bindings
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes openzfs#9571
Add support for bookmark creation and cloning. Reviewed-by: Matt Ahrens <matt@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Christian Schwarz <me@cschwarz.com> Closes openzfs#9571
This feature allows copying existing bookmarks using
There are some niche use cases for such functionality,
e.g. when using bookmarks as markers for replication progress.
Copying redaction bookmarks produces a normal bookmark that
cannot be used for redacted send (we are not duplicating
the redaction object).
ZCP support for bookmarking (both creation and copying) is implemented in a separate commit in this PR.
Overview:
dsl_bookmark.czbn_physto new'szbn_physbookmarks as sources
dsl_bookmark_create_nvl_validateis authoritativedsl_dataset_is_beforecheck for both snapshotand bookmark sources
zfs_do_bookmarkHow Has This Been Tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)Performance enhancement (non-breaking change which improves efficiency)Breaking change (fix or feature that would cause existing functionality to change)Checklist:
Signed-off-by.