From nobody Tue Feb 10 01:36:10 2026 Received: from canpmsgout07.his.huawei.com (canpmsgout07.his.huawei.com [113.46.200.222]) (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 C4A2A2AD22; Tue, 23 Dec 2025 02:09:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.222 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766455751; cv=none; b=si1pYBd5j9Hwuu1MPYq6F26PfylnHfx/V957KmsmCEfgW8PlrFy5NXpFOHAZhhgq2kSXabGfBmdHEnSI0+wvYuzFnnmlmvTJUske5dQe2fPBidl8t5aS63ceSFsfAfbR7JnIAvTe6vI1+EuaIkeYX4vN3hCxhiKDhWH7zY5eeeo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766455751; c=relaxed/simple; bh=JrmwqSgI8tyDW60vgTjaqVkD9tfCRu3MDcyfrGhgA2E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gJyaZN6QAGJ3hP12/MVZygVWeBPS4kMmMVVv0MTHmRfS9nwu552RzGWM/NYqM3HjopnFjIqpOh4Z95ADy7CEQUji4nxkzrHWbTE9tuM6looc1BOhUcoZT7y8yD7Rd6+27XNnye99RbUKk75TOZm9f9q/foDqtfsmvhtK86mMTmc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=2QIEhkCL; arc=none smtp.client-ip=113.46.200.222 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="2QIEhkCL" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=7GO752QgqNofic+dM/tFheakeNIh11LqgEgNouQKnuw=; b=2QIEhkCLlgSD2nBJ9Eh1sYxAbXN0ttW1vPcRYNz949RKjAbZpBse+GGZt+yQtOk4LXfKd7wzZ CW1dtrEs0ICTg4cnbgxhQEjg2D8cN3/NHgCXZv4+gPWd81YTdHmuJJystpDPmzcqPyxEeOG63TM rW7rfhm6zU+Nl+M7/8bptF8= Received: from mail.maildlp.com (unknown [172.19.163.163]) by canpmsgout07.his.huawei.com (SkyGuard) with ESMTPS id 4dZyzF22R8zLlTC; Tue, 23 Dec 2025 10:06:01 +0800 (CST) Received: from kwepemr500015.china.huawei.com (unknown [7.202.195.162]) by mail.maildlp.com (Postfix) with ESMTPS id BB50C40565; Tue, 23 Dec 2025 10:09:06 +0800 (CST) Received: from huawei.com (10.67.174.162) by kwepemr500015.china.huawei.com (7.202.195.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 23 Dec 2025 10:09:06 +0800 From: Hongbo Li To: , , , , , CC: , , , Subject: [PATCH v10 06/10] erofs: support domain-specific page cache share Date: Tue, 23 Dec 2025 01:56:15 +0000 Message-ID: <20251223015618.485626-7-lihongbo22@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20251223015618.485626-1-lihongbo22@huawei.com> References: <20251223015618.485626-1-lihongbo22@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemr500015.china.huawei.com (7.202.195.162) Content-Type: text/plain; charset="utf-8" From: Hongzhen Luo Only files in the same domain will share the page cache. Also modify the sysfs related content in preparation for the upcoming page cache share feature. Signed-off-by: Hongzhen Luo Signed-off-by: Hongbo Li Reviewed-by: Gao Xiang --- fs/erofs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 68480f10e69d..be9f96252c6c 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -518,6 +518,8 @@ static int erofs_fc_parse_param(struct fs_context *fc, if (!sbi->fsid) return -ENOMEM; break; +#endif +#if defined(CONFIG_EROFS_FS_ONDEMAND) || defined(CONFIG_EROFS_FS_PAGE_CACH= E_SHARE) case Opt_domain_id: kfree(sbi->domain_id); sbi->domain_id =3D kstrdup(param->string, GFP_KERNEL); @@ -618,7 +620,7 @@ static void erofs_set_sysfs_name(struct super_block *sb) { struct erofs_sb_info *sbi =3D EROFS_SB(sb); =20 - if (sbi->domain_id) + if (sbi->domain_id && !erofs_sb_has_ishare_xattrs(sbi)) super_set_sysfs_name_generic(sb, "%s,%s", sbi->domain_id, sbi->fsid); else if (sbi->fsid) @@ -1052,6 +1054,8 @@ static int erofs_show_options(struct seq_file *seq, s= truct dentry *root) #ifdef CONFIG_EROFS_FS_ONDEMAND if (sbi->fsid) seq_printf(seq, ",fsid=3D%s", sbi->fsid); +#endif +#if defined(CONFIG_EROFS_FS_ONDEMAND) || defined(CONFIG_EROFS_FS_PAGE_CACH= E_SHARE) if (sbi->domain_id) seq_printf(seq, ",domain_id=3D%s", sbi->domain_id); #endif --=20 2.22.0