event cleanup, part 2
RFC 1/1 event cleanup, part 2
Linus merged the first part of my patches that remove 'event' into 2.5.2-pre3.
Attached is the second patch.
patch 1: remove all event users except readdir().
Merged.
patch 2: replace 'f_version=++event' with 'f_version=0'
in fs/*.c Attached.
patch 3: change the filesystems one by one.
s/inode->i_version=++event/inode->i_version++/g vfat already uses that code for the revalidate handling. For readdir() it's impossible until step 2 is merged.
patch 4: remove event entirely.
I'm not yet sure if initializing i_version to 0 should be done in get_empty_inode() or in the fs that use the readdir optimization.
--
Manfred
fs/block_dev.c +0 -1
@@ -181,7 +181,6 @@if (offset != file->f_pos) { file->f_pos = offset; file->f_reada =0 ; - file->f_version = ++event; } retval = offset; }
fs/file_table.c +1 -1
@@ -43,7 +43,7 @@ new_one:memset (f,0 ,sizeof (*f));atomic_set (&f->f_count,1 ); - f->f_version = ++event; + f->f_version =0 ; f->f_uid = current->fsuid; f->f_gid = current->fsgid;list_add (&f->f_list, &anon_list);
fs/read_write.c +0 -2
@@ -41,7 +41,6 @@if (offset != file->f_pos) { file->f_pos = offset; file->f_reada =0 ; - file->f_version = ++event; } retval = offset; }
@@ -69,7 +68,6 @@if (offset != file->f_pos) { file->f_pos = offset; file->f_reada =0 ; - file->f_version = ++event; } retval = offset; }
From: "Neil Brown" <[email protected]>
Quoted 6 lines · On Tuesday January 1, [email protected] wrote:
Quoted 5 lines
Linus merged the first part of my patches that remove 'event' into 2.5.2-pre3.
Attached is the second patch.
Quoted 8 lines
Quoted 2 lines
patch 1: remove all event users except
readdir().
Merged.Not quite. ext2 and ext3 (At least) use event to set
i_generationto a pseudo-random number, and that still seems to be so in 2.5.2-pre6. What do you plan to do with that usage of event?
Possibly replacing it withnet_randomor similar would be fine.
I've replaced i_generation with a random number in ext2, that change is part of 2.5.2-pre6.
I've sent the patch to ext3 to the maintainers.
--
Manfred