Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp568428pxb; Sat, 10 Apr 2021 11:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwt0HHgbm92rxB2CzZIN/x4qNNDmgaboCybmVPFJodqhblbZn1Rop0Llpec21tl8ZJyXPb X-Received: by 2002:a17:90b:2482:: with SMTP id nt2mr12117601pjb.13.1618079753498; Sat, 10 Apr 2021 11:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618079753; cv=none; d=google.com; s=arc-20160816; b=gKywL12o/ktCCR0SevC5rhhjBu3eKigmMYOLdrYRLm5xINze/33YmIbrTY/uYC6Fqz LIi4VKRSIrk4mVvKRWoERjH/yCIQuSmVQtCKkYbjiRvVHPQgdDsFJj+yjO/xx/vJBhQC NgtUXNOC6a3EGqhqhyjPP/wsSHQ9dyTfQtE6348FkCdd/WduQ552F0nVS6hXHoyn2NDI 6O0AoROSpm9TtgTB3CAYeoTloWixLQMVsLj3dth+aaN2XUJUBZ7zrCxgbMNldXMKopia U4NG0W4Hg+Ct23TF1JxLnGLwqHss1coLjAJLYnBjrCPkjFe9ND3dw7R8J5LA1TNKL8QO jAGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2dC787zwfC9seCDsKW+A6iUhqgjT6rxXyNV4rCXLEXE=; b=xCIgqrAOW7uEpBRH6DiL+yOhYrYCFrWrKbt0jGEBmU3etFgp6tbb7wz0pnzibzsm3F LRQb0g5g9p9WYTMbQH6TPnmFKUsQ7wIrmL3t9+pPt8AgXBEgjUp9pN8iIylgsCiASROb jazOC+snW5KarUUaInAKbIqH1wb9rfX9wV+DjDE4Ib/IWNjwnYw/61zAEBIIM8M/6OBX uGWcMCK6GWkk0fAk6f8S0SosZpPKxMaiAb53T3pKbZgSXlGxwJSNwstWVCaGPL6hJdU5 J3LXQ1DBwutK6SXWvaprOlvVlu1ojcLrxEo9OhLLWVoNZ/AzE744v/blqKOeMWZItgdd eEbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OItV+Zvc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z15si6641769pgl.404.2021.04.10.11.35.38; Sat, 10 Apr 2021 11:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OItV+Zvc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234832AbhDJSfT (ORCPT + 99 others); Sat, 10 Apr 2021 14:35:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:40784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234513AbhDJSfS (ORCPT ); Sat, 10 Apr 2021 14:35:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 15DD361056; Sat, 10 Apr 2021 18:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618079703; bh=C7m35dBPZkTJGHIfRr1qfkEyGCGrSvUdD/3tqwQKAVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OItV+ZvcUdehFguevYrNaezIiePtz8j2bxxXBTvHO7yKXVMVu0RqvqyEmqPSecIVi /r7yKK1oQUALQvnt5MOo6s94xdWJGIEZglgQ38Xewmizk3D/W5LYfLChweo6/A1Tk7 1HZEoym8xX/1P67yiBsnh6VjqEkdezky3lCYLpSrW3UXQYohEOoJ9Y/pP3/KaMNN5Y LKKKLP3lmM0aR8Si/K58JOhWzDMBNudPr1sIAxATgM/8dAK6mumaVcjrNOGcpKGKIa EIzMMum3bpYVhwMTo5dkfMrhzWaO8/hqm+Jwlub6k0J1uMYO/pw2LJx/ZcSmFe3LNn ATeePAVTOZmow== Date: Sat, 10 Apr 2021 11:35:01 -0700 From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Mike Snitzer , kernel-team@android.com Cc: stable@vger.kernel.org Subject: Re: [PATCH] dm verity: fix unaligned block size Message-ID: References: <20210410160151.1224296-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210410160151.1224296-1-jaegeuk@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, this patch is totally wrong. Let me dig out more. On 04/10, Jaegeuk Kim wrote: > From: Jaegeuk Kim > > When f->roots is 2 and block size is 4096, it will gives unaligned block size > length in the scsi command like below. Let's allocate dm_bufio to set the block > size length to match IO chunk size. > > E sd 0 : 0:0:0: [sda] tag#30 request not aligned to the logical block size > E blk_update_request: I/O error, dev sda, sector 10368424 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 > E device-mapper: verity-fec: 254:8: FEC 9244672: parity read failed (block 18056): -5 > > Fixes: ce1cca17381f ("dm verity: fix FEC for RS roots unaligned to block size") > Cc: stable@vger.kernel.org > Signed-off-by: Jaegeuk Kim > --- > drivers/md/dm-verity-fec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/dm-verity-fec.c b/drivers/md/dm-verity-fec.c > index 66f4c6398f67..656238131dd7 100644 > --- a/drivers/md/dm-verity-fec.c > +++ b/drivers/md/dm-verity-fec.c > @@ -743,7 +743,7 @@ int verity_fec_ctr(struct dm_verity *v) > } > > f->bufio = dm_bufio_client_create(f->dev->bdev, > - f->roots << SECTOR_SHIFT, > + 1 << v->data_dev_block_bits, > 1, 0, NULL, NULL); > if (IS_ERR(f->bufio)) { > ti->error = "Cannot initialize FEC bufio client"; > -- > 2.31.1.295.g9ea45b61b8-goog