summaryrefslogtreecommitdiff
path: root/fs/gfs2/meta_io.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-22 01:05:23 +0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-22 01:05:23 +0400
commit7276b3b0c77101f8b3f4e45e89a29cf9045e831a (patch)
tree3dd0a981218e490ddf47f925ba20c254e491ce98 /fs/gfs2/meta_io.h
parent91fa47964165a42401fbc1f41caa63ab78564305 (diff)
downloadlinux-7276b3b0c77101f8b3f4e45e89a29cf9045e831a.tar.xz
[GFS2] Tidy up meta_io code
Fix a bug in the directory reading code, where we might have dereferenced a NULL pointer in case of OOM. Updated the directory code to use the new & improved version of gfs2_meta_ra() which now returns the first block that was being read. Previously it was releasing it requiring following code to grab the block again at each point it was called. Also turned off readahead on directory lookups since we are reading a hash table, and therefore reading the entries in order is very unlikely. Readahead is still used for all other calls to the directory reading function (e.g. when growing the hash table). Removed the DIO_START constant. Everywhere this was used, it was used to unconditionally start i/o aside from a couple of places, so I've removed it and made the couple of exceptions to this rule into separate functions. Also hunted through the other DIO flags and removed them as arguments from functions which were always called with the same combination of arguments. Updated gfs2_meta_indirect_buffer to be a bit more efficient and hopefully also be a bit easier to read. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/meta_io.h')
-rw-r--r--fs/gfs2/meta_io.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
index 086a472df3f1..3323e6d0ed8f 100644
--- a/fs/gfs2/meta_io.h
+++ b/fs/gfs2/meta_io.h
@@ -46,12 +46,12 @@ void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai);
void gfs2_ail_empty_gl(struct gfs2_glock *gl);
void gfs2_meta_inval(struct gfs2_glock *gl);
-void gfs2_meta_sync(struct gfs2_glock *gl, int flags);
+void gfs2_meta_sync(struct gfs2_glock *gl);
struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno);
int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno,
int flags, struct buffer_head **bhp);
-int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags);
+int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh);
void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh,
int meta);
@@ -71,7 +71,7 @@ static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip,
return gfs2_meta_indirect_buffer(ip, 0, ip->i_num.no_addr, 0, bhp);
}
-void gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
+struct buffer_head *gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
#endif /* __DIO_DOT_H__ */