Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1500243pxb; Wed, 30 Mar 2022 05:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymKMNU92ye/iEPMDTHPDrjL91AWXpSiPGQ+DcvCYKXF01EkoPnkto3DeTXAZYyp3AP/cBd X-Received: by 2002:a05:6602:1648:b0:647:9f39:1272 with SMTP id y8-20020a056602164800b006479f391272mr10974837iow.146.1648642036881; Wed, 30 Mar 2022 05:07:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648642036; cv=none; d=google.com; s=arc-20160816; b=shJZjsmoTmBM5CA+cmc4dltkE4BvRiqXPvoNsJHARYaFtNjtEKlTUFUDGA52SSxwy2 jZEjGWbb8re3X4GriJfA+Q3m8P59SV7V1ig66cRsG0JNwcR1Iyv5+eNVKp0aN9xYNddf W0BdBQI86FresUgOsCih+ASlRjgD5I4ycgXBHUxzwRHPhytZOMY2V4TEAcYmIhHqI414 VeWJy9UlVhmhoYo4OojrpfMVFxtKOOAwAVSfhFa+/xtVQUtovgzEmdcLQy3aewzp1wmy DgljybrxrBrDSipSTFJQrMHa6E5pXlrRwOKj8zn1cA13KX9ObkBGY10ibym5zfkF1v5e pu0g== 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=yIT4p7ShXHLUNOjV8CvgepES5xgtr9srlJOvqbKocNI=; b=bbMizaLXbdep1QSemfGonukcYz/hB3SYSl0O88zYxx3b3OeTSknBtLBz1fR5QpIIIF j5qfrp41/MhOrCrWXxyFxpYBUXt/0Y7rnFVO0pMM7+eF1ckaTFk4VMYrcbmNK12bgs5f Dbevgdwr17UjIUyEh5uvelrnm4RbnU9voeXwuhhafxB8JLCWyrq1xobHsZLJu2VQWgSC 69s6UtnyJXu60Ezo8Ko3UgFvk0E+hCaXA46GYYf/gma6k7SoRfxASQ/AUGIz687bo8m0 P5yLZIMTIxDXvL+nmkz5ahVZDf3gNdHZJ18C+6T7PmsxRotDXN1yK8ueh+Qbed2GPQq0 MJsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@osandov-com.20210112.gappssmtp.com header.s=20210112 header.b=kjeNyVLD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a92d40e000000b002c7c7bfb6dbsi18075562ilm.121.2022.03.30.05.07.03; Wed, 30 Mar 2022 05:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@osandov-com.20210112.gappssmtp.com header.s=20210112 header.b=kjeNyVLD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241088AbiC2T7P (ORCPT + 99 others); Tue, 29 Mar 2022 15:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241082AbiC2T7K (ORCPT ); Tue, 29 Mar 2022 15:59:10 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 873217807C for ; Tue, 29 Mar 2022 12:57:26 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id w8so18606151pll.10 for ; Tue, 29 Mar 2022 12:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yIT4p7ShXHLUNOjV8CvgepES5xgtr9srlJOvqbKocNI=; b=kjeNyVLDw5gfpGN6mw79/GvJcQUnO9h4KG7JQXWW7+lMBvuE7+gpRGnoM9tHv09Qv9 t2l3lEwvIoLb/JEa5uMXY2LTipPPBIBgtR+UiX4uOtoeAnzCROOS0e5tya/scJYnCTPL e0d8gYrRvsICGZMjGtanaku1+tmyy4ceY3YSr1RnDFPNKD3Rh2+0TbZgzAWAHGw/TlDM 1bMrL0m33jyeKj8iwYCHUoMtOroc3r1Uc0pYHtQulZjZRKzFNdrssTorQDj4I/z7kPVD ZqSmsB62Lv0WoghLr31QWyoOFI513dDOm68umOnNz8WCRUC4fIPgqQf3K1FUKyqD6qeW x0OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yIT4p7ShXHLUNOjV8CvgepES5xgtr9srlJOvqbKocNI=; b=vHaXzfvud/MWqOIwWqkfmripmkj/ca7tL3zjHY0wVgU21Q0KhiptijFws8rQwDxGHS 9oIEBvkmyb8KhAJt5sDvXSmGLRW0oYL9FXZnbGifPbmEYwrvLv6Dx3GE2y5Dw5kSk5TF lFdmze0qapNpEj5hQ9ry2FFX6+ZaCiFfJ8Fn5FlD/S8Fj7yfkHbvsbaK4u57RJvhrGao UXoDfpnvAsoqg/ou6WVgFfGCxR4Eseafy84Qz03IkKRGh3QRNBHhJz+hq5ENn4M7uN2s N0KvOZxINffvexUtVGiAZwaYijvey+itICjnFUuPY6EWHc7UzzyL6IW1mjsxk+pC1Rom 0QSw== X-Gm-Message-State: AOAM530XLSEURLZ7sPor1hRsP2NH+YpYA01D8502/LBNajWa+OcoErKx J07xHdW4abJEUenKIVAfjP7cfBlQxdHXIQ== X-Received: by 2002:a17:902:e0ca:b0:156:24d4:23e7 with SMTP id e10-20020a170902e0ca00b0015624d423e7mr6462076pla.13.1648583845945; Tue, 29 Mar 2022 12:57:25 -0700 (PDT) Received: from relinquished.localdomain ([2620:10d:c090:400::5:421]) by smtp.gmail.com with ESMTPSA id u15-20020a056a00098f00b004faa58d44eesm21890847pfg.145.2022.03.29.12.57.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 12:57:25 -0700 (PDT) Date: Tue, 29 Mar 2022 12:57:23 -0700 From: Omar Sandoval To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Omar Sandoval , Josef Bacik , Nikolay Borisov , David Sterba , clm@fb.com, jbacik@fb.com, linux-btrfs@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.17 12/21] btrfs: don't advance offset for compressed bios in btrfs_csum_one_bio() Message-ID: References: <20220328194157.1585642-1-sashal@kernel.org> <20220328194157.1585642-12-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220328194157.1585642-12-sashal@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 03:41:47PM -0400, Sasha Levin wrote: > From: Omar Sandoval > > [ Upstream commit e331f6b19f8adde2307588bb325ae5de78617c20 ] > > btrfs_csum_one_bio() loops over each filesystem block in the bio while > keeping a cursor of its current logical position in the file in order to > look up the ordered extent to add the checksums to. However, this > doesn't make much sense for compressed extents, as a sector on disk does > not correspond to a sector of decompressed file data. It happens to work > because: > > 1) the compressed bio always covers one ordered extent > 2) the size of the bio is always less than the size of the ordered > extent > > However, the second point will not always be true for encoded writes. > > Let's add a boolean parameter to btrfs_csum_one_bio() to indicate that > it can assume that the bio only covers one ordered extent. Since we're > already changing the signature, let's get rid of the contig parameter > and make it implied by the offset parameter, similar to the change we > recently made to btrfs_lookup_bio_sums(). Additionally, let's rename > nr_sectors to blockcount to make it clear that it's the number of > filesystem blocks, not the number of 512-byte sectors. > > Reviewed-by: Josef Bacik > Reviewed-by: Nikolay Borisov > Signed-off-by: Omar Sandoval > Signed-off-by: David Sterba > Signed-off-by: Sasha Levin > --- > fs/btrfs/compression.c | 2 +- > fs/btrfs/ctree.h | 2 +- > fs/btrfs/file-item.c | 37 +++++++++++++++++-------------------- > fs/btrfs/inode.c | 8 ++++---- > 4 files changed, 23 insertions(+), 26 deletions(-) Hi, Sasha, This patch doesn't fix a real bug, so it should be dropped from both 5.16 and 5.17. Thanks!