1. 27 12月, 2007 5 次提交
    • A
      UBI: minor tidy-ups · 732aeacf
      Artem Bityutskiy 提交于
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      732aeacf
    • J
      UBI: silence a warning · 54b2c8f9
      Jesper Juhl 提交于
      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: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      54b2c8f9
    • A
      UBI: add ubi_leb_map interface · 393852ec
      Artem Bityutskiy 提交于
      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: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      393852ec
    • A
      UBI: bugfix: allocate mandatory EBs first · 94780d4d
      Artem Bityutskiy 提交于
      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: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      94780d4d
    • A
      UBI: fix error code in ubi_io_read() · 2362a53e
      Artem Bityutskiy 提交于
      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: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      2362a53e
  2. 03 12月, 2007 7 次提交
  3. 29 11月, 2007 1 次提交
  4. 28 11月, 2007 4 次提交
  5. 26 11月, 2007 2 次提交
  6. 23 11月, 2007 1 次提交
  7. 22 11月, 2007 1 次提交
  8. 10 11月, 2007 1 次提交
  9. 06 11月, 2007 3 次提交
  10. 02 11月, 2007 2 次提交
    • D
      [JFFS2] Don't strip sgid bit from inode permissions · 857013b8
      David Woodhouse 提交于
      <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: NDavid Woodhouse <dwmw2@infradead.org>
      857013b8
    • D
      [JFFS2] Improve getdents vs. f_pos handling on NOR flash. · 15953580
      David Woodhouse 提交于
      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: NDavid Woodhouse <dwmw2@infradead.org>
      15953580
  11. 31 10月, 2007 1 次提交
  12. 30 10月, 2007 2 次提交
  13. 29 10月, 2007 3 次提交
  14. 28 10月, 2007 7 次提交