04 Jul, 2011

2 commits

  • Instead of using 'ubi_read()' function directly, used the 'ubifs_leb_read()'
    helper function instead. This allows to get rid of several redundant error
    messages and make sure that we always have a stack dump on read errors.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • This patch introduces helper functions for all debugging checks, so instead of
    doing

    if (!(ubifs_chk_flags & UBIFS_CHK_GEN))

    we now do

    if (!dbg_is_chk_gen(c))

    This is a preparation to further changes where the flags will go away, and
    we'll need to only change the helper functions, but the code which utilizes
    them won't be touched.

    At the same time this patch removes 'dbg_force_in_the_gaps()',
    'dbg_force_in_the_gaps_enabled()', and dbg_failure_mode helpers for
    consistency.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

06 Feb, 2011

1 commit


30 Aug, 2010

2 commits

  • When scanning the flash, UBIFS builds a list of flash nodes of type
    'struct ubifs_scan_node'. Each scanned node has a 'snod->key' field. This field
    is valid for most of the nodes, but invalid for some node type, e.g., truncation
    nodes. It is safer to explicitly initialize such keys to something invalid,
    rather than leaving them initialized to all zeros, which has key type of
    UBIFS_INO_KEY.

    This patch introduces new "fake" key type UBIFS_INVALID_KEY and initializes
    unused 'snod->key' objects to this type. It also adds debugging assertions in
    the TNC code to make sure no one ever tries to look these nodes up in the TNC.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     
  • In the scanning code, in 'ubifs_add_snod()', we write rubbish into
    'snod->key', because we assume that on-flash truncation nodes have a key, but
    they do not. If the other parts of UBIFS then mistakenly try to look-up
    the truncation node key (they should not do this, but may do because of a bug),
    we can succeed and corrupt TNC. It looks like we did have such a situation in
    'sort_nodes()' in gc.c.

    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

10 Sep, 2009

1 commit

  • At the moment UBIFS print large and scary error messages and
    flash dumps in case of nearly any corruption, even if it is
    a recoverable corruption. For example, if the master node is
    corrupted, ubifs_scan() prints error dumps, then UBIFS recovers
    just fine and goes on.

    This patch makes UBIFS print scary error messages only in
    real cases, which are not recoverable. It adds 'quiet' argument
    to the 'ubifs_scan()' function, so the caller may ask 'ubi_scan()'
    not to print error messages if the caller is able to do recovery.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     

09 Jul, 2009

2 commits

  • This patch fixes few minor things I've spotted while going through
    code:

    1. Better document return codes
    2. If 'ubifs_scan_a_node()' returns some thing we do not expect,
    treat this as an error.
    3. Try to do recovery only when 'ubifs_scan()' returns %-EUCLEAN,
    not on any error.
    4. If empty space starts at a non-aligned address, print a message.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     
  • In case of corruptions, dump 8192 bytes instead of 4096. The
    largest node is 4096+ bytes, so it is better to see a node
    boundary, which is not always possible when only 4096 bytes
    are printed.

    Signed-off-by: Artem Bityutskiy
    Reviewed-by: Adrian Hunter

    Artem Bityutskiy
     

30 Sep, 2008

1 commit

  • UBIFS read performance can be improved by skipping the CRC
    check when data nodes are read. This option can be used if
    the underlying media is considered to be highly reliable.
    Note that CRCs are always checked for metadata.

    Read speed on Arm platform with OneNAND goes from 19 MiB/s
    to 27 MiB/s with data CRC checking disabled.

    Signed-off-by: Adrian Hunter

    Adrian Hunter
     

15 Jul, 2008

1 commit