diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index 902b0a6b..7d1a3556 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -154,6 +154,7 @@ static struct field_set_info super_fields[] = { FLAG_ARRAY, 2 }, { "checksum", &set_sb.s_checksum, NULL, 4, parse_uint }, { "checksum_type", &set_sb.s_checksum_type, NULL, 1, parse_uint }, + { "encryption_level", &set_sb.s_encryption_level, NULL, 1, parse_uint }, { "error_count", &set_sb.s_error_count, NULL, 4, parse_uint }, { "first_error_time", &set_sb.s_first_error_time, NULL, 4, parse_time }, { "first_error_ino", &set_sb.s_first_error_ino, NULL, 4, parse_uint }, @@ -168,6 +169,7 @@ static struct field_set_info super_fields[] = { { "encrypt_algos", &set_sb.s_encrypt_algos, NULL, 1, parse_uint, FLAG_ARRAY, 4 }, { "encrypt_pw_salt", &set_sb.s_encrypt_pw_salt, NULL, 16, parse_uuid }, + { "lpf_ino", &set_sb.s_lpf_ino, NULL, 4, parse_uint }, { 0, 0, 0, 0 } }; diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 586b5b4c..a755cfac 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -688,7 +688,8 @@ struct ext2_super_block { __u32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/ __u8 s_log_groups_per_flex; /* FLEX_BG group size */ __u8 s_checksum_type; /* metadata checksum algorithm */ - __u16 s_reserved_pad; /* Padding to next 32bits */ + __u8 s_encryption_level; /* versioning level for encryption */ + __u8 s_reserved_pad; /* Padding to next 32bits */ __u64 s_kbytes_written; /* nr of lifetime kilobytes written */ __u32 s_snapshot_inum; /* Inode number of active snapshot */ __u32 s_snapshot_id; /* sequential ID of active snapshot */ @@ -715,7 +716,8 @@ struct ext2_super_block { __u32 s_backup_bgs[2]; /* If sparse_super2 enabled */ __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */ __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */ - __u32 s_reserved[101]; /* Padding to the end of the block */ + __le32 s_lpf_ino; /* Location of the lost+found inode */ + __le32 s_reserved[100]; /* Padding to the end of the block */ __u32 s_checksum; /* crc32c(superblock) */ }; diff --git a/lib/ext2fs/tst_super_size.c b/lib/ext2fs/tst_super_size.c index c536abd7..8e3c21fb 100644 --- a/lib/ext2fs/tst_super_size.c +++ b/lib/ext2fs/tst_super_size.c @@ -114,7 +114,8 @@ int main(int argc, char **argv) check_field(s_raid_stripe_width, 4); check_field(s_log_groups_per_flex, 1); check_field(s_checksum_type, 1); - check_field(s_reserved_pad, 2); + check_field(s_encryption_level, 1); + check_field(s_reserved_pad, 1); check_field(s_kbytes_written, 8); check_field(s_snapshot_inum, 4); check_field(s_snapshot_id, 4); @@ -138,7 +139,8 @@ int main(int argc, char **argv) check_field(s_backup_bgs, 8); check_field(s_encrypt_algos, 4); check_field(s_encrypt_pw_salt, 16); - check_field(s_reserved, 101 * 4); + check_field(s_lpf_ino, 4); + check_field(s_reserved, 100 * 4); check_field(s_checksum, 4); do_field("Superblock end", 0, 0, cur_offset, 1024); #endif