From 1c179647cc26bcc05144dab770f4576979ad7152 Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Mon, 4 Apr 2011 07:13:28 +1200 Subject: yaffs: Fix incorrect incrementing in summary writing. Should only be incremented once. --- yaffs_summary.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/yaffs_summary.c b/yaffs_summary.c index b9ef0d2..4cf1711 100644 --- a/yaffs_summary.c +++ b/yaffs_summary.c @@ -119,8 +119,6 @@ static int yaffs_summary_write(struct yaffs_dev *dev, int blk) chunk_in_nand++; chunk_in_block++; tags.chunk_id++; - - chunk_in_block++; } while (result == YAFFS_OK && n_bytes > 0); yaffs_release_temp_buffer(dev, buffer); -- cgit v1.2.3 From 8670595b355e66200c97aa1668af04d4eaebaa6b Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Mon, 4 Apr 2011 07:57:39 +1200 Subject: yaffs: Discard partially written summary data A power failure during the write of a multi-chunk summary can leave stuff lying around that looks like part of a file. If this is detected then delete it. Signed-off-by: Charles Manning --- yaffs_yaffs2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/yaffs_yaffs2.c b/yaffs_yaffs2.c index 093e485..5761e96 100644 --- a/yaffs_yaffs2.c +++ b/yaffs_yaffs2.c @@ -1023,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 || + tags.obj_id == YAFFS_OBJECTID_SUMMARY || (tags.chunk_id > 0 && tags.n_bytes > dev->data_bytes_per_chunk) || tags.seq_number != bi->seq_number) { -- cgit v1.2.3 From dd73ab5baea1c47571054d1dc7f0c68e91616c2a Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Tue, 5 Apr 2011 16:35:20 +1200 Subject: yaffs: Add summary code to kernel Makefile Signed-off-by: Charles Manning --- Makefile.kernel | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.kernel b/Makefile.kernel index 881c7f5..6a8729c 100644 --- a/Makefile.kernel +++ b/Makefile.kernel @@ -13,5 +13,6 @@ yaffs-y += yaffs_allocator.o yaffs-y += yaffs_yaffs1.o yaffs-y += yaffs_yaffs2.o yaffs-y += yaffs_bitmap.o +yaffs-y += yaffs_summary.o yaffs-y += yaffs_verify.o -- cgit v1.2.3 From 6d0911ccf93af1b88bfaef9aa5e02d8dfc33f56a Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Tue, 5 Apr 2011 16:38:11 +1200 Subject: yaffs: Change disable-summary option to be consistent with others Signed-off-by: Charles Manning --- yaffs_vfs_multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c index 15ff4ff..9a61418 100644 --- a/yaffs_vfs_multi.c +++ b/yaffs_vfs_multi.c @@ -2576,7 +2576,7 @@ static int yaffs_parse_options(struct yaffs_options *options, } else if (!strcmp(cur_opt, "lazy-loading-on")) { options->lazy_loading_enabled = 1; options->lazy_loading_overridden = 1; - } else if (!strcmp(cur_opt, "disable_summary")) { + } else if (!strcmp(cur_opt, "disable-summary")) { options->disable_summary = 1; } else if (!strcmp(cur_opt, "empty-lost-and-found-off")) { options->empty_lost_and_found = 0; -- cgit v1.2.3