detecting that ubifs switched to ro after problem

Jon Ringle jon at ringle.org
Mon Jun 14 11:15:54 EDT 2010


On Sun, Jun 13, 2010 at 5:47 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Fri, 2010-06-11 at 22:46 -0400, Jon Ringle wrote:
>> Hi,
>>
>> I'd like to be able to somehow detect that ubifs has taken the action
>> of switching from rw to ro due to some error detected in the ubifs
>> filesystem. If I can detect this then maybe I can do something about
>> it, such as copying the ubifs contents to a .tar.bz2 in /tmp,
>> mkfs.ubifs, and restore .tar.bz2 back again.
>>
>> Is there a way I can do this?
>
> I think with 2fde99cb55fb9d9b88180512a5e8a5d939d27fec you can check for
> R/O state from /proc/mounts. Also, you can use something like inotify to
> watch /proc/mounts changes and react if UBIFS became r/o.

Any possibility of having that merged into
git://git.infradead.org/~dedekind/ubifs-v2.6.32.git?



More information about the linux-mtd mailing list