On Thu, Jun 23, 2011 at 12:17, Mark Whitney <markwhitney@gmail.com> wrote:


Thanks for the quick response.  I had some success this time!  My test file did not did not disappear mounting with the new yaffs with tags-ecc-off:

root@homebase:~# mount -t yaffs2 -o tags-ecc-off /dev/mtdblock5 /mnt/card/
yaffs: dev is 32505861 name is "mtdblock5" rw
yaffs: passed flags "tags-ecc-off"
322 data (null) tags cedc7db0
194 data (null) tags cedc7db0
>yaffs: nandmtd2_read_chunk_tags chunk 1002 data (null) tags cedc7db0
el 0 ser 0 seq 4133
hused 1 obj 261 chunk168 byte 2048 del 0 ser 0 seq 4123
root@homebase:~# ls -/mnt/card/l/mnt/card/t/mnt/card/mnt/card/i/mnt/card/ /mnt/card//mnt/card/
      2 drwx------    1 root     root          2048 Jun 23 16:14 lost+found
    261 -rw-r--r--    1 root     root       3293184 Jun 23 16:12 testdata
root@homebase:~# cat /proc/yaffs
Multi-version YAFFS built:Jun 23 2011 10:32:11


Device 0 "system_a"
start_block.......... 0
end_block............ 785
total_bytes_per_chunk 2048
use_nand_ecc......... 1
no_tags_ecc.......... 1
is_yaffs2............ 1
inband_tags.......... 0
empty_lost_n_found... 1
disable_lazy_load.... 0
refresh_period....... 500
n_caches............. 10
n_reserved_blocks.... 5
always_check_erased.. 0

data_bytes_per_chunk. 2048
chunk_grp_bits....... 0
chunk_grp_size....... 1
n_erased_blocks...... 759
blocks_in_checkpt.... 0

n_tnodes............. 117
n_obj................ 5
n_free_chunks........ 48693

n_page_writes........ 67
n_page_reads......... 135
n_erasures........... 2
n_gc_copies.......... 66
all_gcs.............. 14
passive_gc_count..... 14
oldest_dirty_gc_count 0
n_gc_blocks.......... 1
bg_gcs............... 1
n_retired_writes..... 0
n_retired_blocks..... 0
n_ecc_fixed.......... 0
n_ecc_unfixed........ 0
n_tags_ecc_fixed..... 0
n_tags_ecc_unfixed... 0
cache_hits........... 0
n_deleted_files...... 0
n_unlinked_files..... 0
refresh_count........ 1
n_bg_deletions....... 0
tags_used............ 1664
summary_used......... 0
root@homebase:~# 


I was able to preserve my data in tests for far by first mounting the partition in the new yaffs version with the tags-ecc-off flag and then re-mounting the partition without the flag:

root@homebase:~# mount -t yaffs2 -o tags-ecc-off /dev/mtdblock5 /mnt/card; ls -l
 /mnt/card/
yaffs: dev is 32505861 name is "mtdblock5" rw
yaffs: passed flags "tags-ecc-off"
drwx------    1 root     root          2048 Jun 27 22:49 lost+found
-rw-r--r--    1 root     root       4628480 Jun 27 22:47 testdata
 /mnt/card/root@homebase:~# umount /dev/mtdblock5
 /mnt/card/root@homebase:~# mount -t yaffs2 /dev/mtdblock5 /mnt/card; ls -l /mnt/card/
yaffs: dev is 32505861 name is "mtdblock5" rw
yaffs: passed flags ""
drwx------    1 root     root          2048 Jun 27 22:50 lost+found
-rw-r--r--    1 root     root       4628480 Jun 27 22:47 testdata

Not exactly elegant, but does this seem like a reasonable way to migrate to the new format?  Is the main danger that I do not get the benefit of error protection when I do the first mount with the new format?

Thanks