Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp441858lqc; Fri, 8 Mar 2024 01:54:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWOc85QbO1r1kTGW6q+zSFvc2KtFXi3EGiQ6ZuAbZPY9OwQNKTy9jU1hvZXS/KECNRkZDyXkS6heLc+edVq+yF9BxT8KbR+pPZC+fNLsQ== X-Google-Smtp-Source: AGHT+IFsJSlpjko+Ff95bupeZdLfdYkxj2ka3+AoU1BaLgrinuRgmF1YSVBKJwx/IMi3IK/LnyGT X-Received: by 2002:a17:906:fc16:b0:a44:3bec:20a8 with SMTP id ov22-20020a170906fc1600b00a443bec20a8mr13596181ejb.76.1709891643773; Fri, 08 Mar 2024 01:54:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709891643; cv=pass; d=google.com; s=arc-20160816; b=yatrfO1w+5VNiPgantkkxKaOyVFSfEBMIOm1hEX3aayPiW1SZKqifhGq8dJ6rcVhez rJpAPYyQyeo4atNpgYyOUc72z71kYWP0OdL4fVKMlCOfwJW2Kvem9HUWTgiCUkAPMjHo XSfQ27EGcz/SqG6+Ik8W6P/knvLbt+HDXdfEW8QX1svzd7ohacLNIE9SwDfKw+Rz5f01 ZDzoVKR9AsWK0zWWXM+n7FZMUBnxTQdTTFRCej7ymJxNzCbGENMPNmxFQtMVeCn1cVvC kcSBhyvtZh5N86Xqx/xXc3skgXtFB1v05emuQ9x44c0rg7390edQCbB36C3lsOikO6nr hlrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=SVLuV58Wf88RJz4QCYei0USy2gOFJ7vIuBSJPd4JPzE=; fh=TIT8ENI8C/2kAi6DjIii7T1/ZtaGyV9fKQzU/Hu4w6c=; b=CDJFuh9Cl5rDyyn4MjaWcfHJ6qivzJfdLp95IbQOMq0XpGYnwXAD2hyfOYtU8LtHpA m5wcZPeysbYp18AFvzO26G/v9/olzNCY86dD3iRd4vk09nZ99z027lkQYB5zoxNdR64K Y8EkGrULrvWcaLSRqjlonExIaLtNx7pAPlPwqzLSxfUSuInwIAviAhA7cFC1MmJ1IGkP LlhXvwh34aLiylJcU3/4a5FipjKc4qs0sCUqc6lwJVoJUNa30glb+8KNN+boYSrIOSZn 65gQNTLqE3n1VFFhq/oVl7HmzOdl5AmCI5J1gZ1qhxsKNxg4i1W4Qc5UOdlNkMKl1SkS cRgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=QG1dOEGP; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-96778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hs15-20020a1709073e8f00b00a453271deafsi4739229ejc.104.2024.03.08.01.54.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 01:54:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=QG1dOEGP; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-96778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 80B541F22A35 for ; Fri, 8 Mar 2024 09:54:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC77C5381D; Fri, 8 Mar 2024 09:53:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="QG1dOEGP" Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8EC5535BA for ; Fri, 8 Mar 2024 09:53:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891614; cv=none; b=qNcvA7HoH6SIbCIU8oNDEYyXOg0JMhFWUYcGTDpbbWAN5C1JX4demdf4/n8PUJTplgOr5zMCVOnI0XGQg1w1YmEcz6bnwi8xsVKLzOqRIuo+8GGfg9LHDhE1mgUmGxxasHO614U650GU5R7PN2auDx9/FINiltTbpvjTeBlrYuc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891614; c=relaxed/simple; bh=ndHO+dbK771sCXkhMw7b5U4+3upvw4nenUdZ5aegvaY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=V72pLDo0be/F/fvE9VGxI30ha6n6ZslERC7q8Y5ah44xONZJn6nMkTUiCQoSSpeG44hy0yseAJeBqc6WsezR1C2h6qPUxJyW0ST2MP/wJ9hBKLmXpQWooFaoF8HPJcnjxzhLoT2SXzOKRvjIaFF4ZVnNXbJCXwR4tJ9QEK2lpBs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=QG1dOEGP; arc=none smtp.client-ip=115.124.30.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1709891607; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=SVLuV58Wf88RJz4QCYei0USy2gOFJ7vIuBSJPd4JPzE=; b=QG1dOEGP0AM81HMX5YvQCdCLyiEfSIxFCOGgYXWZnkKltwDbaa3JfLfHHD88tmogsG1XKHfSRPu4cZFaAW42zAgKHPI4zjLbg+B6SR40LPpJ3pzp4slmolU6d80+7oaXGohOy4L/ObBkHpwuFywgB7we0XyFtYML6WQweKujs5s= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0W22PPMk_1709891605; Received: from 30.97.48.168(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W22PPMk_1709891605) by smtp.aliyun-inc.com; Fri, 08 Mar 2024 17:53:27 +0800 Message-ID: <54e39ceb-834a-4f37-9dc3-7db84fa59927@linux.alibaba.com> Date: Fri, 8 Mar 2024 17:53:25 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] erofs: make iov_iter describe target buffers over fscache To: Jingbo Xu , xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, linux-erofs@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org References: <20240308094159.40547-1-jefflexu@linux.alibaba.com> From: Gao Xiang In-Reply-To: <20240308094159.40547-1-jefflexu@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/3/8 17:41, Jingbo Xu wrote: > So far the fscache mode supports uncompressed data only, and the data > read from fscache is put directly into the target page cache. As the > support for compressed data in fscache mode is going to be introduced, > rework the fscache internals so that the following compressed part > could make the raw data read from fscache be directed to the target > buffer it wants, decompress the raw data, and finally fill the page > cache with the decompressed data. > > As the first step, a new structure, i.e. erofs_fscache_io (io), is > introduced to describe a generic read request from the fscache, while > the caller can specify the target buffer it wants in the iov_iter > structure (io->iter). Besides, the caller can also specify its > completion callback and private data through erofs_fscache_io, which > will be called to make further handling, e.g. unlocking the page cache > for uncompressed data or decompressing the read raw data, when the read > request from the fscache completes. Now erofs_fscache_read_io_async() > serves as a generic interface for reading raw data from fscache for both > compressed and uncompressed data. > > The erofs_fscache_rq structure is kept to describe a request to fill the > page cache in the specified range. > > Signed-off-by: Jingbo Xu As we discussed offline, for the whole series: Reviewed-by: Gao Xiang Thanks for the work! Thanks, Gao Xiang