From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) (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 C950B377AB4 for ; Thu, 20 Aug 2026 06:17:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787206670; cv=none; b=YOXgV4M6HsrkInp/TvC++FTed+6qq5Z+v2EFPzX/Ww7dA0MJZq+P2FGEucDEwUfmYmby8KzaWlW99HfRFVffkJI61pQTQ0Bx5pMvfOeiS1SQ4J78evKxScFV7kkX85Qp82s7gXtgJcL8L/Q7L9jOed+vgVhRmv5QPUIuBbgS/4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787206670; c=relaxed/simple; bh=B7DvkNn11Vfu5R7kSoqN+/6AKMcNHlapEGrPg5n20PM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=poqO1reCY3bYt+/3IFp9ZdnCoqyE6Fh43JCmaUN6S4+4Jl/gNErGDkbVDvnsRuldZRZX3ZoGQ3oc379/lOsemVFtfat6yYhjHrCo9+vOSHDQnc48gT0g3Glvj6SYmLEvBGF/w2xb7XrRyxz7GLdlMnvuHVUuK/x/JhBs4Bo7pSE= 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=yfoJmpYG; arc=none smtp.client-ip=115.124.30.97 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="yfoJmpYG" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1787206657; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=VW39S+Y9ewsWHglPkMQpttpscTWd37fCKvdYbG2Mvl0=; b=yfoJmpYGNZS2JvfsqebffPrloNbeSNCflFTqDPvjD7J2PpUqQwmX6JeaApZE6YJNMe0Nh8sfCxpUNMmnOZozEazoCSltAoaPlwsbRY7QvCanhCjGSacs8gFTw0jwRz09IoNPisGIDNCJwvS6h3yEbV3s1rzKv9rLlZaNugg7M6I= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0X9IboZw_1787206656; Received: from 30.221.151.40(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0X9IboZw_1787206656 cluster:ay36) by smtp.aliyun-inc.com; Thu, 20 Aug 2026 14:17:37 +0800 Message-ID: Date: Thu, 20 Aug 2026 14:17:36 +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] erofs: support SEEK_HOLE/SEEK_DATA in inode_share mode To: Zhan Xusheng , xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: Zhan Xusheng , linux-kernel@vger.kernel.org References: <20260818113713.116849-1-jefflexu@linux.alibaba.com> <20260820031100.1038753-1-zhanxusheng@xiaomi.com> Content-Language: en-US From: Jingbo Xu In-Reply-To: <20260820031100.1038753-1-zhanxusheng@xiaomi.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/20/26 11:10 AM, Zhan Xusheng wrote: > On Tue, 18 Aug 2026 19:37:13 +0800, Jingbo Xu wrote: >> - .llseek = generic_file_llseek, >> + .llseek = erofs_file_llseek, > > No objection to the change. While in that table, .splice_read is the entry > left that touches the page cache without going through ->private_data: > > .read_iter kiocb_clone() onto private_data, then filemap_read() > .mmap vma_set_file(vma, realfile) > .fadvise vfs_fadvise(file->private_data, ...) > .splice_read filemap_splice_read > > filemap_splice_read() does init_sync_kiocb(&iocb, in), and > filemap_get_pages() then takes iocb->ki_filp->f_mapping (mm/filemap.c:2686), > so it works on the user file's mapping, which after your patch is confirmed > to be the real inode's. erofs_fill_inode() sets that mapping's a_ops > unconditionally, so the data splice() and sendfile() return is correct, but > they populate the per-file page cache from disk rather than the shared one > read() and mmap() use, caching the same content twice. Right. I think that would be another patch to fix that. -- Thanks, Jingbo