linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* detecting that ubifs switched to ro after problem
@ 2010-06-12  2:46 Jon Ringle
  2010-06-13  9:47 ` Artem Bityutskiy
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Ringle @ 2010-06-12  2:46 UTC (permalink / raw)
  To: linux-mtd

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?

Thanks,
Jon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: detecting that ubifs switched to ro after problem
  2010-06-12  2:46 detecting that ubifs switched to ro after problem Jon Ringle
@ 2010-06-13  9:47 ` Artem Bityutskiy
  2010-06-13 10:07   ` Artem Bityutskiy
  2010-06-14 15:15   ` Jon Ringle
  0 siblings, 2 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2010-06-13  9:47 UTC (permalink / raw)
  To: Jon Ringle; +Cc: linux-mtd

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.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: detecting that ubifs switched to ro after problem
  2010-06-13  9:47 ` Artem Bityutskiy
@ 2010-06-13 10:07   ` Artem Bityutskiy
  2010-06-14 15:15   ` Jon Ringle
  1 sibling, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2010-06-13 10:07 UTC (permalink / raw)
  To: Jon Ringle; +Cc: linux-mtd

On Sun, 2010-06-13 at 12:47 +0300, Artem Bityutskiy 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.

Just added:

http://www.linux-mtd.infradead.org/faq/ubifs.html#L_detect_ro

for your convenience.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: detecting that ubifs switched to ro after problem
  2010-06-13  9:47 ` Artem Bityutskiy
  2010-06-13 10:07   ` Artem Bityutskiy
@ 2010-06-14 15:15   ` Jon Ringle
  2010-06-16  6:44     ` Artem Bityutskiy
  1 sibling, 1 reply; 5+ messages in thread
From: Jon Ringle @ 2010-06-14 15:15 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd

On Sun, Jun 13, 2010 at 5:47 AM, Artem Bityutskiy <dedekind1@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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: detecting that ubifs switched to ro after problem
  2010-06-14 15:15   ` Jon Ringle
@ 2010-06-16  6:44     ` Artem Bityutskiy
  0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2010-06-16  6:44 UTC (permalink / raw)
  To: Jon Ringle; +Cc: linux-mtd

On Mon, 2010-06-14 at 11:15 -0400, Jon Ringle wrote:
> On Sun, Jun 13, 2010 at 5:47 AM, Artem Bityutskiy <dedekind1@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?

It is there since 2010-05-23, you just need to use "git pull" from time
to time :-)

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-16  6:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12  2:46 detecting that ubifs switched to ro after problem Jon Ringle
2010-06-13  9:47 ` Artem Bityutskiy
2010-06-13 10:07   ` Artem Bityutskiy
2010-06-14 15:15   ` Jon Ringle
2010-06-16  6:44     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).