Hi Eric, On 2018/3/29 2:15, Eric Biggers wrote: > Reserve an F2FS feature flag and inode flag for fs-verity. This is an > in-development feature that is planned be discussed at LSF/MM 2018 [1]. > It will provide file-based integrity and authenticity for read-only > files. Most code will be in a filesystem-independent module, with > smaller changes needed to individual filesystems that opt-in to > supporting the feature. An early prototype supporting F2FS is available > [2]. Reserving the F2FS on-disk bits for fs-verity will prevent users > of the prototype from conflicting with other new F2FS features. > > Note that we're reserving the inode flag in f2fs_inode.i_advise, which > isn't really appropriate since it's not a hint or advice. But > ->i_advise is already being used to hold the 'encrypt' flag; and F2FS's > ->i_flags uses the generic FS_* values, so it seems ->i_flags can't be > used for an F2FS-specific flag without additional work to remove the > assumption that ->i_flags uses the generic flags namespace. At a glance, this is a VFS feature, can we search free slot, and define FS_VERITY_FL like other generic flags, so we can intergrate this flag into f2fs_inode::i_flags? And how about applying this patch inside the patchset of new fsverity feature? Since once fsverity feature has some design modification, I worry about that may be we need to change this bit? result in disk layout incompatibility. Thanks, > > [1] https://marc.info/?l=linux-fsdevel&m=151690752225644 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/mhalcrow/linux.git/log/?h=fs-verity-dev > > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx> > --- > fs/f2fs/f2fs.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index ae69dc358401..96d7809c4541 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -146,6 +146,7 @@ struct f2fs_mount_info { > #define F2FS_FEATURE_QUOTA_INO 0x0080 > #define F2FS_FEATURE_INODE_CRTIME 0x0100 > #define F2FS_FEATURE_LOST_FOUND 0x0200 > +#define F2FS_FEATURE_VERITY 0x0400 /* reserved */ > > #define F2FS_HAS_FEATURE(sb, mask) \ > ((F2FS_SB(sb)->raw_super->feature & cpu_to_le32(mask)) != 0) > @@ -598,6 +599,7 @@ enum { > #define FADVISE_ENC_NAME_BIT 0x08 > #define FADVISE_KEEP_SIZE_BIT 0x10 > #define FADVISE_HOT_BIT 0x20 > +#define FADVISE_VERITY_BIT 0x40 /* reserved */ > > #define file_is_cold(inode) is_file(inode, FADVISE_COLD_BIT) > #define file_wrong_pino(inode) is_file(inode, FADVISE_LOST_PINO_BIT) > -- To unsubscribe from this list: send the line "unsubscribe linux-fscrypt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html