[PATCH v6 0/5] ceph: support subvolume quarantine

From: Alex Markuze

Date: Sun Oct 25 2026 - 14:43:37 EST


CephFS subvolume quarantine restricts ordinary access while allowing
recovery clients with q/Q MDS auth caps to operate. Add client support
for quarantine notifications and enforce them on cached access paths.

Based on the testing branch of https://github.com/ceph/ceph-client.git,
commit ed0502cb11f8 ("ceph: validate encoded xattr name lengths").
The full base is recorded below. The dcache and fscrypt prerequisites
are included in this five-patch series.

Changes since v5:
- Describe the dcache export as a prerequisite and remove Reported-by
and Closes tags for it.
- Reject foreign, disconnected and unhashed non-root aliases in ancestry
walks while accepting the live, unhashed superblock root.
- Reset quarantine state only when the lost or reconnecting session is
the reporting MDS rank, including when its cap is already absent.
- Check saved authorization's generation even when no inode is marked.
- Check snapshot path access and acquire normal wanted caps after
quarantine authorization.
- Clear detached xattr-buffer ownership after releasing its reference.
- Use synchronous CREATE for new inodes with an LSM security blob,
before async preparation, including before feature negotiation.
- Keep an existing quarantine mark across a zero-error IMPORT while
processing imported caps and negative quarantine errors normally.
- Use the incoming wire cap mask for clear decisions, so PIN-only updates
cannot acquire clear authority from capability bits retained in a merge.
- Update encrypted-symlink and capability comments to match their
interfaces.

Validation: GCC x86_64 builds with fscrypt, ACLs and security enabled
passed W=1 vmlinux/modules for the final tree and the recording patch.
Twenty-six extracted-code quarantine state tests passed, using mocked
kernel context. Live cluster, boot, KASAN/lockdep, LSM policy,
failover, performance and LKMM validation have not been run.

Previous submission:
https://lore.kernel.org/r/cover.1792527529.git.amarkuze@xxxxxxxxxx/

Alex Markuze (5):
dcache: export d_find_alias_rcu() for modular filesystems
fscrypt: allow filesystems to disable symlink target caching
ceph: add subvolume quarantine wire definitions
ceph: record subvolume quarantine from MDS cap updates
ceph: fail quarantined subvolume access with EACCES

fs/ceph/acl.c | 33 +-
fs/ceph/addr.c | 72 ++-
fs/ceph/caps.c | 323 +++++++++++-
fs/ceph/crypto.c | 1 +
fs/ceph/debugfs.c | 1 +
fs/ceph/dir.c | 54 +-
fs/ceph/file.c | 82 ++-
fs/ceph/inode.c | 956 ++++++++++++++++++++++++++++++++++-
fs/ceph/ioctl.c | 13 +
fs/ceph/mds_client.c | 26 +-
fs/ceph/mds_client.h | 30 +-
fs/ceph/super.c | 4 +
fs/ceph/super.h | 101 +++-
fs/ceph/xattr.c | 60 ++-
fs/crypto/hooks.c | 28 +-
fs/dcache.c | 1 +
include/linux/ceph/ceph_fs.h | 13 +
include/linux/fscrypt.h | 7 +
net/ceph/ceph_common.c | 2 +
19 files changed, 1706 insertions(+), 101 deletions(-)


base-commit: ed0502cb11f84fff29f374238e526ae94d9bdfde