aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-10-13 22:51:24 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:33:29 -0500
commit1e81c4c3e0f55c95b6278a827262b80debd0dc7e (patch)
tree0e56f7aac8d2e27a783bd5a99dd5f3e5023b9aaf
parente928a76f959e89884f6186bb6f846c533847d5df (diff)
[GFS2] split and annotate gfs_rindex
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/gfs2/incore.h2
-rw-r--r--fs/gfs2/ondisk.c4
-rw-r--r--fs/gfs2/rgrp.c2
-rw-r--r--include/linux/gfs2_ondisk.h14
4 files changed, 15 insertions, 7 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index e69f3394a2ce..e4afc2c4d609 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -67,7 +67,7 @@ struct gfs2_rgrpd {
67 struct list_head rd_list_mru; 67 struct list_head rd_list_mru;
68 struct list_head rd_recent; /* Recently used rgrps */ 68 struct list_head rd_recent; /* Recently used rgrps */
69 struct gfs2_glock *rd_gl; /* Glock for this rgrp */ 69 struct gfs2_glock *rd_gl; /* Glock for this rgrp */
70 struct gfs2_rindex rd_ri; 70 struct gfs2_rindex_host rd_ri;
71 struct gfs2_rgrp_host rd_rg; 71 struct gfs2_rgrp_host rd_rg;
72 u64 rd_rg_vn; 72 u64 rd_rg_vn;
73 struct gfs2_bitmap *rd_bits; 73 struct gfs2_bitmap *rd_bits;
diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c
index b5aa7ab97f28..c4e099d582f7 100644
--- a/fs/gfs2/ondisk.c
+++ b/fs/gfs2/ondisk.c
@@ -97,7 +97,7 @@ void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf)
97 memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); 97 memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN);
98} 98}
99 99
100void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf) 100void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf)
101{ 101{
102 const struct gfs2_rindex *str = buf; 102 const struct gfs2_rindex *str = buf;
103 103
@@ -109,7 +109,7 @@ void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf)
109 109
110} 110}
111 111
112void gfs2_rindex_print(const struct gfs2_rindex *ri) 112void gfs2_rindex_print(const struct gfs2_rindex_host *ri)
113{ 113{
114 printk(KERN_INFO " ri_addr = %llu\n", (unsigned long long)ri->ri_addr); 114 printk(KERN_INFO " ri_addr = %llu\n", (unsigned long long)ri->ri_addr);
115 pv(ri, ri_length, "%u"); 115 pv(ri, ri_length, "%u");
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index b261385c0065..07dfd6305058 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -253,7 +253,7 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd)
253 253
254} 254}
255 255
256static inline int rgrp_contains_block(struct gfs2_rindex *ri, u64 block) 256static inline int rgrp_contains_block(struct gfs2_rindex_host *ri, u64 block)
257{ 257{
258 u64 first = ri->ri_data0; 258 u64 first = ri->ri_data0;
259 u64 last = first + ri->ri_data; 259 u64 last = first + ri->ri_data;
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h
index 76eb9e1bb773..7dd5e4c18a66 100644
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -168,6 +168,14 @@ struct gfs2_rindex {
168 __u8 ri_reserved[64]; 168 __u8 ri_reserved[64];
169}; 169};
170 170
171struct gfs2_rindex_host {
172 __u64 ri_addr; /* grp block disk address */
173 __u64 ri_data0; /* first data location */
174 __u32 ri_length; /* length of rgrp header in fs blocks */
175 __u32 ri_data; /* num of data blocks in rgrp */
176 __u32 ri_bitbytes; /* number of bytes in data bitmaps */
177};
178
171/* 179/*
172 * resource group header structure 180 * resource group header structure
173 */ 181 */
@@ -498,8 +506,8 @@ struct gfs2_quota_change {
498extern void gfs2_inum_in(struct gfs2_inum *no, const void *buf); 506extern void gfs2_inum_in(struct gfs2_inum *no, const void *buf);
499extern void gfs2_inum_out(const struct gfs2_inum *no, void *buf); 507extern void gfs2_inum_out(const struct gfs2_inum *no, void *buf);
500extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf); 508extern void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf);
501extern void gfs2_rindex_in(struct gfs2_rindex *ri, const void *buf); 509extern void gfs2_rindex_in(struct gfs2_rindex_host *ri, const void *buf);
502extern void gfs2_rindex_out(const struct gfs2_rindex *ri, void *buf); 510extern void gfs2_rindex_out(const struct gfs2_rindex_host *ri, void *buf);
503extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf); 511extern void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf);
504extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf); 512extern void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf);
505extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf); 513extern void gfs2_quota_in(struct gfs2_quota *qu, const void *buf);
@@ -517,7 +525,7 @@ extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, const void *buf);
517 525
518/* Printing functions */ 526/* Printing functions */
519 527
520extern void gfs2_rindex_print(const struct gfs2_rindex *ri); 528extern void gfs2_rindex_print(const struct gfs2_rindex_host *ri);
521extern void gfs2_dinode_print(const struct gfs2_dinode_host *di); 529extern void gfs2_dinode_print(const struct gfs2_dinode_host *di);
522 530
523#endif /* __KERNEL__ */ 531#endif /* __KERNEL__ */