Re: Inodes

Jan Hudec (bulb@ucw.cz)
Tue, 15 May 2001 23:20:52 +0200


> 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/