1. 01 Feb, 2010 1 commit
  2. 05 Jul, 2009 2 commits
  3. 10 Jun, 2009 2 commits
  4. 09 Jun, 2009 1 commit
  5. 08 Jun, 2009 1 commit
  6. 02 Jun, 2009 3 commits
    • Artem Bityutskiy's avatar
      UBI: do not switch to R/O mode on read errors · b86a2c56
      Artem Bityutskiy authored
      
      This patch improves UBI errors handling. ATM UBI switches to
      R/O mode when the WL worker fails to read the source PEB.
      This means that the upper layers (e.g., UBIFS) has no
      chances to unmap the erroneous PEB and fix the error.
      This patch changes this behaviour and makes UBI put PEBs
      like this into a separate RB-tree, thus preventing the
      WL worker from hitting the same read errors again and
      again.
      
      But there is a 10% limit on a maximum amount of PEBs like this.
      If there are too much of them, UBI switches to R/O mode.
      
      Additionally, this patch teaches UBI not to panic and
      switch to R/O mode if after a PEB has been copied, the
      target LEB cannot be read back. Instead, now UBI cancels
      the operation and schedules the target PEB for torturing.
      
      The error paths has been tested by ingecting errors
      into 'ubi_eba_copy_leb()'.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      b86a2c56
    • Artem Bityutskiy's avatar
      UBI: fix and clean-up error paths in WL worker · 87960c0b
      Artem Bityutskiy authored
      
      This patch fixes the error path in the WL worker - in same cases
      UBI oopses when 'goto out_error' happens and e1 or e2 are NULL.
      This patch also cleans up the error paths a little. And I have
      tested nearly all error paths in the WL worker.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      87960c0b
    • Artem Bityutskiy's avatar
      UBI: introduce new constants · 90bf0265
      Artem Bityutskiy authored
      
      This patch is a clean-up and a preparation for the following
      patches. It introduece constants for the return values of the
      'ubi_eba_copy_leb()' function.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      90bf0265
  7. 06 Jan, 2009 1 commit
  8. 16 Dec, 2008 1 commit
  9. 15 Dec, 2008 1 commit
  10. 05 Dec, 2008 3 commits
  11. 06 Nov, 2008 1 commit
  12. 24 Jul, 2008 5 commits
  13. 03 Feb, 2008 1 commit
  14. 25 Jan, 2008 2 commits
    • Artem Bityutskiy's avatar
      UBI: fix warnings · c18a8418
      Artem Bityutskiy authored
      
      Old gcc complains:
      
      CC      drivers/mtd/ubi/wl.o
      drivers/mtd/ubi/wl.c: In function 'wear_leveling_worker':
      drivers/mtd/ubi/wl.c:746: warning: 'pe' may be used uninitialized in this function
      CC      drivers/mtd/ubi/scan.o
      drivers/mtd/ubi/scan.c: In function 'ubi_scan':
      drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function
      drivers/mtd/ubi/scan.c:772: note: 'ec' was declared here
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      c18a8418
    • Artem Bityutskiy's avatar
      UBI: add auto-resize feature · 4ccf8cff
      Artem Bityutskiy authored
      
      The problem: NAND flashes have different amount of initial bad physical
      eraseblocks (marked as bad by the manufacturer). For example, for 256MiB
      Samsung OneNAND flash there might be from 0 to 40 bad initial eraseblocks,
      which is about 2%. When UBI is used as the base system, one needs to know
      the exact amount of good physical eraseblocks, because this number is
      needed to create the UBI image which is put to the devices during
      production. But this number is not know, which forces us to use the
      minimum number of good physical eraseblocks. And UBI additionally
      reserves some percentage of physical eraseblocks for bad block handling
      (default is 1%), so we have 1-3% of PEBs reserved at the end, depending
      on the amount of initial bad PEBs. But it is desired to always have
      1% (or more, depending on the configuration).
      
      Solution: this patch adds an "auto-resize" flag to the volume table.
      The volume which has the "auto-resize" flag will automatically be re-sized
      (enlarged) on the first UBI initialization. UBI clears the flag when
      the volume is re-sized. Only one volume may have the "auto-resize" flag.
      
      So, the production UBI image may have one volume with "auto-resize"
      flag set, and its size is automatically adjusted on the first boot
      of the device.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      4ccf8cff
  15. 26 Dec, 2007 7 commits
    • Artem Bityutskiy's avatar
      UBI: prepare attach and detach functions · cdfa788a
      Artem Bityutskiy authored
      
      Prepare the attach and detach functions to by used outside of
      module initialization:
      
      * detach function checks reference count before detaching
      * it kills the background thread as well
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      cdfa788a
    • Artem Bityutskiy's avatar
      UBI: add UBI devices reference counting · e73f4459
      Artem Bityutskiy authored
      
      This is one more step on the way to "removable" UBI devices. It
      adds reference counting for UBI devices. Every time a volume on
      this device is opened - the device's refcount is increased. It
      is also increased if someone is reading any sysfs file of this
      UBI device or of one of its volumes.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      e73f4459
    • Artem Bityutskiy's avatar
      UBI: fix comment · 16f557ec
      Artem Bityutskiy authored
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      16f557ec
    • Artem Bityutskiy's avatar
      UBI: fix ubi_wl_flush · 593dd33c
      Artem Bityutskiy authored
      
      The flush function should finish all the pending jobs. But if
      somebody else is doing a work, this function should wait and let
      it finish.
      
      This patche uses rw semaphore for synchronization purpose - it
      just looks quite convinient.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      593dd33c
    • Artem Bityutskiy's avatar
      UBI: bugfix: protect from volume removal · 43f9b25a
      Artem Bityutskiy authored
      
      When the WL worker is moving an LEB, the volume might go away
      occasionally. UBI does not handle these situations correctly.
      
      This patch introduces a new mutex which serializes wear-levelling
      worker and the the 'ubi_wl_put_peb()' function. Now, if one puts
      an LEB, and its PEB is being moved, it will wait on the mutex.
      And because we unmap all LEBs when removing volumes, this will make
      the volume remove function to wait while the LEB movement
      finishes.
      
      Below is an example of an oops which should be fixed by this patch:
      
      Pid: 9167, comm: io_paral Not tainted (2.6.24-rc5-ubi-2.6.git #2)
      EIP: 0060:[<f884a379>] EFLAGS: 00010246 CPU: 0
      EIP is at prot_tree_del+0x2a/0x63 [ubi]
      EAX: f39a90e0 EBX: 00000000 ECX: 00000000 EDX: 00000134
      ESI: f39a90e0 EDI: f39a90e0 EBP: f2d55ddc ESP: f2d55dd4
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process io_paral (pid: 9167, ti=f2d54000 task=f72a8030 task.ti=f2d54000)
      Stack: f39a95f8 ef6aae50 f2d55e08 f884a511 f88538e1 f884ecea 00000134 00000000
             f39a9604 f39a95f0 efea8280 00000000 f39a90e0 f2d55e40 f8847261 f8850c3c
             f884eaad 00000001 000000b9 00000134 00000172 000000b9 00000134 00000001
      Call Trace:
       [<c0105227>] show_trace_log_lvl+0x1a/0x30
       [<c01052e2>] show_stack_log_lvl+0xa5/0xca
       [<c01053d6>] show_registers+0xcf/0x21b
       [<c0105648>] die+0x126/0x224
       [<c0119a62>] do_page_fault+0x27f/0x60d
       [<c037dd62>] error_code+0x72/0x78
       [<f884a511>] ubi_wl_put_peb+0xf0/0x191 [ubi]
       [<f8847261>] ubi_eba_unmap_leb+0xaf/0xcc [ubi]
       [<f8843c21>] ubi_remove_volume+0x102/0x1e8 [ubi]
       [<f8846077>] ubi_cdev_ioctl+0x22a/0x383 [ubi]
       [<c017d768>] do_ioctl+0x68/0x71
       [<c017d7c6>] vfs_ioctl+0x55/0x271
       [<c017da15>] sys_ioctl+0x33/0x52
       [<c0104152>] sysenter_past_esp+0x5f/0xa5
       =======================
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      43f9b25a
    • Artem Bityutskiy's avatar
      UBI: improve comment · d2c46855
      Artem Bityutskiy authored
      
      Explain better the purpose of thie 'move_to_put' stuff.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      d2c46855
    • Artem Bityutskiy's avatar
      UBI: create ubi_wl_entry slab on initialization · 06b68ba1
      Artem Bityutskiy authored
      
      Similarly to ltree_entry_slab, it makes more sense to create
      and destroy ubi_wl_entry slab on module initialization/exit.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      06b68ba1
  16. 19 Oct, 2007 1 commit
  17. 14 Oct, 2007 4 commits
  18. 20 Jul, 2007 1 commit
    • Paul Mundt's avatar
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt authored
      Slab destructors were no longer supported after Christoph's
      c59def9f
      
       change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      20c2df83
  19. 18 Jul, 2007 2 commits