From: Liu Bo <bo.li.liu@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item
Date: Wed, 28 Jun 2017 15:29:49 -0600 [thread overview]
Message-ID: <20170628212949.25403-1-bo.li.liu@oracle.com> (raw)
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>
---
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 1b0576b..64b95c5 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -742,7 +742,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);
--
2.5.0
next reply other threads:[~2017-06-28 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 21:29 Liu Bo [this message]
2017-06-29 4:37 ` [PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item Lakshmipathi.G
2017-06-30 7:59 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170628212949.25403-1-bo.li.liu@oracle.com \
--to=bo.li.liu@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).