public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: David Bergeron <mho.linux-mtd@b2n.ca>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS volume corruption (bad node at LEB 0:0)
Date: Tue, 20 Jan 2009 11:01:30 +0200	[thread overview]
Message-ID: <1232442090.22350.45.camel@localhost.localdomain> (raw)
In-Reply-To: <3A5BB4FC-6A13-4B8A-94B2-80FCF75E2BBF@b2n.ca>

On Mon, 2009-01-19 at 22:44 -0500, David Bergeron wrote:
> So here's my sysadmin grade speculation (I'm no filesystem guru):
> - A script is executed & open
> - It is soon deleted and replaced by a new one but cannot be released  
> just yet
Right, and UBIFS (well, and other FSes) calls such files "orphans" -
they are opened, but deleted. Indeed UBIFS does not do final removal for
such files until after the final close().

> - There is little time between the file becoming unreferenced and the  
> filesystem becoming read-only
> - [wild speculation] Something goes wrong, the LEB it used had to be  
> orphaned but it's too late, some bad pointer gives LEB 0 the axe

Yeah, our current theory is that you have your script running, which
means it is opened, and it is orphan now, and you re-mount the FS R/O,
and end up with a R/O FS + an orphan. We never considered this scenario
before. And the scenario is a little nasty because UBIFS may want to
write when you release the orphan (close the file), but the FS is R/O.
We'll work on this, thanks for excellent bug description!

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

  parent reply	other threads:[~2009-01-20  9:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08  4:13 UBIFS volume corruption (bad node at LEB 0:0) David Bergeron
2009-01-08  6:46 ` Artem Bityutskiy
2009-01-16 15:34   ` David Bergeron
2009-01-19  8:56     ` Artem Bityutskiy
2009-01-20  3:44       ` David Bergeron
2009-01-20  5:40         ` David Bergeron
2009-01-20  9:01         ` Artem Bityutskiy [this message]
2009-01-20 21:47           ` David Bergeron
2009-01-14 16:17 ` Artem Bityutskiy
2009-01-16 21:23   ` David Bergeron
2009-01-26  9:18 ` Artem Bityutskiy
2009-01-28  2:20   ` Kyungmin Park
2009-01-28  7:51     ` Artem Bityutskiy
2009-01-28  8:24     ` Adrian Hunter
2009-01-29  4:24       ` Kyungmin Park
2009-01-28 16:31   ` David Bergeron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232442090.22350.45.camel@localhost.localdomain \
    --to=dedekind@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mho.linux-mtd@b2n.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox