Re: [Yaffs] Saving checkpoint on remount read-only

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: ian@brightstareng.com
Date:  
To: yaffs
CC: Charles Manning
Subject: Re: [Yaffs] Saving checkpoint on remount read-only
On Tuesday 20 March 2007 17:15, Charles Manning wrote:
> On Wednesday 21 March 2007 01:50, wrote:
> > On Tuesday 20 March 2007 06:31, Vitaly Wool wrote:
> > > > The attached patch implements saving of yaffs checkpoint
> > > > in case fs is remounted read-only. This allows the usage
> > > > of checkpoint mechanizm even if, for some reason, the
> > > > system can not cleanly unmount yaffs filesystem but can
> > > > remount it read-only.
> >
> > Does this change mean that when a user mounts Yaffs fs
> > read-only that write operations may take place to the NAND
> > media?
>
> I'd have to go through the code but I believe that this is the
> case in certain conditions.
>
> If there is no checkpoint and yaffs scans, then as stuff is
> being scanned the obsolete stuff can be deleted. It is perhaps
> hard to understand why this might happen, but here is a
> scenario:
>
> If you have a file open and unlink it, that file still exists
> and can be used. It only gets deleted when the handle to the
> file is released. If the system was reset (unclean power
> down), then the scan would pick this up and could do the
> deletion.


I can follow this logic -- but I'm still left with an uneasy
feeling that the media state might be changed when I mount a
filesystem read-only. I would not expected it to write/erase
anything -- shouldn't the 'clean-up' be elided when mounting RO?

If the underlying media were write-protected, as with the button
on a VAX RA81 drive, the 'clean-up' write/erase would fail.

-imcd