All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Andrew Murray <amurray@mpcdata.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: validate_sb: bad superblock, error 8 (Minimum UBI volume size for UBIFS image)
Date: Tue, 18 Jan 2011 11:18:51 +0200	[thread overview]
Message-ID: <1295342331.2470.99.camel@koala> (raw)
In-Reply-To: <AANLkTikhFt32NA9Lhzh0LDCzQmem3tjJZTG1TnP6ugnK@mail.gmail.com>

On Sat, 2011-01-15 at 10:48 +0000, Andrew Murray wrote:
> On 11 January 2011 09:47, Andrew Murray <amurray@mpcdata.com> wrote:
> >
> > Is there a way to determine the minimum UBI volume size which will
> > support a given UBIFS filesystem image?
> >
> 
> My conclusion is this (with my version of kernel and mkfs.ubifs tool):
> 
> (Min No. UBI Volume LEBS) = (jrn_lebs) + 3 + (log lebs) + (lpt_lebs) +
> (orph_lebs)
> 
> And these values can all be determined (or specified) by the
> mkfs.ubifs tool by using the verbose -v flag.
> 
> This seems to hold true - Does this seem reasonable?

These are definitions for ubifs-media.h kernel header file, and the
absolute minimum is UBIFS_MIN_LEB_CNT.

/*
 * The below constants define the absolute minimum values for various UBIFS
 * media areas. Many of them actually depend of flash geometry and the FS
 * configuration (number of journal heads, orphan LEBs, etc). This means that
 * the smallest volume size which can be used for UBIFS cannot be pre-defined
 * by these constants. The file-system that meets the below limitation will not
 * necessarily mount. UBIFS does run-time calculations and validates the FS
 * size.
 */

/* Minimum number of logical eraseblocks in the log */
#define UBIFS_MIN_LOG_LEBS 2
/* Minimum number of bud logical eraseblocks (one for each head) */
#define UBIFS_MIN_BUD_LEBS 3
/* Minimum number of journal logical eraseblocks */
#define UBIFS_MIN_JNL_LEBS (UBIFS_MIN_LOG_LEBS + UBIFS_MIN_BUD_LEBS)
/* Minimum number of LPT area logical eraseblocks */
#define UBIFS_MIN_LPT_LEBS 2
/* Minimum number of orphan area logical eraseblocks */
#define UBIFS_MIN_ORPH_LEBS 1
/*
 * Minimum number of main area logical eraseblocks (buds, 3 for the index, 1
 * for GC, 1 for deletions, and at least 1 for committed data).
 */
#define UBIFS_MIN_MAIN_LEBS (UBIFS_MIN_BUD_LEBS + 6)

/* Minimum number of logical eraseblocks */
#define UBIFS_MIN_LEB_CNT (UBIFS_SB_LEBS + UBIFS_MST_LEBS + \
                           UBIFS_MIN_LOG_LEBS + UBIFS_MIN_LPT_LEBS + \
                           UBIFS_MIN_ORPH_LEBS + UBIFS_MIN_MAIN_LEBS)
-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

  parent reply	other threads:[~2011-01-18  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11  9:47 validate_sb: bad superblock, error 8 (Minimum UBI volume size for UBIFS image) Andrew Murray
2011-01-15 10:48 ` Andrew Murray
2011-01-15 22:09   ` Andrew Murray
2011-01-15 22:22     ` Artem Bityutskiy
2011-01-18  9:41     ` Artem Bityutskiy
2011-01-18  9:18   ` Artem Bityutskiy [this message]
2011-01-18  9:16 ` Artem Bityutskiy
2011-01-18  9:30   ` Artem Bityutskiy
2011-01-18  9:50     ` Artem Bityutskiy

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=1295342331.2470.99.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=amurray@mpcdata.com \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.