diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-15 08:03:51 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-15 10:05:06 -0400 |
commit | 77a7ae580c6cc8a0f0d5d7a7d61eb7e9fe8d99dc (patch) | |
tree | 299adfb136ca146d9bbfd7e171351ab971c1b93d /fs/ubifs/log.c | |
parent | d6d140097beb554daa967d3fb576e94ad2f82dcd (diff) |
UBIFS: improve journal head debugging prints
Convert the journal head integer into the head name when printing
debugging information.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/log.c')
-rw-r--r-- | fs/ubifs/log.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c index 60dcf6cbd61b..c345e125f42c 100644 --- a/fs/ubifs/log.c +++ b/fs/ubifs/log.c | |||
@@ -169,8 +169,8 @@ void ubifs_add_bud(struct ubifs_info *c, struct ubifs_bud *bud) | |||
169 | */ | 169 | */ |
170 | c->bud_bytes += c->leb_size - bud->start; | 170 | c->bud_bytes += c->leb_size - bud->start; |
171 | 171 | ||
172 | dbg_log("LEB %d:%d, jhead %d, bud_bytes %lld", bud->lnum, | 172 | dbg_log("LEB %d:%d, jhead %s, bud_bytes %lld", bud->lnum, |
173 | bud->start, bud->jhead, c->bud_bytes); | 173 | bud->start, dbg_jhead(bud->jhead), c->bud_bytes); |
174 | spin_unlock(&c->buds_lock); | 174 | spin_unlock(&c->buds_lock); |
175 | } | 175 | } |
176 | 176 | ||
@@ -355,16 +355,16 @@ static void remove_buds(struct ubifs_info *c) | |||
355 | * heads (non-closed buds). | 355 | * heads (non-closed buds). |
356 | */ | 356 | */ |
357 | c->cmt_bud_bytes += wbuf->offs - bud->start; | 357 | c->cmt_bud_bytes += wbuf->offs - bud->start; |
358 | dbg_log("preserve %d:%d, jhead %d, bud bytes %d, " | 358 | dbg_log("preserve %d:%d, jhead %s, bud bytes %d, " |
359 | "cmt_bud_bytes %lld", bud->lnum, bud->start, | 359 | "cmt_bud_bytes %lld", bud->lnum, bud->start, |
360 | bud->jhead, wbuf->offs - bud->start, | 360 | dbg_jhead(bud->jhead), wbuf->offs - bud->start, |
361 | c->cmt_bud_bytes); | 361 | c->cmt_bud_bytes); |
362 | bud->start = wbuf->offs; | 362 | bud->start = wbuf->offs; |
363 | } else { | 363 | } else { |
364 | c->cmt_bud_bytes += c->leb_size - bud->start; | 364 | c->cmt_bud_bytes += c->leb_size - bud->start; |
365 | dbg_log("remove %d:%d, jhead %d, bud bytes %d, " | 365 | dbg_log("remove %d:%d, jhead %s, bud bytes %d, " |
366 | "cmt_bud_bytes %lld", bud->lnum, bud->start, | 366 | "cmt_bud_bytes %lld", bud->lnum, bud->start, |
367 | bud->jhead, c->leb_size - bud->start, | 367 | dbg_jhead(bud->jhead), c->leb_size - bud->start, |
368 | c->cmt_bud_bytes); | 368 | c->cmt_bud_bytes); |
369 | rb_erase(p1, &c->buds); | 369 | rb_erase(p1, &c->buds); |
370 | /* | 370 | /* |
@@ -429,7 +429,8 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum) | |||
429 | if (lnum == -1 || offs == c->leb_size) | 429 | if (lnum == -1 || offs == c->leb_size) |
430 | continue; | 430 | continue; |
431 | 431 | ||
432 | dbg_log("add ref to LEB %d:%d for jhead %d", lnum, offs, i); | 432 | dbg_log("add ref to LEB %d:%d for jhead %s", |
433 | lnum, offs, dbg_jhead(i)); | ||
433 | ref = buf + len; | 434 | ref = buf + len; |
434 | ref->ch.node_type = UBIFS_REF_NODE; | 435 | ref->ch.node_type = UBIFS_REF_NODE; |
435 | ref->lnum = cpu_to_le32(lnum); | 436 | ref->lnum = cpu_to_le32(lnum); |