Re: How about we just let all inode numbers on FAT be zero?

Matthias Urlichs (smurf@noris.de)
18 Jan 1999 00:02:51 +0100


Linus Torvalds <torvalds@transmeta.com> writes:
>
> I'd prefer for inode numbers to be completely made up, possibly by just
> doing
>
> static u32 msdos_ino = 0;

You cannot even use /bin/cp on such a file system, as it'll think all files
(or maybe even all same-size files) are hardlinked to each other.

> Note that things like "getcwd()" depend on inode numbers, until everybody
> has upgraded to the (currently nonexistent) library that uses the getcwd()
> system call.

Glibc 2.1 may not be _released_ yet, but that doesn't prevent it from
existing, right?? And getcwd() support has been in there for almost as
long as the syscall existed.

$ strace /bin/pwd >/dev/null
execve("/bin/pwd", ["/bin/pwd"], [/* 40 vars */]) = 0
[...]
personality(PER_LINUX) = 0
getpid() = 5989
brk(0) = 0x804b0bc
brk(0x804b0f4) = 0x804b0f4
brk(0x804c000) = 0x804c000
brk(0x804e000) = 0x804e000

getcwd("/home/smurf\0\0\0\0\0\0\0\0\0\0\0"..., 4097) = 12
******
fstat(1, {st_mode=S_IFREG|0664, st_size=1799, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
write(1, "/home/smurf\n", 12) = 12
munmap(0x40015000, 4096) = 0
_exit(0) = ?

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf@noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
After all, all he did was string together a lot of old, well-known
quotations.
                                  -- H. L. Mencken, on Shakespeare

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