yaffs: Clean up some tracing.
authorCharles Manning <cdhmanning@gmail.com>
Tue, 9 Nov 2010 00:50:51 +0000 (13:50 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Tue, 9 Nov 2010 00:50:51 +0000 (13:50 +1300)
Make some checkpt messages conditional.

Fix up trace table screwed up by lindent.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_guts.c
yaffs_vfs_multi.c
yaffs_vfs_single.c
yaffs_yaffs2.c

index 110a3c2..2348a94 100644 (file)
@@ -5058,7 +5058,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                if (dev->param.is_yaffs2) {
                        if (yaffs2_checkpt_restore(dev)) {
                                yaffs_check_obj_details_loaded(dev->root_dir);
-                               T(YAFFS_TRACE_ALWAYS,
+                               T(YAFFS_TRACE_CHECKPOINT | YAFFS_TRACE_MOUNT,
                                  (TSTR
                                   ("yaffs: restored from checkpoint"
                                    TENDSTR)));
index 0bb06f4..1d9ca00 100644 (file)
@@ -3323,35 +3323,36 @@ static struct {
        char *mask_name;
        unsigned mask_bitfield;
 } mask_flags[] = {
-       {
-       "allocate", YAFFS_TRACE_ALLOCATE}, {
-       "always", YAFFS_TRACE_ALWAYS}, {
-       "background", YAFFS_TRACE_BACKGROUND}, {
-       "bad_blocks", YAFFS_TRACE_BAD_BLOCKS}, {
-       "buffers", YAFFS_TRACE_BUFFERS}, {
-       "bug", YAFFS_TRACE_BUG}, {
-       "checkpt", YAFFS_TRACE_CHECKPOINT}, {
-       "deletion", YAFFS_TRACE_DELETION}, {
-       "erase", YAFFS_TRACE_ERASE}, {
-       "error", YAFFS_TRACE_ERROR}, {
-       "gc_detail", YAFFS_TRACE_GC_DETAIL}, {
-       "gc", YAFFS_TRACE_GC}, {
-       "lock", YAFFS_TRACE_LOCK}, {
-       "mtd", YAFFS_TRACE_MTD}, {
-       "nandaccess", YAFFS_TRACE_NANDACCESS}, {
-       "os", YAFFS_TRACE_OS}, {
-       "scan_debug", YAFFS_TRACE_SCAN_DEBUG}, {
-       "scan", YAFFS_TRACE_SCAN}, {
-       "tracing", YAFFS_TRACE_TRACING}, {
-       "sync", YAFFS_TRACE_SYNC}, {
-       "write", YAFFS_TRACE_WRITE}, {
-       "verify", YAFFS_TRACE_VERIFY}, {
-       "verify_nand", YAFFS_TRACE_VERIFY_NAND}, {
-       "verify_full", YAFFS_TRACE_VERIFY_FULL}, {
-       "verify_all", YAFFS_TRACE_VERIFY_ALL}, {
-       "all", 0xffffffff}, {
-       "none", 0}, {
-NULL, 0},};
+       {"allocate", YAFFS_TRACE_ALLOCATE},
+       {"always", YAFFS_TRACE_ALWAYS},
+       {"background", YAFFS_TRACE_BACKGROUND},
+       {"bad_blocks", YAFFS_TRACE_BAD_BLOCKS},
+       {"buffers", YAFFS_TRACE_BUFFERS},
+       {"bug", YAFFS_TRACE_BUG},
+       {"checkpt", YAFFS_TRACE_CHECKPOINT},
+       {"deletion", YAFFS_TRACE_DELETION},
+       {"erase", YAFFS_TRACE_ERASE},
+       {"error", YAFFS_TRACE_ERROR},
+       {"gc_detail", YAFFS_TRACE_GC_DETAIL},
+       {"gc", YAFFS_TRACE_GC},
+       {"lock", YAFFS_TRACE_LOCK},
+       {"mtd", YAFFS_TRACE_MTD},
+       {"nandaccess", YAFFS_TRACE_NANDACCESS},
+       {"os", YAFFS_TRACE_OS},
+       {"scan_debug", YAFFS_TRACE_SCAN_DEBUG},
+       {"scan", YAFFS_TRACE_SCAN},
+       {"mount", YAFFS_TRACE_MOUNT},
+       {"tracing", YAFFS_TRACE_TRACING},
+       {"sync", YAFFS_TRACE_SYNC},
+       {"write", YAFFS_TRACE_WRITE},
+       {"verify", YAFFS_TRACE_VERIFY},
+       {"verify_nand", YAFFS_TRACE_VERIFY_NAND},
+       {"verify_full", YAFFS_TRACE_VERIFY_FULL},
+       {"verify_all", YAFFS_TRACE_VERIFY_ALL},
+       {"all", 0xffffffff},
+       {"none", 0},
+       {NULL, 0},
+};
 
 #define MAX_MASK_NAME_LENGTH 40
 static int yaffs_proc_write_trace_options(struct file *file, const char *buf,
index 61bf255..c5376e9 100644 (file)
@@ -2744,35 +2744,36 @@ static struct {
        char *mask_name;
        unsigned mask_bitfield;
 } mask_flags[] = {
-       {
-       "allocate", YAFFS_TRACE_ALLOCATE}, {
-       "always", YAFFS_TRACE_ALWAYS}, {
-       "background", YAFFS_TRACE_BACKGROUND}, {
-       "bad_blocks", YAFFS_TRACE_BAD_BLOCKS}, {
-       "buffers", YAFFS_TRACE_BUFFERS}, {
-       "bug", YAFFS_TRACE_BUG}, {
-       "checkpt", YAFFS_TRACE_CHECKPOINT}, {
-       "deletion", YAFFS_TRACE_DELETION}, {
-       "erase", YAFFS_TRACE_ERASE}, {
-       "error", YAFFS_TRACE_ERROR}, {
-       "gc_detail", YAFFS_TRACE_GC_DETAIL}, {
-       "gc", YAFFS_TRACE_GC}, {
-       "lock", YAFFS_TRACE_LOCK}, {
-       "mtd", YAFFS_TRACE_MTD}, {
-       "nandaccess", YAFFS_TRACE_NANDACCESS}, {
-       "os", YAFFS_TRACE_OS}, {
-       "scan_debug", YAFFS_TRACE_SCAN_DEBUG}, {
-       "scan", YAFFS_TRACE_SCAN}, {
-       "tracing", YAFFS_TRACE_TRACING}, {
-       "sync", YAFFS_TRACE_SYNC}, {
-       "write", YAFFS_TRACE_WRITE}, {
-       "verify", YAFFS_TRACE_VERIFY}, {
-       "verify_nand", YAFFS_TRACE_VERIFY_NAND}, {
-       "verify_full", YAFFS_TRACE_VERIFY_FULL}, {
-       "verify_all", YAFFS_TRACE_VERIFY_ALL}, {
-       "all", 0xffffffff}, {
-       "none", 0}, {
-NULL, 0},};
+       {"allocate", YAFFS_TRACE_ALLOCATE}, 
+       {"always", YAFFS_TRACE_ALWAYS},
+       {"background", YAFFS_TRACE_BACKGROUND},
+       {"bad_blocks", YAFFS_TRACE_BAD_BLOCKS},
+       {"buffers", YAFFS_TRACE_BUFFERS},
+       {"bug", YAFFS_TRACE_BUG},
+       {"checkpt", YAFFS_TRACE_CHECKPOINT},
+       {"deletion", YAFFS_TRACE_DELETION},
+       {"erase", YAFFS_TRACE_ERASE},
+       {"error", YAFFS_TRACE_ERROR},
+       {"gc_detail", YAFFS_TRACE_GC_DETAIL},
+       {"gc", YAFFS_TRACE_GC},
+       {"lock", YAFFS_TRACE_LOCK},
+       {"mtd", YAFFS_TRACE_MTD},
+       {"nandaccess", YAFFS_TRACE_NANDACCESS},
+       {"os", YAFFS_TRACE_OS},
+       {"scan_debug", YAFFS_TRACE_SCAN_DEBUG},
+       {"scan", YAFFS_TRACE_SCAN},
+       {"mount", YAFFS_TRACE_MOUNT},
+       {"tracing", YAFFS_TRACE_TRACING},
+       {"sync", YAFFS_TRACE_SYNC},
+       {"write", YAFFS_TRACE_WRITE},
+       {"verify", YAFFS_TRACE_VERIFY},
+       {"verify_nand", YAFFS_TRACE_VERIFY_NAND},
+       {"verify_full", YAFFS_TRACE_VERIFY_FULL},
+       {"verify_all", YAFFS_TRACE_VERIFY_ALL},
+       {"all", 0xffffffff},
+       {"none", 0},
+       {NULL, 0},
+};
 
 #define MAX_MASK_NAME_LENGTH 40
 static int yaffs_proc_write_trace_options(struct file *file, const char *buf,
index ad35fd5..4f11765 100644 (file)
@@ -828,7 +828,7 @@ int yaffs_checkpoint_save(struct yaffs_dev *dev)
                yaffs2_wr_checkpt_data(dev);
        }
 
-       T(YAFFS_TRACE_ALWAYS,
+       T(YAFFS_TRACE_CHECKPOINT | YAFFS_TRACE_MOUNT,
          (TSTR("save exit: is_checkpointed %d" TENDSTR),
           dev->is_checkpointed));