1. 03 Jun, 2009 1 commit
  2. 02 Jun, 2009 5 commits
    • Dmitry Pervushin's avatar
      UBI: remove built-in gluebi · 518ceef0
      Dmitry Pervushin authored
      Remove built-in gluebi support. This is a preparation for a
      standalone glubi module support
      Signed-off-by: default avatarDmitry Pervushin <dpervushin@embeddedalley.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      518ceef0
    • Dmitry Pervushin's avatar
      UBI: add notification API · 0e0ee1cc
      Dmitry Pervushin authored
      UBI volume notifications are intended to create the API to get clients
      notified about volume creation/deletion, renaming and re-sizing. A
      client can subscribe to these notifications using 'ubi_volume_register()'
      and cancel the subscription using 'ubi_volume_unregister()'. When UBI
      volumes change, a blocking notifier is called. Clients also can request
      "added" events on all volumes that existed before client subscribed
      to the notifications.
      
      If we use notifications instead of calling functions like 'ubi_gluebi_xxx()',
      we can make the MTD emulation layer to be more flexible: build it as a
      separate module and load/unload it on demand.
      
      [Artem: many cleanups, rework locking, add "updated" event, provide
       device/volume info in notifiers]
      Signed-off-by: default avatarDmitry Pervushin <dpervushin@embeddedalley.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      0e0ee1cc
    • 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
  3. 26 May, 2009 1 commit
    • Artem Bityutskiy's avatar
      UBI: fix race condition · ddbd3b61
      Artem Bityutskiy authored
      This patch fixes a minor problem where we may fail to wake
      upe the UBI background thread. This is not fatal at all,
      it may just result at sligtly worse performace for a short
      period of time, just because the thread will be woken up
      when real I/O on the UBI starts.
      
      Anywey, the issue is the race condition between
      'ubi_attach_mtd_dev()' and 'ubi_thread()'. If we do not
      serialize them, the 'wake_up_process()' call may be done
      before 'ubi_thread()' went seep, but after it checked
      'ubi->thread_enabled'.
      
      This issue was spotted by Shin Hong <hongshin@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      ddbd3b61
  4. 18 May, 2009 8 commits
  5. 16 May, 2009 1 commit
  6. 15 May, 2009 24 commits