Re: inode version updates

Mingming Cao
2007-06-14T17:22:10Z

Andreas Dilger wrote:
> Mingming Cao <cmm@us.ibm.com> writes:
>
>>I took out the i_version code from Kalpak's
>>ext4_expand_inode_extra_isize.patch.
>>
>>http://repo.or.cz/w/ext4-patch-queue.git?a=blob;f=ext4_i_version_hi_2.patch;h=4519dd6540a78cadd235dad68248456d59c3384c;hb=8b956b5c5ccc3731f23fbce8d036b21f378fbdec
>>
>>Added Jean noel's inode version VFS patch and Ext4 patches. Now the full
>>inode version patch series can be found at ext4 patch queue:
>>
>># inode verion patch series
>># inode versioning is needed for NFSv4
>>
>># vfs changes, 64 bit inode->i_version
>>i_version_update_vfs.patch
>
>
> Looking through this, I don't understand why there are i_version updates
> in the VFS? The comments here imply that this is only for filesystems
> which will never be mounted (e.g. pipefs). Having i_version updates there
> is confusing and I don't think it helps anyone.
>
>
>># ext4 inode version update
>>i_version_update_ext4.patch
>>--- linux-2.6.22-rc4.orig/fs/ext4/super.c 2007-06-13 17:19:11.000000000 -0700
>>+++ linux-2.6.22-rc4/fs/ext4/super.c 2007-06-13 17:24:45.000000000 -0700
>>@@ -2846,8 +2846,8 @@ out:
>> i_size_write(inode, off+len-towrite);
>> EXT4_I(inode)->i_disksize = inode->i_size;
>> }
>>- inode->i_version++;
>> inode->i_mtime = inode->i_ctime = CURRENT_TIME;
>>+ inode->i_version = 1;
>> ext4_mark_inode_dirty(handle, inode);
>> mutex_unlock(&inode->i_mutex);
>> return len - towrite;
>
>
> The change from "i_version++" to "i_version = 1" in ext4_update_quota()
> is confusing. Why was this change made? If there is a good reason why
> the inode version stays at 1 for the quota file, maybe it deserves
> a comment explaining it.
>

I agree with both of your comments.

Mingming