projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs direct: Prevent yaffs_start_up being called twice.
[yaffs2.git]
/
yaffs_yaffs2.c
diff --git
a/yaffs_yaffs2.c
b/yaffs_yaffs2.c
index 34c0bde985cb5d972624d31b9e905b5aa489511d..5761e960e646c816c0628a2c7b64470bb55c04f1 100644
(file)
--- a/
yaffs_yaffs2.c
+++ b/
yaffs_yaffs2.c
@@
-957,9
+957,13
@@
static inline int yaffs2_scan_chunk(struct yaffs_dev *dev,
result = yaffs_summary_fetch(dev, &tags, chunk_in_block);
tags.seq_number = bi->seq_number;
}
result = yaffs_summary_fetch(dev, &tags, chunk_in_block);
tags.seq_number = bi->seq_number;
}
-
- if (!summary_available || tags.obj_id == 0)
+
+ if (!summary_available || tags.obj_id == 0)
{
result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL, &tags);
result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL, &tags);
+ dev->tags_used++;
+ } else {
+ dev->summary_used++;
+ }
/* Let's have a good look at this chunk... */
/* Let's have a good look at this chunk... */
@@
-1019,6
+1023,7
@@
static inline int yaffs2_scan_chunk(struct yaffs_dev *dev,
dev->n_free_chunks++;
} else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
dev->n_free_chunks++;
} else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
+ tags.obj_id == YAFFS_OBJECTID_SUMMARY ||
(tags.chunk_id > 0 &&
tags.n_bytes > dev->data_bytes_per_chunk) ||
tags.seq_number != bi->seq_number) {
(tags.chunk_id > 0 &&
tags.n_bytes > dev->data_bytes_per_chunk) ||
tags.seq_number != bi->seq_number) {
@@
-1464,7
+1469,7
@@
int yaffs2_scan_backwards(struct yaffs_dev *dev)
bi = yaffs_get_block_info(dev, blk);
deleted = 0;
bi = yaffs_get_block_info(dev, blk);
deleted = 0;
- summary_available = yaffs_summary_read(dev, blk);
+ summary_available = yaffs_summary_read(dev,
dev->sum_tags,
blk);
/* For each chunk in each block that needs scanning.... */
found_chunks = 0;
/* For each chunk in each block that needs scanning.... */
found_chunks = 0;