From 188f9c889a062307cf18fdacf91381f29f12bf6d Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Wed, 28 Jun 2017 15:29:49 -0600 Subject: [PATCH] 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 Signed-off-by: David Sterba --- convert/source-ext2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert/source-ext2.c b/convert/source-ext2.c index 275cb89f..38c3cd33 100644 --- a/convert/source-ext2.c +++ b/convert/source-ext2.c @@ -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);