tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Filesystem limits
On Sunday 17 January 2010 02:24:42 der Mouse wrote:
> > Is there a portable way of finding out the limits for the maximum
> > number of files and directories that can be created under a give
> > directory?
>
> I doubt it. Traditional Unix has no such limits, and at least some of
> the more popular filesystems NetBSD supports don't. There are (and
> have been) per-mount-point limits, set at filesystem create time, but
> that's not very closely related. (If you do want them, look at
> statfs(2) and/or fstatfs(2) for an API, or df -i for command-line.)
Maybe I should have rephrased my question, i.e. not "filesystem limits", but
"per directory limits".
I can't create more than 32766 subdirectories in a given directory. If I run a
test program, which creates subdirectories (1, 2, 3...N) in a loop, after
32766 it exits with:
p3smp$ ./a.out
mkdir() error: : Too many links
i = 32766
Where is this "Too many links" coming from? Is it a filesystem limit, or a
dynamically adjustable sysctl limit? Is there a way to increase this limit, or
maybe it will substantially decrease performance when doing directory lookups?
Home |
Main Index |
Thread Index |
Old Index