[Yaffs-archive] Re: YAFFS partial fix for disk full conditio…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Luc Van Oostenryck, YAFFS list
Subject: [Yaffs-archive] Re: YAFFS partial fix for disk full condition
Luc

Thanx for these observations...


On Sat, 24 Aug 2002 10:26, Luc Van Oostenryck wrote:
> Luc Van Oostenryck wrote:
> > I've tested the disk full problem:
> > two problems remains:
> >
> > 1) when the disk is almost full, the GC seems to select block 1, 2 and 3
> > again and again
> >
> >     block 1:    352 times
> >     block 2:    287 times
> >     block 3:    313 times
> >     block 4-125:     55 times
> >     block 126:    141 times
> >     block 127:     10 times
> >    Is this an artefact of my worload or is it a real problem ?
> >    I can't see the code for the infrequent random block selection, is it
> > implemented ?


Garbage collection selects the most block with the most deleted pages (but
only searches over a few blocks). This means that if a block gets filled with
clean data that is never dirtied, then it will never get collected. THus,
what you are seeing is expected behaviour.

The infrequent random block selection is not implemented yet.

> >
> > 2) after the write finally return -ENOSPC, the deletion of the file
> > cause an Linux kernel oops.
> >    I will investigate this tomorrow.

>
> The oops is also comming from yaffs_UpdateObjectHeader() at the line:
>
>     oh->parentObjectID = in->parent->objectId;

>
> but in->parent is NULL.
>
> There is another problem in the follwing case:
> 1) mount YAFFS on a freshly erased NAND.
> 2) copy to the FS a file bigger than the  size of the partition.
> 3) only blocks 1, 2 and 3 are garbage collected.            !!!
> 4) eventually the write fail returning ENOSPC
> 5) umount the FS
> => failure because no more space to store the inode            !!!

>
> Shouldn't be possible to reserve space for dirty inode?
> otherwise, we will loose some data for which the write return successfully.


YAFFS reserves some blocks for garbage collection and for writing at critical
points (the useReserve flag in yaffs_Allocate().

Looks like we need to enable useReserve for flushes. This should not cause
exhastion since a flush will release the page it is replacing.

BTW: I have fixed the problem with data being lost if not unmounted. To be
checked in today.

>
>
>
>
>
>
> ---------------------------------------------------------------------------
>------------ This mailing list is hosted by Toby Churchill open software
> (www.toby-churchill.org). If mailing list membership is no longer wanted
> you can remove yourself from the list by sending an email to
> with the text "unsubscribe" (without the
> quotes) as the subject.



---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to with the text "unsubscribe"
(without the quotes) as the subject.