Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement bookmark copying & ZCP bookmark support #9571

Closed
wants to merge 2 commits into from

Commits on Feb 11, 2020

  1. implement bookmark copying

    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>
    problame committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    6573a6f View commit details
    Browse the repository at this point in the history
  2. zcp: add zfs.sync.bookmark

    supports bookmark creation and cloning
    
    Signed-off-by: Christian Schwarz <me@cschwarz.com>
    problame committed Feb 11, 2020
    Configuration menu
    Copy the full SHA
    8967bcf View commit details
    Browse the repository at this point in the history