From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1988A455168 for ; Thu, 20 Aug 2026 13:29:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787232574; cv=none; b=XgB6I7VUCSkA71EofKDJ1rm6AsW/PUWwdi7JuLCHirllGttMTbJZQlSTrvX3DavYw7UI/apDwcNRkK/xqkzbodjJ8xc/aZEdVLQjUwFxV7e5iuF2MOjE3B/mv1gj8N/pgdsC5QJIxXrT8tLYJpnfS3TuO1uoIoslfzIgd2D4exE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787232574; c=relaxed/simple; bh=N0X4MhKaB2BpvPL6ik2j9Ouv6w0OZr9qVBFuBjaC83s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XLNg9xKwN9zs07bc5OiLBaeUIBYRZKpZiCRxmgAEl0mMW2Ezb7Zj2KLEDjOXkkS32ieJOiyfj6S4yoORkVnQg5CoNE6l9umPeq3wHcBFH2jw/AliJQ38IfqGtzr/laVebwMaWcfL2yZSOfiQdyvExS5v7/Noh1AEaQ1DJTE1B34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oP2TIhGk; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oP2TIhGk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B12311F000E9; Thu, 20 Aug 2026 13:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787232572; bh=9+xIvAivAkJoFwbhPgrhK0pKgw8dpD6Dl6gXNIdc8VM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=oP2TIhGkYtlMKI0tJv5XkySJXP2D8XaR3Q89wvDUMrWZbL64F1bmqv2nlfFwVCaH7 RyHOZWhFcByUFSNHeVtQLIm5noQvlA0upTqJ9Y+rqOudAj+CuR/ER3FPFMttadnnVH h5GI4OJLfcMwJDENvXJN7P4uRQ9E1nOwR2MAhP93SBpr7b8AwFxJa0+jPSuTTXa792 kVxbzfRpPteepw1h5/iqV6CUsiH+Q+eWUVS8WcZAhcpGy93Eh2wj13HVtz+Zwqt4Wv 9obE11m7vkN4krbMaJv3J/p1CMbsUm+/yp0FanFoKyc22tSWPXjFIdatLc8kL47JD1 jtx41w2wymj/A== Date: Thu, 20 Aug 2026 21:29:23 +0800 From: Gao Xiang To: Zhan Xusheng Cc: Gao Xiang , Chao Yu , Jingbo Xu , zhanxusheng@xiaomi.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] erofs: use the shared page cache for splice in inode_share mode Message-ID: Mail-Followup-To: Zhan Xusheng , Gao Xiang , Chao Yu , Jingbo Xu , zhanxusheng@xiaomi.com, linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20260820064441.1083470-1-zhanxusheng@xiaomi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260820064441.1083470-1-zhanxusheng@xiaomi.com> Hi Xusheng, On Thu, Aug 20, 2026 at 02:44:41PM +0800, Zhan Xusheng wrote: > From: Zhan Xusheng > > From: Zhan Xusheng > the subject can be improved as "erofs: support splice() in inode_share mode" > erofs_ishare_fops routes everything that touches the page cache to the > backing file in ->private_data: read_iter clones the iocb onto it, mmap > does vma_set_file(), fadvise calls vfs_fadvise() on it. splice_read was > left as filemap_splice_read(), which works on the user file's own mapping. > > filemap_splice_read() does init_sync_kiocb(&iocb, in), and > filemap_get_pages() then takes iocb->ki_filp->f_mapping, so splice() and > sendfile() populate the per-file page cache from disk instead of using the > shared one. The data is correct, since erofs_fill_inode() sets that > mapping's a_ops either way, but the same content ends up cached twice, > which is what inode_share is there to avoid. > > Pass the backing file, as read_iter already does. > > Fixes: 5ef3208e3be5 ("erofs: introduce the page cache share feature") > Link: https://lore.kernel.org/all/b7dc7192-d586-45a2-bc4a-b41dc681c9bb@linux.alibaba.com/ > Signed-off-by: Zhan Xusheng I observed the sashiko's report too: https://sashiko.dev/#/patchset/20260818113713.116849-1-jefflexu%40linux.alibaba.com Regardless of the implementation details, I don't think it is a fix since this feature should be considered as a best-effort approach. If it's an enhancement, please also write an erofs-utils test and drop the fixes tag. Thanks, Gao Xiang