1. 02 Oct, 2016 1 commit
    • Petr Kulhavy's avatar
      disk: part: implement generic function part_get_info_by_name() · 87b8530f
      Petr Kulhavy authored
      So far partition search by name has been supported only on the EFI partition
      table. This patch extends the search to all partition tables.
      
      Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from
      part_efi.c into part.c and make it a generic function which traverses all part
      drivers and searches all partitions (in the order given by the linked list).
      
      For this a new variable struct part_driver.max_entries is added, which limits
      the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS.
      Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables.
      Signed-off-by: default avatarPetr Kulhavy <brain@jikos.cz>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarSteve Rae <steve.rae@raedomain.com>
      87b8530f
  2. 17 May, 2016 12 commits
  3. 14 Apr, 2016 1 commit
  4. 01 Apr, 2016 1 commit
    • Eric Nelson's avatar
      drivers: block: add block device cache · e40cf34a
      Eric Nelson authored
      Add a block device cache to speed up repeated reads of block devices by
      various filesystems.
      
      This small amount of cache can dramatically speed up filesystem
      operations by skipping repeated reads of common areas of a block
      device (typically directory structures).
      
      This has shown to have some benefit on FAT filesystem operations of
      loading a kernel and RAM disk, but more dramatic benefits on ext4
      filesystems when the kernel and/or RAM disk are spread across
      multiple extent header structures as described in commit fc0fc50f.
      
      The cache is implemented through a minimal list (block_cache) maintained
      in most-recently-used order and count of the current number of entries
      (cache_count). It uses a maximum block count setting to prevent copies
      of large block reads and an upper bound on the number of cached areas.
      
      The maximum number of entries in the cache defaults to 32 and the maximum
      number of blocks per cache entry has a default of 2, which has shown to
      produce the best res...
      e40cf34a
  5. 15 Mar, 2016 1 commit
  6. 14 Mar, 2016 7 commits
  7. 20 Jan, 2016 1 commit
    • Erik Tideman's avatar
      mmc: emmc and hw partitions partition table id bugfix. · 99e7fc8a
      Erik Tideman authored
      On bootup the emmc's hw partition is always set to 0 and the partition
      table is read from it. When switching to another hw partition the
      partition table's id is not updated but instead the old one from
      hw partition 0 is used. If there is no partition table on hw partition 0
      then the code will terminate and return error even if the desired hw
      partition contains a perfectly fine partition table. This fix updates
      the partition table struct to correspond to the specified hw partition
      before testing if the partition table is valid or not.
      Signed-off-by: default avatarErik Tideman <erik.tideman@faltcom.se>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      [trini: Squash the patch that corrected whitespace in the original into
      this one, wrap with HAVE_BLOCK_DEVICE test]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      99e7fc8a
  8. 12 Nov, 2015 1 commit
  9. 24 Oct, 2015 2 commits
  10. 25 Oct, 2014 1 commit
  11. 24 Sep, 2014 1 commit
  12. 22 Jul, 2014 1 commit
  13. 23 Jun, 2014 1 commit
    • Stephen Warren's avatar
      sandbox: restore ability to access host fs through standard commands · 4d907025
      Stephen Warren authored
      Commit 95fac6ab "sandbox: Use os functions to read host device tree"
      removed the ability for get_device_and_partition() to handle the "host"
      device type, and redirect accesses to it to the host filesystem. This
      broke some unit tests that use this feature. So, revert that change. The
      code added back by this patch is slightly different to pacify checkpatch.
      
      However, we're then left with "host" being both:
      - A pseudo device that accesses the hosts real filesystem.
      - An emulated block device, which accesses "sectors" inside a file stored
        on the host.
      
      In order to resolve this discrepancy, rename the pseudo device from host
      to hostfs, and adjust the unit-tests for this change.
      
      The "help sb" output is modified to reflect this rename, and state where
      the host and hostfs devices should be used.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Tested-by: default avatarJosh Wu <josh.wu@atmel.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      4d907025
  14. 12 Jun, 2014 1 commit
    • Stephen Warren's avatar
      disk: default to HW partition 0 if not specified · ecdd57e2
      Stephen Warren authored
      Currently, get_device()/get_dev_hwpart() for MMC devices does not select
      an explicit HW partition unless the user explicitly requests one, i.e. by
      requesting device "mmc 0.0" rather than just "mmc 0". I think it makes
      more sense if the default is to select HW partition 0 (main data area)
      if the user didn't request a specific partition. Otherwise, the following
      happens, which feels wrong:
      
      Select HW partition 1 (boot0):
      mmc dev 0 1
      
      Attempts to access SW partition 1 on HW partition 1 (boot0), rather than
      SW partition 1 on HW partition 0 (main data area):
      ls mmc 0:1 /
      
      With this patch, the second command above re-selects the main data area.
      
      Many device types don't support HW partitions at all, so if HW partition
      0 is selected (either explicitly or as the default) and there's no
      select_hwpart function, we simply skip attempting to select a HW
      partition.
      
      Some MMC devices (i.e. SD cards) don't support HW partitions. However,
      this patch still works, since mmc_start_init() sets the current
      partition number to 0, and mmc_select_hwpart() succeeds if the requested
      partition is already selected.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      ecdd57e2
  15. 23 May, 2014 2 commits
  16. 18 Mar, 2014 1 commit
    • Simon Glass's avatar
      sandbox: Use os functions to read host device tree · 95fac6ab
      Simon Glass authored
      At present we use U-Boot's filesystem layer to read the sandbox device tree,
      but this is problematic since it relies on a temporary feauture added
      there. Since we plan to implement proper block layer support for sandbox,
      change this code to use the os layer functions instead. Also use the new
      fdt_create_empty_tree() instead of our own code.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      95fac6ab
  17. 09 Jan, 2014 1 commit
  18. 24 Jul, 2013 1 commit
  19. 22 Jul, 2013 1 commit
    • Lan Yixun (dlan)'s avatar
      fs/ext4: fix log2blksz un-initialized error, by cacaulating its value from blksz · 50ffc3b6
      Lan Yixun (dlan) authored
      The problem here is that uboot can't mount ext4 filesystem with
      commit "50ce4c07" applied. We use hard-coded "SECTOR_SIZE"(512)
      before this commit, now we introduce (block_dev_desc_t *)->log2blksz
      to replace this macro. And after we calling do_ls()->fs_set_blk_dev(),
      the variable log2blksz is not initialized, which it's not correct.
      
      And this patch try to solve the problem by caculating the value of
      log2blksz from variable blksz.
      50ffc3b6
  20. 14 Mar, 2013 1 commit
  21. 04 Mar, 2013 1 commit