[PATCH 5/5] erofs-utils: mount: stop checking `/sys/block/nbdX/pid`
Gao Xiang
hsiangkao at linux.alibaba.com
Fri Dec 26 19:01:47 AEDT 2025
On 2025/12/26 15:54, zhaoyifan (H) wrote:
>
> On 2025/12/26 14:51, Gao Xiang wrote:
>> Hi Yifan,
>>
>> On 2025/12/23 18:04, Yifan Zhao wrote:
>>> The `current erofsmount_nbd()` implementation verifies that the value in
>>> `/sys/block/nbdX/pid`` matches the PID of the process executing
>>> `erofsmount_nbd_loopfn()`, using this as an indicator that the NBD
>>> device is ready. This check is incorrect, as the PID recorded in the
>>> aforementioned sysfs file may belong to a kernel thread rather than a
>>> userspace process (see [1]).
>>
>> Do you have a way to reproduce that?
>
> This issue is consistently reproducible in my WSL2 environment (kernel version 6.6.87.2-microsoft-standard-WSL2),
I guess you could use bpftrace or similiar to confirm the kthread
stack if possible?
>
> but works correctly in other environments (e.g., openEuler 24.03 SP2). The finer-grained difference
>
> between these 2 environments remains unclear.
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list