diff options
author | Tahsin Erdogan <tahsin@google.com> | 2017-07-04 23:53:59 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-07-04 23:53:59 -0400 |
commit | 216d6b761acc27930dda13918e823464f8769b54 (patch) | |
tree | 1822f5c183c01eecbb03567d71e8a6bacac00d3d /lib/ext2fs/csum.c | |
parent | 76d1914303275912d70dd4f01fff1cc552a244f8 (diff) | |
download | e2fsprogs-216d6b761acc27930dda13918e823464f8769b54.tar.gz |
tune2fs: update ea_inode hashes when fs uuid changes
Extended attribute inodes maintain a crc32c hash that is used for
deduplication. The crc seed derives from uuid so ea_inode hashes
must be updated when uuid changes.
The ea_inode hash is also incorporated into the xattr entry e_hash
so the entries that reference the inode also must be updated.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/csum.c')
-rw-r--r-- | lib/ext2fs/csum.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c index e67850fa..214a0997 100644 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@ -34,7 +34,8 @@ void ext2fs_init_csum_seed(ext2_filsys fs) { if (ext2fs_has_feature_csum_seed(fs->super)) fs->csum_seed = fs->super->s_checksum_seed; - else if (ext2fs_has_feature_metadata_csum(fs->super)) + else if (ext2fs_has_feature_metadata_csum(fs->super) || + ext2fs_has_feature_ea_inode(fs->super)) fs->csum_seed = ext2fs_crc32c_le(~0, fs->super->s_uuid, sizeof(fs->super->s_uuid)); } |