diff options
Diffstat (limited to 'fs/jffs/jffs_fm.c')
-rw-r--r-- | fs/jffs/jffs_fm.c | 105 |
1 files changed, 54 insertions, 51 deletions
diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c index 0cab8da49d3c..053e3a98a276 100644 --- a/fs/jffs/jffs_fm.c +++ b/fs/jffs/jffs_fm.c | |||
@@ -31,6 +31,60 @@ static void jffs_free_fm(struct jffs_fm *n); | |||
31 | extern kmem_cache_t *fm_cache; | 31 | extern kmem_cache_t *fm_cache; |
32 | extern kmem_cache_t *node_cache; | 32 | extern kmem_cache_t *node_cache; |
33 | 33 | ||
34 | #if CONFIG_JFFS_FS_VERBOSE > 0 | ||
35 | void | ||
36 | jffs_print_fmcontrol(struct jffs_fmcontrol *fmc) | ||
37 | { | ||
38 | D(printk("struct jffs_fmcontrol: 0x%p\n", fmc)); | ||
39 | D(printk("{\n")); | ||
40 | D(printk(" %u, /* flash_size */\n", fmc->flash_size)); | ||
41 | D(printk(" %u, /* used_size */\n", fmc->used_size)); | ||
42 | D(printk(" %u, /* dirty_size */\n", fmc->dirty_size)); | ||
43 | D(printk(" %u, /* free_size */\n", fmc->free_size)); | ||
44 | D(printk(" %u, /* sector_size */\n", fmc->sector_size)); | ||
45 | D(printk(" %u, /* min_free_size */\n", fmc->min_free_size)); | ||
46 | D(printk(" %u, /* max_chunk_size */\n", fmc->max_chunk_size)); | ||
47 | D(printk(" 0x%p, /* mtd */\n", fmc->mtd)); | ||
48 | D(printk(" 0x%p, /* head */ " | ||
49 | "(head->offset = 0x%08x)\n", | ||
50 | fmc->head, (fmc->head ? fmc->head->offset : 0))); | ||
51 | D(printk(" 0x%p, /* tail */ " | ||
52 | "(tail->offset + tail->size = 0x%08x)\n", | ||
53 | fmc->tail, | ||
54 | (fmc->tail ? fmc->tail->offset + fmc->tail->size : 0))); | ||
55 | D(printk(" 0x%p, /* head_extra */\n", fmc->head_extra)); | ||
56 | D(printk(" 0x%p, /* tail_extra */\n", fmc->tail_extra)); | ||
57 | D(printk("}\n")); | ||
58 | } | ||
59 | #endif /* CONFIG_JFFS_FS_VERBOSE > 0 */ | ||
60 | |||
61 | #if CONFIG_JFFS_FS_VERBOSE > 2 | ||
62 | static void | ||
63 | jffs_print_fm(struct jffs_fm *fm) | ||
64 | { | ||
65 | D(printk("struct jffs_fm: 0x%p\n", fm)); | ||
66 | D(printk("{\n")); | ||
67 | D(printk(" 0x%08x, /* offset */\n", fm->offset)); | ||
68 | D(printk(" %u, /* size */\n", fm->size)); | ||
69 | D(printk(" 0x%p, /* prev */\n", fm->prev)); | ||
70 | D(printk(" 0x%p, /* next */\n", fm->next)); | ||
71 | D(printk(" 0x%p, /* nodes */\n", fm->nodes)); | ||
72 | D(printk("}\n")); | ||
73 | } | ||
74 | #endif /* CONFIG_JFFS_FS_VERBOSE > 2 */ | ||
75 | |||
76 | #if 0 | ||
77 | void | ||
78 | jffs_print_node_ref(struct jffs_node_ref *ref) | ||
79 | { | ||
80 | D(printk("struct jffs_node_ref: 0x%p\n", ref)); | ||
81 | D(printk("{\n")); | ||
82 | D(printk(" 0x%p, /* node */\n", ref->node)); | ||
83 | D(printk(" 0x%p, /* next */\n", ref->next)); | ||
84 | D(printk("}\n")); | ||
85 | } | ||
86 | #endif /* 0 */ | ||
87 | |||
34 | /* This function creates a new shiny flash memory control structure. */ | 88 | /* This function creates a new shiny flash memory control structure. */ |
35 | struct jffs_fmcontrol * | 89 | struct jffs_fmcontrol * |
36 | jffs_build_begin(struct jffs_control *c, int unit) | 90 | jffs_build_begin(struct jffs_control *c, int unit) |
@@ -742,54 +796,3 @@ int jffs_get_node_inuse(void) | |||
742 | { | 796 | { |
743 | return no_jffs_node; | 797 | return no_jffs_node; |
744 | } | 798 | } |
745 | |||
746 | void | ||
747 | jffs_print_fmcontrol(struct jffs_fmcontrol *fmc) | ||
748 | { | ||
749 | D(printk("struct jffs_fmcontrol: 0x%p\n", fmc)); | ||
750 | D(printk("{\n")); | ||
751 | D(printk(" %u, /* flash_size */\n", fmc->flash_size)); | ||
752 | D(printk(" %u, /* used_size */\n", fmc->used_size)); | ||
753 | D(printk(" %u, /* dirty_size */\n", fmc->dirty_size)); | ||
754 | D(printk(" %u, /* free_size */\n", fmc->free_size)); | ||
755 | D(printk(" %u, /* sector_size */\n", fmc->sector_size)); | ||
756 | D(printk(" %u, /* min_free_size */\n", fmc->min_free_size)); | ||
757 | D(printk(" %u, /* max_chunk_size */\n", fmc->max_chunk_size)); | ||
758 | D(printk(" 0x%p, /* mtd */\n", fmc->mtd)); | ||
759 | D(printk(" 0x%p, /* head */ " | ||
760 | "(head->offset = 0x%08x)\n", | ||
761 | fmc->head, (fmc->head ? fmc->head->offset : 0))); | ||
762 | D(printk(" 0x%p, /* tail */ " | ||
763 | "(tail->offset + tail->size = 0x%08x)\n", | ||
764 | fmc->tail, | ||
765 | (fmc->tail ? fmc->tail->offset + fmc->tail->size : 0))); | ||
766 | D(printk(" 0x%p, /* head_extra */\n", fmc->head_extra)); | ||
767 | D(printk(" 0x%p, /* tail_extra */\n", fmc->tail_extra)); | ||
768 | D(printk("}\n")); | ||
769 | } | ||
770 | |||
771 | void | ||
772 | jffs_print_fm(struct jffs_fm *fm) | ||
773 | { | ||
774 | D(printk("struct jffs_fm: 0x%p\n", fm)); | ||
775 | D(printk("{\n")); | ||
776 | D(printk(" 0x%08x, /* offset */\n", fm->offset)); | ||
777 | D(printk(" %u, /* size */\n", fm->size)); | ||
778 | D(printk(" 0x%p, /* prev */\n", fm->prev)); | ||
779 | D(printk(" 0x%p, /* next */\n", fm->next)); | ||
780 | D(printk(" 0x%p, /* nodes */\n", fm->nodes)); | ||
781 | D(printk("}\n")); | ||
782 | } | ||
783 | |||
784 | #if 0 | ||
785 | void | ||
786 | jffs_print_node_ref(struct jffs_node_ref *ref) | ||
787 | { | ||
788 | D(printk("struct jffs_node_ref: 0x%p\n", ref)); | ||
789 | D(printk("{\n")); | ||
790 | D(printk(" 0x%p, /* node */\n", ref->node)); | ||
791 | D(printk(" 0x%p, /* next */\n", ref->next)); | ||
792 | D(printk("}\n")); | ||
793 | } | ||
794 | #endif /* 0 */ | ||
795 | |||