Re: Link count for directories

Nikolay Borisov
2020-08-24T12:44:12Z

On 21.08.20 г. 20:40 ч., Steve Keller wrote:
> Are there any plans to implement the traditional link count behavior in btrfs,
> as described in the following URL?
>
> https://btrfs.wiki.kernel.org/index.php/Project_ideas#Track_link_count_for_directories
>
> Would it be a major effort to do so? I'd really like that feature.

I have implemented it so it's not that big of a deal. However turns out
it has pretty steep requirements for backport because so far btrfs
always kept the link count of dirs to 1. So such a change should be
justifiable because it's not only the kernel code that is affected but:

1. Backporting relevant patch to older, stable kernels
2. Changing btrfs-progs so that it doesn't erroneously think a kernel
with link count larger than 1 is broken.

So how effective is such an optimisation to the software using it ?

>
> Steve
>