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

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

 



On Fri, Apr 11, 2025 at 05:40:08PM +0200, Miklos Szeredi wrote:
> However, hundreds of millions of negative dentries can be created
> rather efficiently without unlink, though this one probably doesn't
> happen under normal circumstances.

Depends on your userspace.  Since we don't have union directories,
consider the not uncommon case of having a search path A:B:C.  Application
looks for D in directory A, doesn't find it, creates a negative dentry.
Application looks for D in directory B, creates a negative dentry.
Application looks for D in directory C, doesn't find it, so it creates it.
Now we have two negative dentries and one positive dentry.

And for some applications, the name "D" is going to be unique, so the
negative dentries have _no_ further use.  The application isn't even
going to open C/D again.  If there's no memory pressure, we can build
up billions of dentries.  I believe the customer is currently echoing
2 to /proc/sys/vm/drop-caches every hour.





[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