[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206182336.1397715-44-neelx@suse.com>
Date: Fri, 6 Feb 2026 19:23:15 +0100
From: Daniel Vacek <neelx@...e.com>
To: Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
Eric Biggers <ebiggers@...nel.org>,
"Theodore Y. Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
David Sterba <dsterba@...e.com>
Cc: linux-block@...r.kernel.org,
Daniel Vacek <neelx@...e.com>,
linux-fscrypt@...r.kernel.org,
linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org,
Boris Burkov <boris@....io>
Subject: [PATCH v6 43/43] btrfs: disable send if we have encryption enabled
From: Josef Bacik <josef@...icpanda.com>
send needs to track the dir item values to see if files were renamed
when doing an incremental send. There is code to decrypt the names, but
this breaks the code that checks to see if something was overwritten.
Until this gap is closed we need to disable send on encrypted file
systems. Fixing this is straightforward, but a medium sized project.
Signed-off-by: Josef Bacik <josef@...icpanda.com>
Reviewed-by: Boris Burkov <boris@....io>
Signed-off-by: Daniel Vacek <neelx@...e.com>
---
v5: https://lore.kernel.org/linux-btrfs/62ce86b38e2575c542eed7fbe8d986e68496b1d7.1706116485.git.josef@toxicpanda.com/
* No changes since.
---
fs/btrfs/send.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index bf9a99a9d24d..a3aa95ce4f87 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -8095,6 +8095,12 @@ long btrfs_ioctl_send(struct btrfs_root *send_root, const struct btrfs_ioctl_sen
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
+ if (btrfs_fs_incompat(fs_info, ENCRYPT)) {
+ btrfs_err(fs_info,
+ "send with encryption enabled isn't currently suported");
+ return -EINVAL;
+ }
+
/*
* The subvolume must remain read-only during send, protect against
* making it RW. This also protects against deletion.
--
2.51.0
Powered by blists - more mailing lists