Re: [QUESTION] FAT i_ino and iunique

From: Steve Dodd (steved@loth.demon.co.uk)
Date: Sun Apr 16 2000 - 06:25:52 EST


On Sat, Apr 15, 2000 at 09:49:53PM -0700, G. Allen Morris III wrote:

> Does anyone know why fs/fat uses: iunique()
>
> in fat_build_inode(...) inode->i_ino is set using iunique(...)
> rather than just using `ino'? `ino' seems to be set to
> (sector << MSDOS_DPS_BITS)+((offset & (SECTOR_SIZE-1)) >>
> MSDOS_DIR_BITS);
> in fat__get_entry(...) this seems to be unique for the filesystem?

I guess because FAT has nothing that can be used for inode numbers that is
invariant across all the usual culprits - umount, rename, etc. I assume the
code above makes them invariant across rename, at least. (It being more
important to export FAT filesystems over NFS than to be able to backup them
up with tar, I'm guessing). The archives should contain a lot of choice
comments from Al Viro on FAT that should explain the problem in more detail :-)

-- 
Satellite Safety Tip #14:
    If you see a bright streak in the sky coming at you, duck.

- 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 : Sun Apr 23 2000 - 21:00:08 EST