lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d82c60eb-a170-48fe-9e50-e64c80681cb6@linux.alibaba.com>
Date: Wed, 7 Jan 2026 15:53:28 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Hongbo Li <lihongbo22@...wei.com>
Cc: djwong@...nel.org, amir73il@...il.com, hch@....de,
 linux-fsdevel@...r.kernel.org, linux-erofs@...ts.ozlabs.org,
 linux-kernel@...r.kernel.org, Chao Yu <chao@...nel.org>, brauner@...nel.org
Subject: Re: [PATCH v12 07/10] erofs: introduce the page cache share feature



On 2026/1/7 15:32, Hongbo Li wrote:
> 
> 
> On 2026/1/7 15:27, Gao Xiang wrote:
>>
>>
>> On 2026/1/7 15:17, Hongbo Li wrote:
>>> Hi, Xiang
>>>
>>
>> ...
>>
>>>>>>> +
>>>>>>> +bool erofs_ishare_fill_inode(struct inode *inode)
>>>>>>> +{
>>>>>>> +    struct erofs_sb_info *sbi = EROFS_SB(inode->i_sb);
>>>>>>> +    struct erofs_inode *vi = EROFS_I(inode);
>>>>>>> +    struct erofs_inode_fingerprint fp;
>>>>>>> +    struct inode *sharedinode;
>>>>>>> +    unsigned long hash;
>>>>>>> +
>>>>>>> +    if (!test_opt(&sbi->opt, INODE_SHARE))
>>>>>>> +        return false;
>>>>>>> +    (void)erofs_xattr_fill_ishare_fp(&fp, inode, sbi->domain_id);
>>>>>>> +    if (!fp.size)
>>>>>>> +        return false;
>>>>>>
>>>>>> Why not just:
>>>>>>
>>>>>>      if (erofs_xattr_fill_ishare_fp(&fp, inode, sbi->domain_id))
>>>>>>          return false;
>>>>>>
>>>>>
>>>>> When erofs_sb_has_ishare_xattrs returns false, erofs_xattr_fill_ishare_fp also considers success.
>>>>
>>>> Then why !test_opt(&sbi->opt, INODE_SHARE) didn't return?
>>>>
>>>
>>> The MOUNT_INODE_SHARE flag is passed from user's mount option. And it is controllered by CONFIG_EROFS_FS_PAGE_CACHE_SHARE. I doesn't do the check when the superblock without ishare_xattrs. (It seems the mount options is static, although it is useless for mounting with inode_share on one EROFS image without ishare_xattrs).
>>> So should we check that if the superblock has not ishare_xattrs feature, and we return -ENOSUPP?
>>
>> I think you should just mask off the INODE_SHARE if the on-disk
>> compat feature is unavailable, and print a warning just like
>> FSDAX fallback.
>>
> 
> Ok, it seems reasonable, and also can remove the check logic in erofs_xattr_fill_ishare_fp. I will change in next version.

I think you should move

if (!test_opt(&sbi->opt, INODE_SHARE))
	return -EOPNOTSUPP;

into erofs_xattr_fill_inode_fingerprint() directly.

Thanks,
Gao Xiang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ