aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-11 21:40:30 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-11 21:40:30 -0400
commit24264434603cc102d71fb2a1b3b7e282a781f449 (patch)
tree18af5274fa222f0420df30651f57bab1eaf75eab /fs/gfs2/incore.h
parent94610610f10749c0e17b4d2840ff8a7cb636c413 (diff)
[GFS2] Rewrite of examine_bucket()
The existing implementation of this function in glock.c was not very efficient as it relied upon keeping a cursor element upon the hash chain in question and moving it along. This new version improves upon this by using the current element as a cursor. This is possible since we only look at the "next" element in the list after we've taken the read_lock() subsequent to calling the examiner function. Obviously we have to eventually drop the ref count that we are then left with and we cannot do that while holding the read_lock, so we do that next time we drop the lock. That means either just before we examine another glock, or when the loop has terminated. The new implementation has several advantages: it uses only a read_lock() rather than a write_lock(), so it can run simnultaneously with other code, it doesn't need a "plug" element, so that it removes a test not only from this list iterator, but from all the other glock list iterators too. So it makes things faster and smaller. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 64e13435ca3..1fed8d1abae 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -152,7 +152,6 @@ struct gfs2_holder {
};
enum {
- GLF_PLUG = 0,
GLF_LOCK = 1,
GLF_STICKY = 2,
GLF_PREFETCH = 3,