mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sunwook Eom <speed.eom@samsung.com>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>,
	device-mapper development <dm-devel@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	sunwook5492@gmail.com
Subject: Re: [PATCH] dm verity fec: Don't add data_blocks to block
Date: Thu, 9 Apr 2020 15:40:07 +0900	[thread overview]
Message-ID: <4a4a914c-c020-4b45-7cba-5aed816f0545@samsung.com> (raw)
In-Reply-To: <CABCJKudWRmdyJAxjnTs+NiRJVnhDUQfzGO3sVKZNJoQ5Qi-aew@mail.gmail.com>


On 20. 4. 8. 오전 12:55, Sami Tolvanen wrote:
> On Mon, Apr 6, 2020 at 11:54 PM Sunwook Eom <speed.eom@samsung.com> wrote:
>> Even if block type is metadata,
>> block in verity_fec_decode() has already the right block number.
>> So there is no need to add data_blocks to block.
> Is this also true if the hashes are on a separate block device?
>
> The idea here is that the error correction data was computed over both
> data and hash blocks, as if they were concatenated, and we want to
> calculate the logical block number based on that. I agree that the
> code doesn't look quite right though. Should we use something like
> this instead?
>
>      if (type == DM_VERITY_BLOCK_TYPE_METADATA)
>              block = block - v->hash_start + v->data_blocks;
>
> Sami
>
>
You're right. I missed the case that hashes are on a separate block device.

And, the code you wrote seems to be correct.

If you don't mind, I'll send a new version of this patch.

Thank you for the review.


Sunwook







  reply	other threads:[~2020-04-09  6:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200407065340epcas1p13e6e5ad6131f0a94d3ed1e8360353a82@epcas1p1.samsung.com>
2020-04-07  6:53 ` Sunwook Eom
2020-04-07 15:55   ` Sami Tolvanen
2020-04-09  6:40     ` Sunwook Eom [this message]
2020-04-09 22:34       ` Sami Tolvanen

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=4a4a914c-c020-4b45-7cba-5aed816f0545@samsung.com \
    --to=speed.eom@samsung.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=snitzer@redhat.com \
    --cc=sunwook5492@gmail.com \
    /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

all inboxes | Powered by JetHome®