Re: bad things when too many negative dentries in a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 14 Apr 2025 at 08:28, Ian Kent <raven@xxxxxxxxxx> wrote:

> > 1) putting the dentry on d_children when it's turned into positive
> > 2) getting the dentry off d_children when it's turned into negative.
>
> That shouldn't be too difficult to do ... sounds like a good idea to me.

I hadn't counted with parent pointers.  While not actually
dereferenced, they are compared on cache lookup.  So if the parent is
removed and a directory dentry is recreated with the same pointer the
cache becomes corrupted.

Keeping the parent alive while any negative child dentries remain
doesn't sound too difficult, e.g. an need an additional refcount that
is incremented in parent on child unlink and decremented on child
reclaim.  But that's more space in struct dentry and more
complexity...

Thanks,
Miklos




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux