linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lakshmipathi.G" <lakshmipathi.g@gmail.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item
Date: Thu, 29 Jun 2017 10:07:52 +0530	[thread overview]
Message-ID: <CAKuJGC_VBpnqtEX-9DK371gi4-zCgpibK4E04mUBBnrg7NKxXA@mail.gmail.com> (raw)
In-Reply-To: <20170628212949.25403-1-bo.li.liu@oracle.com>

Could you please add also a test-script for this interesting issue
under tests/convert-tests
(If its not already there)?. thanks.

----
Cheers,
Lakshmipathi.G
http://www.giis.co.in http://www.webminal.org


On Thu, Jun 29, 2017 at 2:59 AM, Liu Bo <bo.li.liu@oracle.com> wrote:
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-06-29  4:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 21:29 [PATCH] Btrfs-progs: convert: do not clear nodatasum flag in inode item Liu Bo
2017-06-29  4:37 ` Lakshmipathi.G [this message]
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=CAKuJGC_VBpnqtEX-9DK371gi4-zCgpibK4E04mUBBnrg7NKxXA@mail.gmail.com \
    --to=lakshmipathi.g@gmail.com \
    --cc=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).