mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
synced 2024-11-23 17:53:39 +08:00
mkfs.f2fs: support fsverity feature
This is aligned to f2fs which reserves fsverity feature bit. Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
This commit is contained in:
parent
865a3ead18
commit
76cd37753a
@ -439,6 +439,9 @@ void print_sb_state(struct f2fs_super_block *sb)
|
||||
if (f & cpu_to_le32(F2FS_FEATURE_ENCRYPT)) {
|
||||
MSG(0, "%s", " encrypt");
|
||||
}
|
||||
if (f & cpu_to_le32(F2FS_FEATURE_VERITY)) {
|
||||
MSG(0, "%s", " verity");
|
||||
}
|
||||
if (f & cpu_to_le32(F2FS_FEATURE_BLKZONED)) {
|
||||
MSG(0, "%s", " blkzoned");
|
||||
}
|
||||
|
@ -552,6 +552,7 @@ enum {
|
||||
#define F2FS_FEATURE_FLEXIBLE_INLINE_XATTR 0x0040
|
||||
#define F2FS_FEATURE_QUOTA_INO 0x0080
|
||||
#define F2FS_FEATURE_INODE_CRTIME 0x0100
|
||||
#define F2FS_FEATURE_VERITY 0x0400 /* reserved */
|
||||
|
||||
#define MAX_VOLUME_NAME 512
|
||||
|
||||
@ -730,10 +731,13 @@ struct f2fs_extent {
|
||||
/*
|
||||
* i_advise uses FADVISE_XXX_BIT. We can add additional hints later.
|
||||
*/
|
||||
#define FADVISE_COLD_BIT 0x01
|
||||
#define FADVISE_LOST_PINO_BIT 0x02
|
||||
#define FADVISE_ENCRYPT_BIT 0x04
|
||||
#define FADVISE_ENC_NAME_BIT 0x08
|
||||
#define FADVISE_COLD_BIT 0x01
|
||||
#define FADVISE_LOST_PINO_BIT 0x02
|
||||
#define FADVISE_ENCRYPT_BIT 0x04
|
||||
#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_encrypt(fi) ((fi)->i_advise & FADVISE_ENCRYPT_BIT)
|
||||
#define file_enc_name(fi) ((fi)->i_advise & FADVISE_ENC_NAME_BIT)
|
||||
|
@ -83,6 +83,8 @@ static void parse_feature(const char *features)
|
||||
features++;
|
||||
if (!strcmp(features, "encrypt")) {
|
||||
c.feature |= cpu_to_le32(F2FS_FEATURE_ENCRYPT);
|
||||
} else if (!strcmp(features, "verity")) {
|
||||
c.feature |= cpu_to_le32(F2FS_FEATURE_VERITY);
|
||||
} else if (!strcmp(features, "extra_attr")) {
|
||||
c.feature |= cpu_to_le32(F2FS_FEATURE_EXTRA_ATTR);
|
||||
} else if (!strcmp(features, "project_quota")) {
|
||||
|
Loading…
Reference in New Issue
Block a user