mtd/fs/jffs2 fs.c,1.9,1.10 gc.c,1.69,1.70 nodelist.h,1.69,1.70 nodemgmt.c,1.65,1.66
David Woodhouse
dwmw2 at infradead.org
Fri May 10 15:14:49 EDT 2002
- Previous message: mtd/fs/jffs2 nodelist.c,1.30.2.3,1.30.2.4
- Next message: mtd/fs/jffs2 background.c,1.24,1.25 build.c,1.33,1.34 gc.c,1.70,1.71 nodelist.h,1.70,1.71 nodemgmt.c,1.66,1.67 scan.c,1.73,1.74
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv14639
Modified Files:
fs.c gc.c nodelist.h nodemgmt.c
Log Message:
Move dumping of block lists to nodemgmt.c, call it from gc.c too
Index: fs.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/fs.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- fs.c 10 May 2002 16:36:11 -0000 1.9
+++ fs.c 10 May 2002 19:14:46 -0000 1.10
@@ -68,121 +68,9 @@
buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT;
-#if CONFIG_JFFS2_FS_DEBUG > 0
- printk(KERN_DEBUG "STATFS:\n");
- printk(KERN_DEBUG "flash_size: %08x\n", c->flash_size);
- printk(KERN_DEBUG "used_size: %08x\n", c->used_size);
- printk(KERN_DEBUG "dirty_size: %08x\n", c->dirty_size);
- printk(KERN_DEBUG "free_size: %08x\n", c->free_size);
- printk(KERN_DEBUG "erasing_size: %08x\n", c->erasing_size);
- printk(KERN_DEBUG "bad_size: %08x\n", c->bad_size);
- printk(KERN_DEBUG "sector_size: %08x\n", c->sector_size);
- printk(KERN_DEBUG "jffs2_reserved_blocks size: %08x\n",c->sector_size * JFFS2_RESERVED_BLOCKS_WRITE);
-
- if (c->nextblock) {
- printk(KERN_DEBUG "nextblock: 0x%08x\n", c->nextblock->offset);
- } else {
- printk(KERN_DEBUG "nextblock: NULL\n");
- }
- if (c->gcblock) {
- printk(KERN_DEBUG "gcblock: 0x%08x\n", c->gcblock->offset);
- } else {
- printk(KERN_DEBUG "gcblock: NULL\n");
- }
- if (list_empty(&c->clean_list)) {
- printk(KERN_DEBUG "clean_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->clean_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "clean_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->dirty_list)) {
- printk(KERN_DEBUG "dirty_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->dirty_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "dirty_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->erasable_list)) {
- printk(KERN_DEBUG "erasable_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->erasable_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "erasable_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->erasing_list)) {
- printk(KERN_DEBUG "erasing_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->erasing_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "erasing_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->erase_pending_list)) {
- printk(KERN_DEBUG "erase_pending_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->erase_pending_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "erase_pending_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->erasable_pending_wbuf_list)) {
- printk(KERN_DEBUG "erasable_pending_wbuf_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->erasable_pending_wbuf_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "erase_pending_wbuf_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->free_list)) {
- printk(KERN_DEBUG "free_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->free_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "free_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->bad_list)) {
- printk(KERN_DEBUG "bad_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->bad_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "bad_list: %08x\n", jeb->offset);
- }
- }
- if (list_empty(&c->bad_used_list)) {
- printk(KERN_DEBUG "bad_used_list: empty\n");
- } else {
- struct list_head *this;
-
- list_for_each(this, &c->bad_used_list) {
- struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
- printk(KERN_DEBUG "bad_used_list: %08x\n", jeb->offset);
- }
- }
-#endif /* CONFIG_JFFS2_FS_DEBUG */
+ D1(jffs2_dump_block_lists(c));
spin_unlock_bh(&c->erase_completion_lock);
-
return 0;
}
Index: gc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/gc.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- gc.c 15 Mar 2002 10:47:54 -0000 1.69
+++ gc.c 10 May 2002 19:14:46 -0000 1.70
@@ -104,6 +104,8 @@
printk(KERN_WARNING "Eep. ret->gc_node for block at 0x%08x is NULL\n", ret->offset);
BUG();
}
+ D1(printk("Picked block at %08x, used_size %08x, dirty_size %08x, free_size %08x\n", ret->offset, ret->used_size, ret->dirty_size, ret->free_size));
+ D1(jffs2_dump_block_lists(c));
return ret;
}
Index: nodelist.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- nodelist.h 15 Mar 2002 11:00:36 -0000 1.69
+++ nodelist.h 10 May 2002 19:14:46 -0000 1.70
@@ -271,6 +271,7 @@
int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *new, uint32_t len, int dirty);
void jffs2_complete_reservation(struct jffs2_sb_info *c);
void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *raw);
+void jffs2_dump_block_lists(struct jffs2_sb_info *c);
/* write.c */
int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri);
Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodemgmt.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- nodemgmt.c 28 Mar 2002 11:05:27 -0000 1.65
+++ nodemgmt.c 10 May 2002 19:14:46 -0000 1.66
@@ -480,3 +480,118 @@
return;
}
}
+#if CONFIG_JFFS2_FS_DEBUG > 0
+void jffs2_dump_block_lists(struct jffs2_sb_info *c)
+{
+ printk(KERN_DEBUG "jffs2_dump_block_lists:\n");
+ printk(KERN_DEBUG "flash_size: %08x\n", c->flash_size);
+ printk(KERN_DEBUG "used_size: %08x\n", c->used_size);
+ printk(KERN_DEBUG "dirty_size: %08x\n", c->dirty_size);
+ printk(KERN_DEBUG "free_size: %08x\n", c->free_size);
+ printk(KERN_DEBUG "erasing_size: %08x\n", c->erasing_size);
+ printk(KERN_DEBUG "bad_size: %08x\n", c->bad_size);
+ printk(KERN_DEBUG "sector_size: %08x\n", c->sector_size);
+ printk(KERN_DEBUG "jffs2_reserved_blocks size: %08x\n",c->sector_size * JFFS2_RESERVED_BLOCKS_WRITE);
+
+ if (c->nextblock) {
+ printk(KERN_DEBUG "nextblock: %08x (used %08x, dirty %08x, free %08x)\n", c->nextblock->offset, c->nextblock->used_size, c->nextblock->dirty_size, c->nextblock->free_size);
+ } else {
+ printk(KERN_DEBUG "nextblock: NULL\n");
+ }
+ if (c->gcblock) {
+ printk(KERN_DEBUG "gcblock: %08x (used %08x, dirty %08x, free %08x)\n", c->gcblock->offset, c->gcblock->used_size, c->gcblock->dirty_size, c->gcblock->free_size);
+ } else {
+ printk(KERN_DEBUG "gcblock: NULL\n");
+ }
+ if (list_empty(&c->clean_list)) {
+ printk(KERN_DEBUG "clean_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->clean_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "clean_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->dirty_list)) {
+ printk(KERN_DEBUG "dirty_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->dirty_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "dirty_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->erasable_list)) {
+ printk(KERN_DEBUG "erasable_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->erasable_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "erasable_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->erasing_list)) {
+ printk(KERN_DEBUG "erasing_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->erasing_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "erasing_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->erase_pending_list)) {
+ printk(KERN_DEBUG "erase_pending_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->erase_pending_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "erase_pending_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->erasable_pending_wbuf_list)) {
+ printk(KERN_DEBUG "erasable_pending_wbuf_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->erasable_pending_wbuf_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "erase_pending_wbuf_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->free_list)) {
+ printk(KERN_DEBUG "free_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->free_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "free_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->bad_list)) {
+ printk(KERN_DEBUG "bad_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->bad_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "bad_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+ if (list_empty(&c->bad_used_list)) {
+ printk(KERN_DEBUG "bad_used_list: empty\n");
+ } else {
+ struct list_head *this;
+
+ list_for_each(this, &c->bad_used_list) {
+ struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);
+ printk(KERN_DEBUG "bad_used_list: %08x (used %08x, dirty %08x, free %08x)\n", jeb->offset, jeb->used_size, jeb->dirty_size, jeb->free_size);
+ }
+ }
+}
+#endif /* CONFIG_JFFS2_FS_DEBUG */
- Previous message: mtd/fs/jffs2 nodelist.c,1.30.2.3,1.30.2.4
- Next message: mtd/fs/jffs2 background.c,1.24,1.25 build.c,1.33,1.34 gc.c,1.70,1.71 nodelist.h,1.70,1.71 nodemgmt.c,1.66,1.67 scan.c,1.73,1.74
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-mtd-cvs
mailing list