GNU bug report logs -
#27739
Link counter of ls stops working at 65'000 hard links
Previous Next
Full log
Message #12 received at 27739-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 27739 notabug
thanks
On 07/17/2017 01:58 PM, Christoph Michelbach wrote:
> The link counter of ls stops working if a directory exceeds being linked to
> 64'999 times.
ls is just reporting the value returned by stat() from the kernel; this
sounds like a kernel (or filesystem) bug. To double-check, you should
also be able to use the stat(1) utility (instead of ls) to show the same
results.
Since we can't address it in userspace, I'm marking this as notabug from
the perspective of the coreutils database, but please feel free to reply
further with any results you get after reporting this to the right
kernel folks.
> I neither understand why this happens, nor why it happens at such a weird
> number. It would be obvious that there is a 16 bit counter running out of values
> if it stopped working at at or after 65'535, but it stopping to work at 65'000
> hard links seems weird.
Not the first time the kernel has done something weird.
>
> I tested this on a 64 bit system running Linux 4.4.0-83 and on a 32 bit system
> running Linux 4.1.18 with the exact same result.
Your filesystem may also matter (not all filesystems are created equal).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 8 years and 23 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.