Re: [Yaffs] Read-Only mounted YAFFS2 - refreshing of NAND pa…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Ketil Froyn
Date:  
To: Andre Renaud
CC: Charles Manning, yaffs, Bean Huo (beanhuo)
Subject: Re: [Yaffs] Read-Only mounted YAFFS2 - refreshing of NAND pages
On 30 January 2018 at 21:15, Andre Renaud <> wrote:
> Hi Charles,
>
> On Wed, 31 Jan 2018 at 09:05 Charles Manning <> wrote:
>>
>> There is already something a bit like that for r/w partitions since Yaffs
>> will, occasionally, rewrite the oldest block and thus force it to refresh.
>>
>> It sounds like what is needed here are:
>> 1) A bit more active searching for bad pages.
>> 2) Mount flags to allow fix-up for read-only.
>
>
> I thought I'd just chime in with my 2 cents.
>
> We had a system in the past with similar requirements to this. The trouble
> is that there are two different ideas for read-only.
> 1. Read-only in the sense that at no point does anything write to the NAND
> device. This isn't really a good idea, due to read disturb etc..
> 2. Read-only in the sense that when userspace goes to open a file for
> writing, it always response with -EROFS. Whether the underlying NAND gets
> touched is not really a concern for userspace, as long as the system is
> reliable.


Two more cents...

I'd say this distinction is comparable to setting read-only at
different layers with file systems on ordinary block devices:

1. The block device is read-only, for example an SD-card with
write-block switch set, or a loopback device set up with "losetup -r".
In this case, nothing can be changed on the block device layer.

2. A file system is mounted read-only, but the underlying block device
is accessible for read-write. For example, even if you mount an ext4
filesystem read-only, a dirty journal will be written out to the
device. In cases like this, what actually happens on the block device
is outside of the scope of "mount -o ro", it just disallows any change
to the contents of the file system.

Regards, Ketil