#
# NB Warning this Makefile does not include header dependencies.
#
-# $Id: Makefile,v 1.22 2009-01-04 21:44:24 charles Exp $
+# $Id: Makefile,v 1.23 2010-01-11 04:06:47 charles Exp $
#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h yaffs_nandemul2k.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
- yaffs_qsort.c yaffs_qsort.h
+ yaffs_qsort.c yaffs_qsort.h yaffs_trace.h
#all: directtest2k boottest
#
# NB Warning this Makefile does not include header dependencies.
#
-# $Id: Makefile,v 1.4 2009-10-12 23:05:49 charles Exp $
+# $Id: Makefile,v 1.5 2010-01-11 04:06:47 charles Exp $
#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
yaffs_fileem2k.h yaffsfs.h yaffs_malloc.h yaffs_ramdisk.h ydirectenv.h \
yaffscfg.h yaffs_fileem.c yaffs_flashif.c yaffs_ramdisk.c yaffs_ramem2k.c\
yaffs_norif1.c yaffs_norif1.h ynorsim.c ynorsim.h \
- yaffs_nandif.c yaffs_nandif.h
+ yaffs_nandif.c yaffs_nandif.h yaffs_trace.h
SYMLINKS = $(YAFFSSYMLINKS) $(YAFFSDIRECTSYMLINKS)
*/
#include "yaffsfs.h"
+#include "yaffs_trace.h"
int simulate_power_failure;
int random_seed;
#
# NB Warning this Makefile does not include header dependencies.
#
-# $Id: Makefile,v 1.5 2009-12-14 19:46:27 charles Exp $
+# $Id: Makefile,v 1.6 2010-01-11 04:06:47 charles Exp $
#EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC
yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h yaffs_nandemul2k.h \
yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
- yaffs_qsort.c yaffs_qsort.h
+ yaffs_qsort.c yaffs_qsort.h yaffs_trace.h
YAFFSDIRECTSYMLINKS = yaffscfg2k.c yaffs_fileem2k.c yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
yaffs_fileem2k.h yaffsfs.h yaffs_malloc.h yaffs_ramdisk.h ydirectenv.h \
#include "yaffsfs.h"
+#include "yaffs_trace.h"
+
#include "nor_stress.h"
#include "yaffs_fsx.h"
* This is only intended as test code to test persistence etc.
*/
-const char *yaffs_flashif_c_version = "$Id: yaffs_fileem.c,v 1.5 2009-01-12 00:49:01 charles Exp $";
+const char *yaffs_flashif_c_version = "$Id: yaffs_fileem.c,v 1.6 2010-01-11 04:06:47 charles Exp $";
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_flashif.h"
#include "yaffs_guts.h"
* This is only intended as test code to test persistence etc.
*/
-const char *yaffs_flashif2_c_version = "$Id: yaffs_fileem2k.c,v 1.21 2009-11-07 22:35:15 charles Exp $";
+const char *yaffs_flashif2_c_version = "$Id: yaffs_fileem2k.c,v 1.22 2010-01-11 04:06:47 charles Exp $";
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_flashif2.h"
#include "yaffs_guts.h"
*
*/
-const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.4 2009-01-09 02:54:14 charles Exp $";
+const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.5 2010-01-11 04:06:47 charles Exp $";
#include "yaffs_norif1.h"
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_flashif.h"
#include "yaffs_guts.h"
* Use this with dev->useNANDECC enabled, then ECC overheads are not required.
*/
-const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.5 2008-05-05 07:58:58 charles Exp $";
+const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04:06:47 charles Exp $";
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_ramdisk.h"
#include "yaffs_guts.h"
*/
-const char *yaffs_ramem2k_c_version = "$Id: yaffs_ramem2k.c,v 1.5 2009-10-14 00:01:57 charles Exp $";
+const char *yaffs_ramem2k_c_version = "$Id: yaffs_ramem2k.c,v 1.6 2010-01-11 04:06:47 charles Exp $";
#ifndef __KERNEL__
#define CONFIG_YAFFS_RAM_ENABLED
#ifdef CONFIG_YAFFS_RAM_ENABLED
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_nandemul2k.h"
#include "yaffs_guts.h"
#include "yaffs_fileem2k.h"
#include "yaffs_nandemul2k.h"
#include "yaffs_norif1.h"
+#include "yaffs_trace.h"
#include <errno.h>
#include "yaffsfs.h"
#include "yaffs_guts.h"
#include "yaffscfg.h"
-#include <string.h> // for memset
#include "yportenv.h"
+#include "yaffs_trace.h"
+
+#include <string.h> // for memset
#define YAFFSFS_MAX_SYMLINK_DEREFERENCES 5
#endif
-const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.30 2010-01-06 04:00:23 charles Exp $";
+const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.31 2010-01-11 04:06:47 charles Exp $";
// configurationList is the list of devices that are supported
static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
*/
const char *yaffs_fs_c_version =
- "$Id: yaffs_fs.c,v 1.90 2009-12-23 03:14:17 charles Exp $";
+ "$Id: yaffs_fs.c,v 1.91 2010-01-11 04:06:46 charles Exp $";
extern const char *yaffs_guts_c_version;
#include <linux/version.h>
#include <linux/uaccess.h>
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_guts.h"
#include <linux/mtd/mtd.h>
dev = obj->myDev;
- T(YAFFS_TRACE_OS, ("yaffs_sync_object\n"));
+ T(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC, ("yaffs_sync_object\n"));
yaffs_GrossLock(dev);
yaffs_FlushFile(obj, 1, datasync);
yaffs_GrossUnlock(dev);
{
yaffs_Device *dev = yaffs_SuperToDevice(sb);
- T(YAFFS_TRACE_OS, ("yaffs_do_sync_fs\n"));
+ T(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC, ("yaffs_do_sync_fs\n"));
if (sb->s_dirt) {
yaffs_GrossLock(dev);
#endif
{
- T(YAFFS_TRACE_OS, ("yaffs_write_super\n"));
+ T(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC, ("yaffs_write_super\n"));
if (yaffs_auto_checkpoint >= 2)
yaffs_do_sync_fs(sb);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
static int yaffs_sync_fs(struct super_block *sb)
#endif
{
- T(YAFFS_TRACE_OS, ("yaffs_sync_fs\n"));
+ T(YAFFS_TRACE_OS | YAFFS_TRACE_SYNC, ("yaffs_sync_fs\n"));
if (yaffs_auto_checkpoint >= 1)
yaffs_do_sync_fs(sb);
{"scan_debug", YAFFS_TRACE_SCAN_DEBUG},
{"scan", YAFFS_TRACE_SCAN},
{"tracing", YAFFS_TRACE_TRACING},
+ {"sync", YAFFS_TRACE_SYNC},
{"verify", YAFFS_TRACE_VERIFY},
{"verify_nand", YAFFS_TRACE_VERIFY_NAND},
#define __YAFFS_GETBLOCKINFO_H__
#include "yaffs_guts.h"
+#include "yaffs_trace.h"
/* Function to manipulate block info */
static Y_INLINE yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device * dev, int blk)
*/
const char *yaffs_guts_c_version =
- "$Id: yaffs_guts.c,v 1.105 2010-01-06 04:02:12 charles Exp $";
+ "$Id: yaffs_guts.c,v 1.106 2010-01-11 04:06:46 charles Exp $";
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffsinterface.h"
#include "yaffs_guts.h"
*/
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_guts.h"
#include "yaffs_packedtags1.h"
#include "yaffs_tagscompat.h" /* for yaffs_CalcTagsECC */
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
-const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.11 2009-09-09 03:03:01 charles Exp $";
+const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.12 2010-01-11 04:06:46 charles Exp $";
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
/* mtd interface for YAFFS2 */
const char *yaffs_mtdif2_c_version =
- "$Id: yaffs_mtdif2.c,v 1.24 2009-10-14 00:01:57 charles Exp $";
+ "$Id: yaffs_mtdif2.c,v 1.25 2010-01-11 04:06:46 charles Exp $";
#include "yportenv.h"
-
+#include "yaffs_trace.h"
#include "yaffs_mtdif2.h"
#include "yaffs_packedtags2.h"
#include "yportenv.h"
+#include "yaffs_trace.h"
#include "yaffs_tagsvalidity.h"
/* This code packs a set of extended tags into a binary structure for
#include "yaffs_tagscompat.h"
#include "yaffs_ecc.h"
#include "yaffs_getblockinfo.h"
+#include "yaffs_trace.h"
static void yaffs_HandleReadDataError(yaffs_Device *dev, int chunkInNAND);
#ifdef NOTYET
--- /dev/null
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2007 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+
+#ifndef __YTRACE_H__
+#define __YTRACE_H__
+
+extern unsigned int yaffs_traceMask;
+extern unsigned int yaffs_wr_attempts;
+
+/*
+ * Tracing flags.
+ * The flags masked in YAFFS_TRACE_ALWAYS are always traced.
+ */
+
+#define YAFFS_TRACE_OS 0x00000002
+#define YAFFS_TRACE_ALLOCATE 0x00000004
+#define YAFFS_TRACE_SCAN 0x00000008
+#define YAFFS_TRACE_BAD_BLOCKS 0x00000010
+#define YAFFS_TRACE_ERASE 0x00000020
+#define YAFFS_TRACE_GC 0x00000040
+#define YAFFS_TRACE_WRITE 0x00000080
+#define YAFFS_TRACE_TRACING 0x00000100
+#define YAFFS_TRACE_DELETION 0x00000200
+#define YAFFS_TRACE_BUFFERS 0x00000400
+#define YAFFS_TRACE_NANDACCESS 0x00000800
+#define YAFFS_TRACE_GC_DETAIL 0x00001000
+#define YAFFS_TRACE_SCAN_DEBUG 0x00002000
+#define YAFFS_TRACE_MTD 0x00004000
+#define YAFFS_TRACE_CHECKPOINT 0x00008000
+
+#define YAFFS_TRACE_VERIFY 0x00010000
+#define YAFFS_TRACE_VERIFY_NAND 0x00020000
+#define YAFFS_TRACE_VERIFY_FULL 0x00040000
+#define YAFFS_TRACE_VERIFY_ALL 0x000F0000
+
+#define YAFFS_TRACE_SYNC 0x00100000
+
+#define YAFFS_TRACE_ERROR 0x40000000
+#define YAFFS_TRACE_BUG 0x80000000
+#define YAFFS_TRACE_ALWAYS 0xF0000000
+
+
+#define T(mask, p) do { if ((mask) & (yaffs_traceMask | YAFFS_TRACE_ALWAYS)) TOUT(p); } while (0)
+
+#endif
#endif
-/* see yaffs_fs.c */
-extern unsigned int yaffs_traceMask;
-extern unsigned int yaffs_wr_attempts;
-
-/*
- * Tracing flags.
- * The flags masked in YAFFS_TRACE_ALWAYS are always traced.
- */
-
-#define YAFFS_TRACE_OS 0x00000002
-#define YAFFS_TRACE_ALLOCATE 0x00000004
-#define YAFFS_TRACE_SCAN 0x00000008
-#define YAFFS_TRACE_BAD_BLOCKS 0x00000010
-#define YAFFS_TRACE_ERASE 0x00000020
-#define YAFFS_TRACE_GC 0x00000040
-#define YAFFS_TRACE_WRITE 0x00000080
-#define YAFFS_TRACE_TRACING 0x00000100
-#define YAFFS_TRACE_DELETION 0x00000200
-#define YAFFS_TRACE_BUFFERS 0x00000400
-#define YAFFS_TRACE_NANDACCESS 0x00000800
-#define YAFFS_TRACE_GC_DETAIL 0x00001000
-#define YAFFS_TRACE_SCAN_DEBUG 0x00002000
-#define YAFFS_TRACE_MTD 0x00004000
-#define YAFFS_TRACE_CHECKPOINT 0x00008000
-
-#define YAFFS_TRACE_VERIFY 0x00010000
-#define YAFFS_TRACE_VERIFY_NAND 0x00020000
-#define YAFFS_TRACE_VERIFY_FULL 0x00040000
-#define YAFFS_TRACE_VERIFY_ALL 0x000F0000
-
-
-#define YAFFS_TRACE_ERROR 0x40000000
-#define YAFFS_TRACE_BUG 0x80000000
-#define YAFFS_TRACE_ALWAYS 0xF0000000
-
-
-#define T(mask, p) do { if ((mask) & (yaffs_traceMask | YAFFS_TRACE_ALWAYS)) TOUT(p); } while (0)
#ifndef YBUG
#define YBUG() do {T(YAFFS_TRACE_BUG, (TSTR("==>> yaffs bug: " __FILE__ " %d" TENDSTR), __LINE__)); } while (0)