Btrfs-progs: convert: do not clear nodatasum flag in inode item

With the current btrfs-convert, if we convert a ext4 without data checksum,
it'd not set nodatasum flag in inode item, nor create csum item, reading
file ends up with checksum errors.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Liu Bo 2017-06-28 15:29:49 -06:00 committed by David Sterba
parent c58d13eeba
commit 188f9c889a
1 changed files with 1 additions and 1 deletions

View File

@ -743,7 +743,7 @@ static int ext2_check_state(struct btrfs_convert_context *cctx)
static void ext2_convert_inode_flags(struct btrfs_inode_item *dst,
struct ext2_inode *src)
{
u64 flags = 0;
u64 flags = btrfs_stack_inode_flags(dst);
COPY_ONE_EXT2_FLAG(flags, src, APPEND);
COPY_ONE_EXT2_FLAG(flags, src, SYNC);