From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C47BEE49A3 for ; Wed, 23 Aug 2023 15:23:10 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Xw+CuoaD; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RW92h6c8Fz3c4r for ; Thu, 24 Aug 2023 01:23:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Xw+CuoaD; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=chao@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RW92c0tmNz2yhZ for ; Thu, 24 Aug 2023 01:23:04 +1000 (AEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 571116355C; Wed, 23 Aug 2023 15:23:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5CBBC433CA; Wed, 23 Aug 2023 15:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692804181; bh=MwvciWjJAxrGTHVjYjuHMxSMWQJURLQ+4pJNMNFITpw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Xw+CuoaDzA4jVZFlSn4MdBYYlizTsgBZIk+RD988KutEHGl9ju/msFCSCTbPLB1JB 0SDd/DlnaUfs5uiAo+J3fGMmFpPAOb7z7PHlodg+J6ONfyuqWVw5npXxBWrmP9uBft wCuYbihiWAl8JSZuTCsKdtMuyVsf3fd/gFiKyIN6vJNWYRRJKryiDRu3kD3qeNmiBd j5kvnaEXMZrAmeUg+zLVFx65M8aJukNVgNgHTvSlCps9pFUolgXhPJIOx7LFmgu+Qy Qc4lt4G4m64HgHcd8kgDEzO/xOpmCZuUOjV/x4XmAk42rNUgDvCVnjjZm9woC26P1B jdAaz2b5FGC7w== Message-ID: <4994e087-47cc-6b32-1daf-abf7026bdca4@kernel.org> Date: Wed, 23 Aug 2023 23:22:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 7/8] erofs: adapt folios for z_erofs_readahead() Content-Language: en-US To: Gao Xiang , linux-erofs@lists.ozlabs.org References: <20230817082813.81180-1-hsiangkao@linux.alibaba.com> <20230817082813.81180-7-hsiangkao@linux.alibaba.com> From: Chao Yu In-Reply-To: <20230817082813.81180-7-hsiangkao@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LKML Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2023/8/17 16:28, Gao Xiang wrote: > It's a straight-forward conversion except that readahead_folio() > will do folio_put() in advance but it doesn't matter since folios > are still locked. > > As before, since file-backed folios (pages for now) are locked, so > we could temporarily use folio->private as an internal counter to > indicate split parts of each folio for the corresponding pclusters > to decompress. > > When such counter becomes zero, the folio will be finally unlocked > (see compress.h and z_erofs_onlinepage_endio()). > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,