[ECOS] jffs2 problem:mkdir

Andrew Lunn andrew@lunn.ch
Thu Sep 30 09:29:00 GMT 2004


On Thu, Sep 30, 2004 at 11:07:42AM +0800, liu hua wrote:
> hi,
> 
> I try to use the JFFS2 in my S3C4510B platform(like SNDS). When I run my 
> test program,"mount" and "chdir" can run normally,but "mkdir" cannt 
> run.When I use the eCos configure tools set the JFFS2 debug level to "1",I 
> can view some message when run "mkdir",it is "dirty size 0x00000000 + 
> unchecked_size 0x00000000 < nospc_dirty_size 0x00010000, returning 
> -ENOSPC".
> 
> What is wrong? Who can tell me how solve it and help me? Thanks!
> 
> Follow is some message,test program source code and run resoult:
> ***************************************************************************************
> 
> 
> --------------create jffs2 in redboot------------------------------------
> RedBoot> load jffs2.img -b 0x40000 -r
> Using default protocol (TFTP)
> Raw file loaded 0x00040000-0x00040947, assumed entry at 0x00040000
> RedBoot>
> RedBoot> fis create -b 0x40000 -l 0xa00 -f 0x1020000 jffs2
> RedBoot> fi li
> RAM: 0x00000000-0x01000000, [0x0002e820-0x00fed000] available
> FLASH: 0x01000000 - 0x01200000, 32 blocks of 0x00010000 bytes each.
> RedBoot> 
> RedBoot> fis li
> Name FLASH addr Mem addr Length Entry point
> RedBoot 0x01000000 0x01000000 0x00020000 0x00000000
> jffs2 0x01020000 0x01020000 0x00010000 0x0x00040000
> FIS directory 0x011F0000 0x011F0000 0x0000F000 0x00000000
> RedBoot config 0x011FF000 0x011FF000 0x00001000 0x00000000
> RedBoot> 
> 
> ------------------ run resoult ------------------------------
> RedBoot> load test.out
> Using default protocol (TFTP)
> Entry point: 0x00040040, address range: 0x00040000-0x000b5f4c
> RedBoot>
> mount ok
> chdir ok
> jffs2_lookup()
> <7>jffs2_reserve_space(): Requested 0x44 bytes
> <7>jffs2_reserve_space(): alloc sem got
> <7>dirty size 0x00000000 + unchecked_size 0x00000000 < nospc_dirty_size 
> 0x000100
> 00, returning -ENOSPC
> mkdir fail

Have you tried actually debugging this? What i think it means is your
filesystem is full and it has not been able to garbage collect enough
space to hold the directory inode. How many blocks does your
filesystem have? The fis li shown above suggests it only has one
block. How is it supposed to perform garbage collect with only one
block?

        Andrew



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list