From 65867e74b276a6cd31259754b5dedc9dc89dd6bb Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Wed, 2 Jul 2025 07:22:50 +0200 Subject: [PATCH] - bcachefs does support read-only snapshots now --- doc/bcachefs.txt | 3 --- snapper/BcachefsUtils.cc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/bcachefs.txt b/doc/bcachefs.txt index b1538f29..dae72ff9 100644 --- a/doc/bcachefs.txt +++ b/doc/bcachefs.txt @@ -5,9 +5,6 @@ TODOs (at least): - ioctl for snapshot creation takes path instead of fd -- read-only snapshots not supported by bcachefs - - background comparison started anyway - - check if a directory is a snapshot - get ioctl defines from a header file or use a library diff --git a/snapper/BcachefsUtils.cc b/snapper/BcachefsUtils.cc index 1d328a78..a6d5a013 100644 --- a/snapper/BcachefsUtils.cc +++ b/snapper/BcachefsUtils.cc @@ -100,7 +100,7 @@ namespace snapper args.flags = BCH_SUBVOL_SNAPSHOT_CREATE; if (read_only) - args.flags |= BCH_SUBVOL_SNAPSHOT_RO; // TODO does not work + args.flags |= BCH_SUBVOL_SNAPSHOT_RO; args.dirfd = (__u32) fddst; args.mode = 0777; args.dst_ptr = (__u64) name.c_str(); -- 2.47.3