summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/debug.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-04-23 14:15:24 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2008-04-23 14:15:24 +0100
commite2bc322bf05936ec7160d62bc3fd45cbf4aa405a (patch)
treeea7beb60c2fe6f35df9e6e51895812a9c254ad89 /fs/jffs2/debug.c
parent697fa9721cbc54ce1604dae09d1be6bb918567f6 (diff)
downloadop-kernel-dev-e2bc322bf05936ec7160d62bc3fd45cbf4aa405a.zip
op-kernel-dev-e2bc322bf05936ec7160d62bc3fd45cbf4aa405a.tar.gz
[JFFS2] Add erase_checking_list to hold blocks being marked.
Just to keep the debug code happy when it's adding all the blocks up. Otherwise, they disappear for a while while the locks are dropped to check them and write the cleanmarker. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/debug.c')
-rw-r--r--fs/jffs2/debug.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c
index e198468..5544d31 100644
--- a/fs/jffs2/debug.c
+++ b/fs/jffs2/debug.c
@@ -246,6 +246,10 @@ void __jffs2_dbg_superblock_counts(struct jffs2_sb_info *c)
nr_counted++;
erasing += c->sector_size;
}
+ list_for_each_entry(jeb, &c->erase_checking_list, list) {
+ nr_counted++;
+ erasing += c->sector_size;
+ }
list_for_each_entry(jeb, &c->erase_complete_list, list) {
nr_counted++;
erasing += c->sector_size;
@@ -582,6 +586,21 @@ __jffs2_dbg_dump_block_lists_nolock(struct jffs2_sb_info *c)
}
}
}
+ if (list_empty(&c->erase_checking_list)) {
+ printk(JFFS2_DBG "erase_checking_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->erase_checking_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+
+ if (!(jeb->used_size == 0 && jeb->dirty_size == 0 && jeb->wasted_size == 0)) {
+ printk(JFFS2_DBG "erase_checking_list: %#08x (used %#08x, dirty %#08x, wasted %#08x, unchecked %#08x, free %#08x)\n",
+ jeb->offset, jeb->used_size, jeb->dirty_size, jeb->wasted_size,
+ jeb->unchecked_size, jeb->free_size);
+ }
+ }
+ }
if (list_empty(&c->erase_pending_list)) {
printk(JFFS2_DBG "erase_pending_list: empty\n");
OpenPOWER on IntegriCloud