public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] UBIFS fails on SheevaPlug
Date: Wed, 31 Oct 2012 17:50:10 +0100	[thread overview]
Message-ID: <509156C2.1070801@gmail.com> (raw)
In-Reply-To: <5091518B.8050007@gmail.com>

Dear Vikram Narayanan,

On 31.10.2012 17:27, Vikram Narayanan wrote:
> Hello Andreas,
> 
> On 10/30/2012 4:32 AM, Andreas Bie?mann wrote:
>> Dear Vikram Narayanan,
>>
>> first of all you are right. u-boot ubifs implementation will never
>> recover the ubifs on media, cause it is mounted read only.
>>
> 
> <snip>
> 
>> calls sget() (line 1043)
>> which in turn calls kzalloc() (line 67)
>> which may return -ENOMEM
> 
> I agree. But in Dimax's case this isn't. Right?

I dunno cause he has an old version which do not print the error code
(patch f75325e1927398f7e18e15f186b1fc52174cc19f is missing).

>> But u-boot will manage to get the data out of the unordered ubifs (if no
>> error like this ENOMEM occur). That is the same process as in kernel if
>> it is mounted read-only (recovery deferred).
> 
> I can't comment on this, unless I know the specifics.

Please read mount_ubifs() in fs/ubifs/super.c:582

Even if it is mounted read only and recovery is needed it will
ubifs_lpt_init(), ubifs_replay_journal(), ubifs_mount_orphans(), ...
If recovery is needed it will ubifs_recover_size() and if it is mounted
read only it will print at last 'recovery deferred' (in the other case
it would be still repaired here cause the steps before do it).
So at least a read only fs which needs recovery can be successfully
mounted (if no other error occurs; the most likely error is a ENOMEM
cause the ubifs does a lot of k(z)alloc).

>> So if the kernel can manage to mount the unordered ubifs u-boot should
>> do so. If it can't (but the kernel can) there is an error that should be
>> fixed.
>>
> 
> But in the kernel, the read-only isn't hardcoded. So, the kernel code
> can try to recover and even update the corrupted data back to the media
> and mount it. (It's my guess. The kernel may/mayn't do this way).

Well bootargs can have 'ro' so the root partition will be mounted read
only, wouldn't it? Wouldn't this 'ro' root partition not mounted by the
kernel then?

> But if the same fails to happen in u-boot code, I'd say the feature is
> missing and it needs to be pulled in from the kernel code.
> 
> Regards,
> Vikram

Best regards

Andreas Bie?mann

  reply	other threads:[~2012-10-31 16:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28 14:48 [U-Boot] UBIFS fails on SheevaPlug Dimax
2012-10-28 22:54 ` Marek Vasut
2012-10-29  5:25   ` Dimax
2012-10-29  6:38     ` Dimax
2012-10-29  6:48       ` Andreas Bießmann
2012-10-29  6:55         ` Dimax
2012-10-29  8:38           ` Andreas Bießmann
2012-10-29  8:50             ` Dimax
2012-10-29  9:11               ` Andreas Bießmann
2012-10-29  9:27                 ` Dimax
2012-10-29  9:43                   ` Andreas Bießmann
2012-10-29 10:19                     ` Marek Vasut
2012-10-29 10:34                       ` Andreas Bießmann
2012-10-29 16:02                   ` Vikram Narayanan
2012-10-29 12:15                 ` Prafulla Wadaskar
2012-10-29 17:25                   ` Dimax
2012-10-29 18:53                     ` Vikram Narayanan
2012-10-29 19:05                       ` Dimax
2012-10-29 23:55                         ` Andreas Bießmann
2012-10-29 23:02                       ` Andreas Bießmann
2012-10-31 16:27                         ` Vikram Narayanan
2012-10-31 16:50                           ` Andreas Bießmann [this message]
2012-10-31 16:55                             ` Vikram Narayanan
2012-10-31 17:23                               ` Dimax
2012-10-31 17:56                                 ` Andreas Bießmann
2012-10-31 20:45                                   ` [U-Boot] How to enable debug information in u-boot Paulo Louro
2012-11-06  7:51                                   ` [U-Boot] UBIFS fails on SheevaPlug Dimax
2012-11-06  9:12                                     ` Andreas Bießmann
2012-11-12  5:33                                       ` Dimax
2012-11-12  8:33                                         ` Andreas Bießmann
2012-11-12 16:55                                           ` Dimax
2012-11-12 17:15                                             ` Vikram Narayanan
2012-10-29  6:01 ` Prafulla Wadaskar

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=509156C2.1070801@gmail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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