Re: [PATCH] dm verity fec: Don't add data_blocks to block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20. 4. 8. 오전 12:55, Sami Tolvanen wrote:
> On Mon, Apr 6, 2020 at 11:54 PM Sunwook Eom <speed.eom@xxxxxxxxxxx> 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







--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux