Browse Source

Now we should support the metadata_csum flag

pull/11/head
ngkaho1234 9 years ago
parent
commit
72e4738cc4
  1. 2
      lwext4/ext4_super.c
  2. 1
      lwext4/ext4_types.h

2
lwext4/ext4_super.c

@ -101,7 +101,7 @@ static bool ext4_sb_verify_csum(struct ext4_sblock *s)
static void ext4_sb_set_csum(struct ext4_sblock *s) static void ext4_sb_set_csum(struct ext4_sblock *s)
{ {
if (!ext4_sb_has_feature_read_only(s, if (!ext4_sb_has_feature_read_only(s,
EXT4_FEATURE_INCOMPAT_BG_USE_META_CSUM)) EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
return; return;
s->checksum = to_le32(ext4_sb_csum(s)); s->checksum = to_le32(ext4_sb_csum(s));

1
lwext4/ext4_types.h

@ -268,6 +268,7 @@ struct ext4_sblock {
#define EXT4_FEATURE_RO_COMPAT_SUPP \ #define EXT4_FEATURE_RO_COMPAT_SUPP \
(EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER | \ (EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER | \
EXT4_FEATURE_RO_COMPAT_METADATA_CSUM | \
EXT4_FEATURE_RO_COMPAT_LARGE_FILE | EXT4_FEATURE_RO_COMPAT_GDT_CSUM | \ EXT4_FEATURE_RO_COMPAT_LARGE_FILE | EXT4_FEATURE_RO_COMPAT_GDT_CSUM | \
EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \ EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \
EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \

Loading…
Cancel
Save