linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update
@ 2007-07-01  7:37 Mingming Cao
  2007-07-03  6:49 ` Aneesh Kumar K.V
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Mingming Cao @ 2007-07-01  7:37 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, linux-ext4, nfsv4

This patch is on top of i_version_update_vfs.
The i_version field of the inode is set on inode creation and incremented when
the inode is being modified.

Signed-off-by: Jean Noel Cordenner <jean-noel.cordenner@bull.net>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>

Index: linux-2.6.22-rc4/fs/ext4/ialloc.c
===================================================================
--- linux-2.6.22-rc4.orig/fs/ext4/ialloc.c	2007-06-13 17:16:28.000000000 -0700
+++ linux-2.6.22-rc4/fs/ext4/ialloc.c	2007-06-13 17:24:45.000000000 -0700
@@ -565,6 +565,7 @@ got:
 	inode->i_blocks = 0;
 	inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
 						       ext4_current_time(inode);
+	inode->i_version = 1;
 
 	memset(ei->i_data, 0, sizeof(ei->i_data));
 	ei->i_dir_start_lookup = 0;
Index: linux-2.6.22-rc4/fs/ext4/inode.c
===================================================================
--- linux-2.6.22-rc4.orig/fs/ext4/inode.c	2007-06-13 17:21:29.000000000 -0700
+++ linux-2.6.22-rc4/fs/ext4/inode.c	2007-06-13 17:24:45.000000000 -0700
@@ -3082,6 +3082,7 @@ int ext4_mark_iloc_dirty(handle_t *handl
 {
 	int err = 0;
 
+	inode->i_version++;
 	/* the do_update_inode consumes one bh->b_count */
 	get_bh(iloc->bh);
 
Index: linux-2.6.22-rc4/fs/ext4/super.c
===================================================================
--- 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;

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-07-11 12:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-01  7:37 [EXT4 set 4][PATCH 4/5] i_version:ext4 inode version update Mingming Cao
2007-07-03  6:49 ` Aneesh Kumar K.V
2007-07-03 21:41   ` Andreas Dilger
2007-07-03  6:55 ` Aneesh Kumar K.V
2007-07-04  5:26   ` Aneesh Kumar K.V
2007-07-04  3:31     ` Mingming Cao
2007-07-04  5:26   ` Aneesh Kumar K.V
2007-07-10 23:31 ` Andrew Morton
2007-07-11  8:47 ` Christoph Hellwig
2007-07-11 11:52   ` Andreas Dilger
2007-07-11 12:02     ` Christoph Hellwig
2007-07-11 11:54   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).