1. 25 Jan, 2008 10 commits
    • Artem Bityutskiy's avatar
      UBI: add layout volume information · 91f2d53c
      Artem Bityutskiy authored
      Add more information about layout volume to make userspace tools
      use the macros instead of constants. Also rename UBI_LAYOUT_VOL_ID
      to make it consistent with other macros.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      91f2d53c
    • 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 sanity check · 64203195
      Artem Bityutskiy authored
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      64203195
    • Artem Bityutskiy's avatar
      2f9270e7
    • Artem Bityutskiy's avatar
      UBI: bugfix: calculate data offset properly · d5360587
      Artem Bityutskiy authored
      Data offset is VID header offset + VID header size aligned to
      the min. I/O unit size up.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      d5360587
    • Artem Bityutskiy's avatar
      UBI: amend array size · ddc49391
      Artem Bityutskiy authored
      Since the data offset parameter was removed, the size of
      the parameters array is now 2, not 3.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      ddc49391
    • 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
    • Artem Bityutskiy's avatar
      UBI: use bit-fields · 896c0c06
      Artem Bityutskiy authored
      Save 12 bytes of RAM per volume by using bit-fields instead of integers.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      896c0c06
    • Artem Bityutskiy's avatar
      UBI: fix warnings · ae616e1b
      Artem Bityutskiy authored
      drivers/mtd/ubi/cdev.c: In function ‘vol_cdev_read’:
      drivers/mtd/ubi/cdev.c:187: warning: unused variable ‘vol_id’
      CC [M]  drivers/mtd/ubi/kapi.o
      drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_erase’:
      drivers/mtd/ubi/kapi.c:483: warning: unused variable ‘vol_id’
      drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_unmap’:
      drivers/mtd/ubi/kapi.c:544: warning: unused variable ‘vol_id’
      drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_map’:
      drivers/mtd/ubi/kapi.c:582: warning: unused variable ‘vol_id’
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      ae616e1b
    • Artem Bityutskiy's avatar
      UBI: get rid of ubi_ltree_slab · b9a06623
      Artem Bityutskiy authored
      This slab cache is not really needed since the number of objects
      is low and the constructor does not make much sense because we
      allocate oblects when doint I/O, which is way slower then allocation.
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      b9a06623
  2. 12 Jan, 2008 1 commit
  3. 10 Jan, 2008 1 commit
  4. 08 Jan, 2008 4 commits
  5. 26 Dec, 2007 24 commits