1. 25 Jan, 2008 4 commits
    • 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 30 commits