* [RFC] event cleanup, part 2
@ 2002-01-01 21:11 Manfred Spraul
2002-01-02 4:26 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: Manfred Spraul @ 2002-01-01 21:11 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
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
[-- Attachment #2: patch-event-VFS --]
[-- Type: text/plain, Size: 1184 bytes --]
diff -u 2.5/fs/block_dev.c build-2.5/fs/block_dev.c
--- 2.5/fs/block_dev.c Mon Dec 31 13:41:01 2001
+++ build-2.5/fs/block_dev.c Tue Jan 1 20:15:27 2002
@@ -181,7 +181,6 @@
if (offset != file->f_pos) {
file->f_pos = offset;
file->f_reada = 0;
- file->f_version = ++event;
}
retval = offset;
}
diff -u 2.5/fs/file_table.c build-2.5/fs/file_table.c
--- 2.5/fs/file_table.c Sun Sep 30 16:25:45 2001
+++ build-2.5/fs/file_table.c Mon Dec 31 16:29:29 2001
@@ -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);
diff -u 2.5/fs/read_write.c build-2.5/fs/read_write.c
--- 2.5/fs/read_write.c Sat Aug 11 16:15:27 2001
+++ build-2.5/fs/read_write.c Mon Dec 31 16:29:44 2001
@@ -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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFC] event cleanup, part 2
2002-01-01 21:11 [RFC] event cleanup, part 2 Manfred Spraul
@ 2002-01-02 4:26 ` Neil Brown
2002-01-02 9:19 ` Manfred Spraul
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2002-01-02 4:26 UTC (permalink / raw)
To: Manfred Spraul; +Cc: linux-kernel, linux-fsdevel
On Tuesday January 1, manfred@colorfullife.com wrote:
> 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.
Not quite. ext2 and ext3 (At least) use event to set i_generation to
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 with net_random or similar would be fine.
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] event cleanup, part 2
2002-01-02 4:26 ` Neil Brown
@ 2002-01-02 9:19 ` Manfred Spraul
0 siblings, 0 replies; 3+ messages in thread
From: Manfred Spraul @ 2002-01-02 9:19 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-kernel, linux-fsdevel
From: "Neil Brown" <neilb@cse.unsw.edu.au>
> On Tuesday January 1, manfred@colorfullife.com wrote:
> > 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.
>
> Not quite. ext2 and ext3 (At least) use event to set i_generation to
> 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 with net_random or 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-02 9:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-01 21:11 [RFC] event cleanup, part 2 Manfred Spraul
2002-01-02 4:26 ` Neil Brown
2002-01-02 9:19 ` Manfred Spraul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox