Re: ln -l says symlink has size 281474976710666

From: Andreas Dilger (adilger@turbolinux.com)
Date: Wed Mar 14 2001 - 00:58:08 EST


John Lenton writes:
> burocracia:~# debugfs /dev/hda2
> debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
> debugfs: stat <404176>
> Inode: 404176 Type: symlink Mode: 0777 Flags: 0x0 Generation: 2457884131
> User: 0 Group: 0 Size: 281474976710666
> Fast_link_dest: imlib-base
> debugfs: stat <404192>
> Inode: 404192 Type: symlink Mode: 0777 Flags: 0x0 Generation: 1796859698
> User: 0 Group: 0 Size: 281474976710669
> Fast_link_dest: /proc/self/fd

So it is garbage in the "i_size_high" field (=i_dir_acl) in the inode.

> this is after an e2fsck, after a reboot, after restart. Nothing
> in the logs. The inodes are as old as the system, which isn't all
> that old (circa the first release with reiserfs).

Luckily, after the symlink is created it ignores the size, and only uses
the i_blocks count to determine if the symlink is stored in the inode
itself or in another block (the fast symlink will be NUL terminated).
It could well have been corruption from a long time ago, and only with
2.4.x and LFS you have noticed it.

Probably e2fsck needs to be updated to check for and fix this problem -
it is impossible for a symlink to be larger than a single block, so
the i_size_high field should always be zero.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
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 : Thu Mar 15 2001 - 21:00:16 EST