summaryrefslogtreecommitdiff
path: root/yaffs_guts.c
diff options
context:
space:
mode:
authorCharles Manning <cdhmanning@gmail.com>2011-03-29 06:57:02 +1300
committerCharles Manning <cdhmanning@gmail.com>2011-03-29 06:57:02 +1300
commit1570788072c1154eff93282e0bb8564de40bd8aa (patch)
treefc0e11b7f406b5a6585eec9043642337abd0a49a /yaffs_guts.c
parentbf4900527f7eab3a629498f2aedbaebf259a6f7a (diff)
yaffs: Add first cut of block summary code
Some issues still need to be checked. In particular: * Is free space handling correct? * Is gc doing The Right Thing? Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_guts.c')
-rw-r--r--yaffs_guts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/yaffs_guts.c b/yaffs_guts.c
index 109a0b7..24126a1 100644
--- a/yaffs_guts.c
+++ b/yaffs_guts.c
@@ -27,6 +27,7 @@
#include "yaffs_nameval.h"
#include "yaffs_allocator.h"
#include "yaffs_attribs.h"
+#include "yaffs_summary.h"
/* Note YAFFS_GC_GOOD_ENOUGH must be <= YAFFS_GC_PASSIVE_THRESHOLD */
#define YAFFS_GC_GOOD_ENOUGH 2
@@ -4813,6 +4814,9 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
if (!init_failed && !yaffs_create_initial_dir(dev))
init_failed = 1;
+ if(!init_failed && dev->param.is_yaffs2 && !yaffs_summary_init(dev))
+ init_failed = 1;
+
if (!init_failed) {
/* Now scan the flash. */
if (dev->param.is_yaffs2) {
@@ -4898,6 +4902,8 @@ void yaffs_deinitialise(struct yaffs_dev *dev)
yaffs_deinit_blocks(dev);
yaffs_deinit_tnodes_and_objs(dev);
+ yaffs_summary_deinit(dev);
+
if (dev->param.n_caches > 0 && dev->cache) {
for (i = 0; i < dev->param.n_caches; i++) {