Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6097597rdb; Thu, 14 Dec 2023 08:13:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbFRUSlyHGqVWPY9zBkq2WS6RiOGFNYIE796HLjGCnMy6QCyD641GxLERmEKzECRvnyPFw X-Received: by 2002:a05:6a20:4f07:b0:191:b476:6cfd with SMTP id gi7-20020a056a204f0700b00191b4766cfdmr3349846pzb.53.1702570436682; Thu, 14 Dec 2023 08:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702570436; cv=none; d=google.com; s=arc-20160816; b=Q7bqpjidckQ8Pd9uin5CdpV5+RH1I+cqFsETORB5IwKo5cdSFxR8gdSzRCbUcXPvlV G59qPeHz3xUyu3vrrhqnW0/2+6TM92584vZea/Xgp2ASbwcOkTSGc2pzCWQ4RMsN9Cnn IULq5F1wyjU6Rp/AkuNQU/lvrmuT48MCx5ZX2Bj+NJGmIcfW6U+1IGn3prunFagi0NB0 povz1OWeozedXwJC2Qe/uUT7hD/XJZKy3QoVFDvOxIjkJ9Durk4KqT1XyFFZV5gFAFsh BK/kwnyTVyrXz/pNZM2jxqkcIn8ll4rYbRivsWA1d8YColLGRe8AafSlt4SFuqfB9LNm W7cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SeiQBJ6BoVv+H0Ctowk8/TXMtvbnRyrxprGAchosnVw=; fh=rdedfN25J4jG1Ck0RmCa6c0OdlZVOxBUZOU+p7SaY6M=; b=RzKoRVhg49fjSRpXjciiHJ/jvRWE6mlA3s/xFg6y9JvaCwxDsgdw9jq4mpycCPDKKQ u1Pb5tCo9SmbtTAvA6EjsIe/2Q3da3MI94UaGjl5yMx46BvWtVvEFMWkXMmUyksUzo2o RJ2Chnm3CmB2XdZnGrShuiz/BoAsJE48H0ggG6kvLUD/4nouhEFSuMYvDJxNm/n+YPIR TTyKzOg41+FAq2xNhk+rePUzMW/X8uS2GyZ6n94hx2fssp2MbFc+t6eWiZwlPWe5KSNl hYpMHFNsQhzyYRajY45D2rpD6LXWYrESrBwznSpFpltFoMeKxsUbFEZLhbFeKtTqaUUi aCKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o13-20020a65614d000000b005bdf5961646si11198568pgv.268.2023.12.14.08.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 08:13:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 42FAD81C50A5; Thu, 14 Dec 2023 08:13:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229517AbjLNQNl (ORCPT + 99 others); Thu, 14 Dec 2023 11:13:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjLNQNk (ORCPT ); Thu, 14 Dec 2023 11:13:40 -0500 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537AD10E for ; Thu, 14 Dec 2023 08:13:46 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R921e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VyUqVoN_1702570418; Received: from e69b19392.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VyUqVoN_1702570418) by smtp.aliyun-inc.com; Fri, 15 Dec 2023 00:13:44 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu Cc: LKML , Gao Xiang Subject: [PATCH] erofs: fix ztailpacking for subpage compressed blocks Date: Fri, 15 Dec 2023 00:13:37 +0800 Message-Id: <20231214161337.753049-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 08:13:54 -0800 (PST) `pageofs_in` should be the compressed data offset of the page rather than of the block. Signed-off-by: Gao Xiang --- fs/erofs/zdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index a2c3e87d2f81..8264936b8612 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -812,7 +812,6 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe) if (ztailpacking) { pcl->obj.index = 0; /* which indicates ztailpacking */ - pcl->pageofs_in = erofs_blkoff(fe->inode->i_sb, map->m_pa); } else { pcl->obj.index = erofs_blknr(sb, map->m_pa); @@ -889,6 +888,7 @@ static int z_erofs_pcluster_begin(struct z_erofs_decompress_frontend *fe) } get_page(map->buf.page); WRITE_ONCE(fe->pcl->compressed_bvecs[0].page, map->buf.page); + fe->pcl->pageofs_in = map->m_pa & ~PAGE_MASK; fe->mode = Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE; } /* file-backed inplace I/O pages are traversed in reverse order */ -- 2.39.3