1. 21 May, 2012 2 commits
    • Joel Reardon's avatar
      UBI: add lnum and vol_id to struct ubi_work · d36e59e6
      Joel Reardon authored
      This is part of a multipart patch to allow UBI to force the erasure of
      particular logical eraseblock numbers. In this patch, the volume id and LEB
      number are added to ubi_work data structure, and both are also passed as a
      parameter to schedule erase to set it appropriately. Whenever ubi_wl_put_peb
      is called, the lnum is also passed to be forwarded to schedule erase. Later,
      a new ubi_sync_lnum will be added to execute immediately all work related to
      that lnum.
      
      This was tested by outputting the vol_id and lnum during the schedule of
      erasure. The ubi thread was disabled and two ubifs drives on separate
      partitions repeated changed a small number of LEBs. The ubi module was readded,
      and all the erased LEBs, corresponding to the volumes, were added to the
      schedule erase queue.
      
      Artem: minor tweaks
      Signed-off-by: default avatarJoel Reardon <reardonj@inf.ethz.ch>
      Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      d36e59e6
    • Joel Reardon's avatar
      UBI: add volume id struct ubi_ainf_peb · 6dd3bc7e
      Joel Reardon authored
      This patch adds the volume id to struct ubi_ainf_peb when scanning the LEBs at
      startup. PEBs now added to the erase queue will know their original LEB number
      and volume id, if available, and will be -1 otherwise (for instance, if the VID
      header is unreadable).
      
      This was tested by creating an ubi device with 3 volumes and disabiling the
      ubi_thread's do_work functionality. The different ubi volumes were formatted
      to ubifs and had files created and erased.  The ubi modules was reloaded and
      the list of LEB's added to the erased list was outputted, confirming the
      volume ids and LEB numbers were appropriate.
      Signed-off-by: default avatarJoel Reardon <reardonj@inf.ethz.ch>
      Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      6dd3bc7e
  2. 20 May, 2012 38 commits