aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-10-13 21:47:13 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-11-30 10:33:14 -0500
commit551676226163379c217e8ec54bd287eab9b8521e (patch)
tree84abfa1a29c23890124f6dc66790af49917940b4 /fs/gfs2/recovery.c
parente697264709c86040271cdd7abee781d7adbb7f91 (diff)
[GFS2] split and annotate gfs2_log_head
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 62cd223819b7..447816241626 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -132,10 +132,10 @@ void gfs2_revoke_clean(struct gfs2_sbd *sdp)
132 */ 132 */
133 133
134static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk, 134static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
135 struct gfs2_log_header *head) 135 struct gfs2_log_header_host *head)
136{ 136{
137 struct buffer_head *bh; 137 struct buffer_head *bh;
138 struct gfs2_log_header lh; 138 struct gfs2_log_header_host lh;
139 u32 hash; 139 u32 hash;
140 int error; 140 int error;
141 141
@@ -143,7 +143,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
143 if (error) 143 if (error)
144 return error; 144 return error;
145 145
146 memcpy(&lh, bh->b_data, sizeof(struct gfs2_log_header)); 146 memcpy(&lh, bh->b_data, sizeof(struct gfs2_log_header)); /* XXX */
147 lh.lh_hash = 0; 147 lh.lh_hash = 0;
148 hash = gfs2_disk_hash((char *)&lh, sizeof(struct gfs2_log_header)); 148 hash = gfs2_disk_hash((char *)&lh, sizeof(struct gfs2_log_header));
149 gfs2_log_header_in(&lh, bh->b_data); 149 gfs2_log_header_in(&lh, bh->b_data);
@@ -174,7 +174,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
174 */ 174 */
175 175
176static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk, 176static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
177 struct gfs2_log_header *head) 177 struct gfs2_log_header_host *head)
178{ 178{
179 unsigned int orig_blk = *blk; 179 unsigned int orig_blk = *blk;
180 int error; 180 int error;
@@ -205,10 +205,10 @@ static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk,
205 * Returns: errno 205 * Returns: errno
206 */ 206 */
207 207
208static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head) 208static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
209{ 209{
210 unsigned int blk = head->lh_blkno; 210 unsigned int blk = head->lh_blkno;
211 struct gfs2_log_header lh; 211 struct gfs2_log_header_host lh;
212 int error; 212 int error;
213 213
214 for (;;) { 214 for (;;) {
@@ -245,9 +245,9 @@ static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
245 * Returns: errno 245 * Returns: errno
246 */ 246 */
247 247
248int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head) 248int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
249{ 249{
250 struct gfs2_log_header lh_1, lh_m; 250 struct gfs2_log_header_host lh_1, lh_m;
251 u32 blk_1, blk_2, blk_m; 251 u32 blk_1, blk_2, blk_m;
252 int error; 252 int error;
253 253
@@ -320,7 +320,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
320 length = be32_to_cpu(ld->ld_length); 320 length = be32_to_cpu(ld->ld_length);
321 321
322 if (be32_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) { 322 if (be32_to_cpu(ld->ld_header.mh_type) == GFS2_METATYPE_LH) {
323 struct gfs2_log_header lh; 323 struct gfs2_log_header_host lh;
324 error = get_log_header(jd, start, &lh); 324 error = get_log_header(jd, start, &lh);
325 if (!error) { 325 if (!error) {
326 gfs2_replay_incr_blk(sdp, &start); 326 gfs2_replay_incr_blk(sdp, &start);
@@ -363,7 +363,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start,
363 * Returns: errno 363 * Returns: errno
364 */ 364 */
365 365
366static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) 366static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
367{ 367{
368 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); 368 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
369 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); 369 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
@@ -425,7 +425,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd)
425{ 425{
426 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); 426 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
427 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); 427 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
428 struct gfs2_log_header head; 428 struct gfs2_log_header_host head;
429 struct gfs2_holder j_gh, ji_gh, t_gh; 429 struct gfs2_holder j_gh, ji_gh, t_gh;
430 unsigned long t; 430 unsigned long t;
431 int ro = 0; 431 int ro = 0;