Re: [PATCH v6 2/3] btrfs: initial fsverity support
From: Eric Biggers <ebiggers@kernel.org>
Date: 2021-09-15 20:45:28
Also in:
linux-fscrypt
On Tue, Sep 14, 2021 at 11:34:29AM -0700, Boris Burkov wrote:
quoted
Okay, so it is used. (Due to the macro, it didn't show up when grepping.) Doesn't it defeat the purpose of a ro_compat inode flag if the whole filesystem is marked with a ro_compat feature flag, though? I thought that the point of the ro_compat inode flag is to allow old kernels to mount the filesystem read-write, with only verity files being forced to read-only. That would be more flexible than ext4's implementation of fs-verity which forces the whole filesystem to read-only. But it seems you're forcing the whole filesystem to read-only anyway? - EricI was thinking of it in terms of "RO compat is the goal" and having new inode flags totally broke that and was treated as a corruption of the inode regardless of the fs being ro/rw. I think a check on a live fs would just flip the fs ro, which was the goal anyway, but a check that happened during mount would fail the mount, even for a read-only fs. Making it fully per file would be pretty cool! The only thing really missing as far as I can tell is a way to mark a file read only with the same semantics fsverity uses from within btrfs.
I don't understand. Why are you bothering with the ro_compat inode flag at all if it doesn't actually work? - Eric