[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b39d430d-3ecb-4537-8d9c-9f0c50cefdf0@linux.alibaba.com>
Date: Tue, 17 Sep 2024 16:06:56 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Yiyang Wu <toolmanp@...p.cc>, linux-erofs@...ts.ozlabs.org,
rust-for-linux@...r.kernel.org, linux-fsdevel@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 19/24] erofs: introduce namei alternative to C
On 2024/9/17 15:31, Al Viro wrote:
> On Tue, Sep 17, 2024 at 03:14:58PM +0800, Gao Xiang wrote:
>
>>> Sorry for my ignorance.
>>> I mean i just borrowed the code from the fs/erofs/namei.c and i directly
>>> translated that into Rust code. That might be a problem that also
>>> exists in original working C code.
>>
>> As for EROFS (an immutable fs), I think after d_splice_alias(), d_name is
>> still stable (since we don't have rename semantics likewise for now).
>
> Even on corrupted images? If you have two directories with entries that
> act as hardlinks to the same subdirectory, and keep hitting them on lookups,
> it will have to transplant the subtree between the parents.
Oh, I missed unexpected directory hardlink corrupted cases.
>
>> But as the generic filesystem POV, d_name access is actually tricky under
>> RCU walk path indeed.
>
> ->lookup() is never called in RCU mode.
I know, I just said d_name access is tricky in RCU walk.
->lookup() is for real lookup, not search dcache as fast cached lookup
in the RCU context.
Thanks,
Gao Xiang
Powered by blists - more mailing lists