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

linux: overlayfs support #14070

Closed
wants to merge 4 commits into from
Closed

linux: overlayfs support #14070

wants to merge 4 commits into from

Commits on Oct 28, 2022

  1. Remove zpl_revalidate: fix snapshot rollback

    Open files, which aren't present in the snapshot, which is being
    roll-backed to, need to disappear from the visible VFS image of
    the dataset.
    
    Kernel provides d_drop function to drop invalid entry from
    the dcache, but inode can be referenced by dentry multiple dentries.
    
    The introduced zpl_d_drop_aliases function walks and invalidates
    all aliases of an inode.
    
    Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
    snajpa authored and Ryan Moeller committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    147e958 View commit details
    Browse the repository at this point in the history
  2. debug: add VERIFY_{IMPLY,EQUIV} variants

    This allows for much cleaner VERIFY-level assertions.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar authored and Ryan Moeller committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    7d57ff2 View commit details
    Browse the repository at this point in the history
  3. zfs_rename: restructure to have cleaner fallbacks

    This is in preparation for RENAME_EXCHANGE and RENAME_WHITEOUT support
    for ZoL, but the changes here allow for far nicer fallbacks than the
    previous implementation (the source and target are re-linked in case of
    the final link failing).
    
    In addition, a small cleanup was done for the "target exists but is a
    different type" codepath so that it's more understandable.
    
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar authored and Ryan Moeller committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    8b8e122 View commit details
    Browse the repository at this point in the history
  4. zfs_rename: support RENAME_* flags

    Implement support for Linux's RENAME_* flags (for renameat2). Aside from
    being quite useful for userspace (providing race-free ways to exchange
    paths and implement mv --no-clobber), they are used by overlayfs and are
    thus required in order to use overlayfs-on-ZFS.
    
    In order for us to represent the new renameat2(2) flags in the ZIL, we
    create two new transaction types for the two flags which need
    transactional-level support (RENAME_EXCHANGE and RENAME_WHITEOUT).
    RENAME_NOREPLACE does not need any ZIL support because we know that if
    the operation succeeded before creating the ZIL entry, there was no file
    to be clobbered and thus it can be treated as a regular TX_RENAME.
    
    Cc: Pavel Snajdr <snajpa@snajpa.net>
    Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
    cyphar authored and Ryan Moeller committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    0f88b9a View commit details
    Browse the repository at this point in the history