Re: [PATCH v2 0/3] kernfs: Build paths in linear time with respect to depth
From: Tejun Heo
Date: Sun Nov 29 2026 - 11:36:53 EST
Hello, Chris.
On Sat, Nov 28, 2026 at 09:38:19PM -0800, Chris Down wrote:
> Patch 1 builds the path in a single walk instead. As Tejun suggested on
> v1, a path which doesn't fit now returns -E2BIG and keeps its end rather
> than its start.
...
> Patches 2 and 3
> update sched/debug and cgroup_iter, which assumed that the start of the
> path would be kept or that nothing would be left in the buffer.
The patches look good to me in general. Two things:
- I think it'd be better to handle "..." in kernfs itself: when the path
doesn't fit, kernfs_path_from_node_locked() puts "..." at the start of
the buffer. Then sched/debug only needs to drop its suffix.
- Can you please also make pr_cont_kernfs_path() print what's in the
buffer when the path doesn't fit, instead of "(name too long)"?
Thanks.
--
tejun