tree: Can't find any valid page for page_id=0 ?

27 views
Skip to first unread message

Bart

unread,
Jan 24, 2012, 2:27:04 PM1/24/12
to UFFS
Dear,

What does cause the error message "tree: Can't find any valid page
for page_id=0 ?" ?

This happens after rebooting and during init of the filesystem and
just after "tree: build tree step one" and existing files disapear
from the filesytem.

Thanks!
Bart

Ricky Zheng

unread,
Jan 24, 2012, 3:08:26 PM1/24/12
to uf...@googlegroups.com
Hi Bart,

This is likely caused by the spare layout changed from last time you created the file. For example, when you upgrade UFFS from previous version, the file created with old version UFFS might not be recognized by new version UFFS.

Please format NAND flash (basically, 'Format' means erase all blocks of NAND flash) before upgrade UFFS.

Cheers,
Ricky.

Bart

--
You received this message because you are subscribed to the Google Groups "UFFS" group.
To post to this group, send email to uf...@googlegroups.com.
To unsubscribe from this group, send email to uffs+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/uffs?hl=en.


Bart

unread,
Jan 24, 2012, 3:36:36 PM1/24/12
to UFFS
Hi Ricky,

Thanks for replying so fast.

I've done a format of the NAND flash, recreated the file and have
the same behavior as before.

I'm using UBoot, might that interfer?

Thanks,
Bart

Ricky Zheng

unread,
Jan 24, 2012, 4:57:55 PM1/24/12
to uf...@googlegroups.com
u-boot has it's own ECC calculation and spare layout (for YAFFS or JFFS2), I suppose you already aware of that ... just make sure you are using the "raw" u-boot nand APIs for UFFS.

- Ricky

Bart

unread,
Jan 24, 2012, 7:31:52 PM1/24/12
to UFFS
indeed :-)

I'm not using YAFFS or JFFS2 - data seems to get lost after a reboot.
As the write check is ok, I don't think that UFFS is to blame, in fact
data should be in nand otherwise the write check can't succeed?

Will do some extra hardware tests and then take a look in u-boot to
see what is going on there

Thanks again!
Bart

Bart

unread,
Jan 25, 2012, 12:09:42 PM1/25/12
to UFFS
finished the hardware test: data in nand is kept after a reboot (with
and without u-boot, with and without UFFS)

how can I check which block and page is used by the page with
page_id=0? I'd suggest to dump the contents of that page and check it
manually

what do you suggest?

Thanks!
Bart

Bart

unread,
Jan 25, 2012, 1:36:28 PM1/25/12
to UFFS
got the block and pages that are queried for page_id (added extra
logging in uffs_FindPageInBlockWithPageId)

all queried tags are invalid (tag->s.valid == 1)

Ricky Zheng

unread,
Jan 25, 2012, 3:18:11 PM1/25/12
to uf...@googlegroups.com
What's you NAND flash page size ? spare size ? Could you dump all the spare area of the pages in question ?

Regards,
Ricky.

Bart

unread,
Jan 25, 2012, 5:22:42 PM1/25/12
to UFFS
NAND flash page size: 2048
spare size: 64

all spare areas contain 255 except for the last 7 pages, those contain
20,3,4,0,0,255,4,15,0,150,170,155,255,255,255,...

block_status_offs : 5
ecc_opt: UFFS_ECC_SOFT
layout_opt: UFFS_LAYOUT_UFFS

Thanks!
Bart

Ricky Zheng

unread,
Jan 25, 2012, 6:24:16 PM1/25/12
to uf...@googlegroups.com
So the problem is that UFFS tag was not written to spare area. UFFS should write to the pages from page 0.

By the way, the block_status_offs usually is 0 for large page NAND flash, please check your NAND flash datasheet make sure it is the right value - this won't cause the problem you described however.

- Ricky

Bart

unread,
Jan 25, 2012, 6:44:27 PM1/25/12
to UFFS
ok, I see

will change the block_status_offs

where in the code are tags written to the spare area?

Thanks!
Bart

Ricky Zheng

unread,
Jan 25, 2012, 7:18:44 PM1/25/12
to uf...@googlegroups.com
In uffs_FlashWritePageCombine(), UFFS transfer tag into spare data and then call WritePage() function of your NAND flash driver.

- Ricky

Bart

unread,
Jan 25, 2012, 7:42:05 PM1/25/12
to UFFS
thanks!

added some extra logging, this call is executed and writes spare data

spare data of two pages (in the same block) is written, I assume
that's normal as I only create a file and write some data to it?
Reply all
Reply to author
Forward
0 new messages