[lkml]   [2020]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] dm verity fec: Don't add data_blocks to block
On Mon, Apr 6, 2020 at 11:54 PM Sunwook Eom <> 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?

block = block - v->hash_start + v->data_blocks;


 \ /
  Last update: 2020-04-07 17:56    [W:0.047 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site