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

Re: Better Linux Kernel Patch for 4GB Inode Problem



>From paul@serice.net  Tue Jun  8 09:51:52 2004

> > It just has other bugs...
> >
> > 	It assigns inode number 0 to all zero sized files
> > 	as fdar as I can see.

>What do you know about that!  I knew it was theoretically possible to
>assign the same inode number to two files, but I really didn't think
>it would happen for a common case.  :-(

This is definitely not allowed!

POSIX ----> see POSIX standard
does require that each different file on a single filesystem has a
unique inode number. UNIX-98 and before also require that
sizeof (ino_t) <= sizeof (long)

Inode #0 marks an unallocated file (---> directory standards).

In short: POSIX requires that each unique file on a system has a unique
st_dev/st_ino pair.

>I know "ls" and "find" require each directory to have a unique inode
>number in order to recurse properly, and I think I provide this.  On

This is not correct. The GNU find is definitely broken and does not work
correctly. It may be that GNU ls sufferes from the same bugs.

A POSIX find does not make asumptions on the link count of directories
(but GNU find does).

A POSIX find may need the inode number to correctly deal with hard linked 
directories.

>For non-directories, it's another story.  I think I'm no better or
>worse than the current linux code or the NetBSD code.  I'm o.k. with
>it (for now) because I just don't know of any commonly used programs
>that might break.  So for now, I'm willing to make the trade off of
>low kernel memory consumption for having non-unique inode numbers for
>zero-length files.

>Don't get me wrong, I'd be happy to rewrite things to guarantee
>unique inode numbers if someone else can put forward how to proceed.

Well I thought that I did point you to a decent algorith with your first
patch.... when I said that the facts it was based on are correct but the
asumptions made from the facts have been based on wrong math. If you 
just fix the math bugs in the first patch, you would get a much better
inode algorithm.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily



Reply to: