[PATCH 1/2] erofs: support query erofs ondemand feature by sysfs interface

Gao Xiang hsiangkao at linux.alibaba.com
Fri Jun 21 19:28:31 AEST 2024



On 2024/6/21 17:16, Gao Xiang wrote:
> 
> 
> On 2024/6/21 14:18, Hongbo Li wrote:
>> Erofs over fscache depands on the config CONFIG_EROFS_FS_ONDEMAND
>> in erofs. There is no way to check whether this feature is supported
>> or not in userspace. We introduce sysfs file `erofs_ondemand` for
>> user checking current features. Here is the example:
>>
>> [Before]
>> $ cat /sys/fs/erofs/features/erofs_ondemand
>> cat: /sys/fs/erofs/features/erofs_ondemand: No such file or directory
>>
>> [After]
>> $ cat /sys/fs/erofs/features/erofs_ondemand
>> supported
>>
>> Signed-off-by: Hongbo Li <lihongbo22 at huawei.com>
> 
> Similar here, I guess you could pass in any `fsid` mount
> option and check the return value instead.

Add some words, currently I don't tend to add any sysfs for
new feautures since you could always use golden test images
or test programs to test if any on-disk/runtime feature is
really supported.

Maintaining sysfs files for these causes unnecessary burden
(and could cause unexpected inconsistency). Maybe in the
future I will deprecate all these sysfs files.

Thanks,
Gao Xiang

> 
> Thanks,
> Gao Xiang


More information about the Linux-erofs mailing list