Skip to content
Snippets Groups Projects
  1. Oct 06, 2017
  2. Apr 27, 2017
    • Lokesh Vutla's avatar
      ext4: Fix comparision of unsigned expression with < 0 · 509b498a
      Lokesh Vutla authored
      
      In file ext4fs.c funtion ext4fs_read_file() compares an
      unsigned expression with < 0 like below
      
      	lbaint_t blknr;
      	blknr = read_allocated_block(&(node->inode), i);
      	if (blknr < 0)
      		return -1;
      
      blknr is of type ulong/uint64_t. read_allocated_block() returns
      long int. So comparing blknr with < 0 will always be false. Instead
      declare blknr as long int.
      
      Similarly ext4/dev.c does a similar comparison. Drop the redundant
      comparison.
      
      Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      509b498a
  3. Nov 21, 2016
  4. Sep 23, 2016
  5. Mar 14, 2016
  6. Dec 01, 2014
  7. Nov 23, 2014
    • Suriyan Ramasami's avatar
      fs: API changes enabling extra parameter to return size of type loff_t · d455d878
      Suriyan Ramasami authored
      
      The sandbox/ext4/fat/generic fs commands do not gracefully deal with files
      greater than 2GB. Negative values are returned in such cases.
      
      To handle this, the fs functions have been modified to take an additional
      parameter of type "* loff_t" which is then populated. The return value
      of the fs functions are used only for error conditions.
      
      Signed-off-by: default avatarSuriyan Ramasami <suriyan.r@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Update board/gdsys/p1022/controlcenterd-id.c,
      drivers/fpga/zynqpl.c for changes]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      d455d878
    • Suriyan Ramasami's avatar
      ext4: Prepare API change for files greater than 2GB · 9f12cd0e
      Suriyan Ramasami authored
      
      Change the internal EXT4 functions to use loff_t for offsets.
      
      Signed-off-by: default avatarSuriyan Ramasami <suriyan.r@gmail.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Update common/spl/spl_ext.c]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      9f12cd0e
    • Christian Gmeienr's avatar
      fs: make it possible to read the filesystem UUID · 59e890ef
      Christian Gmeienr authored
      
      Some filesystems have a UUID stored in its superblock. To
      allow using root=UUID=... for the kernel command line we
      need a way to read-out the filesystem UUID.
      
      changes rfc -> v1:
       - make the environment variable an option parameter. If not
         given, the UUID is printed out. If given, it is stored in the env
         variable.
       - corrected typos
       - return error codes
      
      changes v1 -> v2:
       - fix return code of do_fs_uuid(..)
       - document do_fs_uuid(..)
       - implement fs_uuid_unsuported(..) be more consistent with the
         way other optional functionality works
      
      changes v2 -> v3:
       - change ext4fs_uuid(..) to make use of #if .. #else .. #endif
         construct to get rid of unreachable code
      
      Hit any key to stop autoboot:  0
      => fsuuid
      fsuuid - Look up a filesystem UUID
      
      Usage:
      fsuuid <interface> <dev>:<part>
          - print filesystem UUID
      fsuuid <interface> <dev>:<part> <varname>
          - set environment variable to filesystem UUID
      
      => fsuuid mmc 0:1
      d9f9fc05-45ae-4a36-a616-fccce0e4f887
      => fsuuid mmc 0:2
      eb3db83c-7b28-499f-95ce-9e0bb21cda81
      => fsuuid mmc 0:1 uuid1
      => fsuuid mmc 0:2 uuid2
      => printenv uuid1
      uuid1=d9f9fc05-45ae-4a36-a616-fccce0e4f887
      => printenv uuid2
      uuid2=eb3db83c-7b28-499f-95ce-9e0bb21cda81
      =>
      
      Signed-off-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      59e890ef
  8. Aug 09, 2014
    • Stephen Warren's avatar
      fs: implement size/fatsize/ext4size · cf659819
      Stephen Warren authored
      
      These commands may be used to determine the size of a file without
      actually reading the whole file content into memory. This may be used
      to determine if the file will fit into the memory buffer that will
      contain it. In particular, the DFU code will use it for this purpose
      in the next commit.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      cf659819
  9. Feb 26, 2014
  10. Feb 21, 2014
    • Ionut Nicu's avatar
      ext4fs: Add ext4 extent cache for read operations · fc0fc50f
      Ionut Nicu authored
      
      In an ext4 filesystem, the inode corresponding to a file has a 60-byte
      area which contains an extent header structure and up to 4 extent
      structures (5 x 12 bytes).
      
      For files that need more than 4 extents to be represented (either files
      larger than 4 x 128MB = 512MB or smaller files but very fragmented),
      ext4 creates extent index structures. Each extent index points to a 4KB
      physical block where one extent header and additional 340 extents could
      be stored.
      
      The current u-boot ext4 code is very inefficient when it tries to load a
      file which has extent indexes. For each logical file block the code will
      read over and over again the same blocks of 4096 bytes from the disk.
      
      Since the extent tree in a file is always the same, we can cache the
      extent structures in memory before actually starting to read the file.
      
      This patch creates a simple linked list of structures holding information
      about all the extents used to represent a file. The list is sorted by
      the logical block number (ee_block) so that we can easily find the
      proper extent information for any file block.
      
      Without this patch, a 69MB file which had just one extent index pointing
      to a block with another 6 extents was read in approximately 3 minutes.
      With this patch applied the same file can be read in almost 20 seconds.
      
      Signed-off-by: default avatarIonut Nicu <ioan.nicu.ext@nsn.com>
      fc0fc50f
  11. Feb 19, 2014
  12. Jul 24, 2013
  13. Jul 15, 2013
    • Frederic Leroy's avatar
      Fix ext2/ext4 filesystem accesses beyond 2TiB · 04735e9c
      Frederic Leroy authored
      
      With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
      which is required to represent block numbers for storage devices that
      exceed 2TiB (the block size usually is 512B), e.g. recent hard drives
      
      We now use lbaint_t for partition offset to reflect the lbaint_t change,
      and access partitions beyond or crossing the 2.1TiB limit.
      This required changes to signature of ext4fs_devread(), and type of all
      variables relatives to block sector.
      
      ext2/ext4 fs uses logical block represented by a 32 bit value. Logical
      block is a multiple of device block sector. To avoid overflow problem
      when calling ext4fs_devread(), we need to cast the sector parameter.
      
      Signed-off-by: default avatarFrédéric Leroy <fredo@starox.org>
      04735e9c
  14. May 10, 2013
  15. Mar 04, 2013
  16. Dec 07, 2012
  17. Oct 29, 2012
    • Stephen Warren's avatar
      fs: separate CONFIG_FS_{FAT, EXT4} from CONFIG_CMD_{FAT, EXT*} · 03e2ecf6
      Stephen Warren authored
      
      This makes the FAT and ext4 filesystem implementations build if
      CONFIG_FS_{FAT,EXT4} are defined, rather than basing the build on
      whether CONFIG_CMD_{FAT,EXT*} are defined. This will allow the
      filesystems to be built separately from the filesystem-specific commands
      that use them. This paves the way for the creation of filesystem-generic
      commands that used the filesystems, without requiring the filesystem-
      specific commands.
      
      Minor documentation changes are made for this change.
      
      The new config options are automatically selected by the old config
      options to retain backwards-compatibility.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      03e2ecf6
  18. Oct 04, 2012
  19. Sep 25, 2012
  20. Aug 09, 2012
Loading