Alan Cox <[email protected]> writes:

>> Isn't there some other "proper" way of doing this in userspace, or is
>> this really the correct way?
>
> You can look at the S_IFMT bits and stuff however link count indicating
> number of subdirectories is a standard Unix thing and used by many quite
> mundane tools as an optimisation.

Those tools for a decade or better all know to treat nlink == 1 as the
case where the optimization does not apply.

On a traditional unix filesytem the most common place you will see nlink
== 1 is when the link count overflows.  extN with > 65536 subdirectories
as I recall.


Eric
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to