Re: Inodes

From: Jan Hudec (bulb@ucw.cz)
Date: Tue May 15 2001 - 16:20:52 EST


> Blesson Paul writes:
>
> > This is an another doubt related to VFS. I want to know
> > wheather all files are assigned their inode number at the
> > mounting time itself or inodes are assigned to files upon
> > accessing only
>
> That would depend on what type of filesystem you use.
> For ext2, inode numbers are assigned at file creation.
> For vfat, inode numbers are assigned as needed, and
> forgotten when not needed.

I think using pointers to inode structures as inode numbers might be
an optimal solution. Since inode structure is long, it can even be
shifted few bits left if some special numbers are needed. Uniqueness
check should be added for 64-bit platforms, but it should work without
(kernel memory is not large enough for the nuber to wrap).

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



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:44 EST