2 Answers
2

lsattr -v invokes the EXT2_IOC_GETVERSION ioctl for the file. This, in turn, retrieves the inode's i_generation field. This is a feature primarily intended for use with NFS: each time an inode gets allocated, one has to make sure it gets a new generation. Otherwise, NFS clients with stale file handles may manage to access data that weren't meant for them. ext2/ext3/ext4 allocates the generation number from a volume-global counter s_next_generation, which is incremented on every allocation.

So it's sort of like an inode number, but it never repeats for the life of the filesystem?
–
barrycarterOct 30 '10 at 20:52

OK, I used "chattr -v 1 file*" to change several files' version number. It worked (lsattr showed version 1) and the files didn't get merged into each other or anything weird. So I think this is still an open question. Is it just "we had extra space for an int in the inode", or does it have a meaning/usage/history/etc (other than NFS above)
–
barrycarterNov 2 '10 at 20:23

add this to your question, by editing your question. That way more people get to see it...
–
StefanNov 2 '10 at 20:35