1. 26 Dec, 2007 5 commits
    • Artem Bityutskiy's avatar
      UBI: minor tidy-ups · 732aeacf
      Artem Bityutskiy authored
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      732aeacf
    • Jesper Juhl's avatar
      UBI: silence a warning · 54b2c8f9
      Jesper Juhl authored
      This patch silences the following warning :
      
        drivers/mtd/ubi/vmt.c:73: warning: 'ret' may be used uninitialized in this function
      
      gcc can't see that we always initialize ret in all situations where it is
      actually used. The one case where it's not initialized is when we BUG(),
      but gcc doesn't know that we won't then continue and use an uninitialized
      'ret'.
      
      This patch results in code that does exactely the same as before, but it
      also makes gcc shut up, so we generate one less line of warning noise.
      Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      54b2c8f9
    • Artem Bityutskiy's avatar
      UBI: add ubi_leb_map interface · 393852ec
      Artem Bityutskiy authored
      The idea of this interface belongs to Adrian Hunter. The
      interface is extremely useful when one has to have a guarantee
      that an LEB will contain all 0xFFs even in case of an unclean
      reboot. UBI does have an 'ubi_leb_erase()' call which may do
      this, but it is stupid and ineffecient, because it flushes whole
      queue. I should be re-worked to just be a pair of unmap,
      map calls.
      
      The user of the interfaci is UBIFS at the moment.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      393852ec
    • Artem Bityutskiy's avatar
      UBI: bugfix: allocate mandatory EBs first · 94780d4d
      Artem Bityutskiy authored
      First allocate the necessary eraseblocks, then the optional ones.
      Otherwise it allocates all PEBs for bad EB handling, and fails
      on then following EBA LEB allocation.
      Reported-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      94780d4d
    • Artem Bityutskiy's avatar
      UBI: fix error code in ubi_io_read() · 2362a53e
      Artem Bityutskiy authored
      When NAND detects an ECC error, it returns -EBADMSG. It does not
      stop reading requested data if one page has an ECC error, it keeps
      going and reads all the requested data. If it fails to read all
      the data, it does not return -EBADMSG, but returns the error code
      which reflects the reason of the failure.
      
      But some drivers may have bugs (e.g., OneNAND had) and stop reading
      after the first ECC error, so it returns -EBADMSG. In turn, UBI
      propagates this up to the caller. The caller will treat this as
      "all the requested data was read, but there was an ECC error".
      
      So we change the error code to -EIO if it is -EBADMSG and the read
      length is less then the requested length. We also add an assertion,
      so if UBI debugging is enabled, UBI will bug.
      Pointed-to-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      2362a53e
  2. 03 Dec, 2007 7 commits
  3. 29 Nov, 2007 1 commit
  4. 28 Nov, 2007 4 commits
  5. 26 Nov, 2007 2 commits
  6. 23 Nov, 2007 1 commit
  7. 21 Nov, 2007 1 commit
  8. 09 Nov, 2007 1 commit
  9. 06 Nov, 2007 3 commits
  10. 01 Nov, 2007 2 commits
    • David Woodhouse's avatar
      [JFFS2] Don't strip sgid bit from inode permissions · 857013b8
      David Woodhouse authored
      <viro> dwmw2: anyway, removing sgid from directories or from
             files without S_IXGRP is a plain and simple bug
      <viro> these days you don't need that logics at all - simply remove it
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      857013b8
    • David Woodhouse's avatar
      [JFFS2] Improve getdents vs. f_pos handling on NOR flash. · 15953580
      David Woodhouse authored
      Commit a491486a started obliterating
      dirents directly on the medium, when jffs2_can_mark_obsolete(). Removing
      them immediately from the f->dents list, however, screws up handling of
      f_pos within a directory -- because the offset is equivalent to the
      number of entries through the list we are, and the existence of
      deletion dirents served to provide 'placeholders' for unlinked
      entries. Now, 'rm -r' doesn't even manage to unlink everything in the
      directory.
      
      Revert to keeping 'deletion' dirents in the list, at least in memory
      even though we no longer write anything to the medium.
      
      Spotted, debugged and mostly fixed by Joakim Tjernlund
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      15953580
  11. 30 Oct, 2007 3 commits
  12. 29 Oct, 2007 2 commits
  13. 28 Oct, 2007 8 commits