Re: (reiserfs) Re: any chance we could dump the 64k subdirectory limit before 2.4 ships?

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Wed May 31 2000 - 11:20:33 EST


Marc Lehmann wrote:
> > Notice that use of old stat(2) will be rather dangerous - if you are
> > getting low 16 bits you are screwed, since many programs make assumptions
> > about the relation of st_nlink and number of subdirectories for directory
> > inodes. Even more will be very surpirsed seeing st_nlink==0.
>
> setting st_nlink==max when it overflows should be fine. Actually only a
> small number of programs relies on the nlink =~ number of subdirs, I can
> only think of find and treescan at the moment, and both have an option
> to switch it off, since for many existing filesystems this assumption is
> broken anyway.

You don't even need to use the option to turn it off. Just return
st_nlink==1 for a directory whose subdirectories are not countable --
all the non-Unix filesystems do that, and it's unambiguous because the
minimum for a proper Unix directory is 2.

Now, if someone would accept my dirent->d_type patch then even find &
treescan won't depend on st_nlink :-)

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:27 EST