| #
58a9ecba |
| 01-Sep-2016 |
Michael Walle <michael@walle.cc> |
ext4: fix endianess problems in ext4 write support
All fields were accessed directly instead of using the proper byte swap functions. Thus, ext4 write support was only usable on little-endian archit
ext4: fix endianess problems in ext4 write support
All fields were accessed directly instead of using the proper byte swap functions. Thus, ext4 write support was only usable on little-endian architectures. Fix this.
Signed-off-by: Michael Walle <michael@walle.cc>
show more ...
|
| #
7f101be3 |
| 29-Aug-2016 |
Michael Walle <michael@walle.cc> |
ext4: use kernel names for byte swaps
Instead of __{be,le}{16,32}_to_cpu use {be,le}{16,32}_to_cpu.
Signed-off-by: Michael Walle <michael@walle.cc>
|
| #
6f94ab66 |
| 22-Jul-2016 |
Tom Rini <trini@konsulko.com> |
ext4: Refuse to mount filesystems with 64bit feature set
With e2fsprogs after 1.43 the 64bit and metadata_csum features are enabled by default. The metadata_csum feature changes how ext4_group_desc
ext4: Refuse to mount filesystems with 64bit feature set
With e2fsprogs after 1.43 the 64bit and metadata_csum features are enabled by default. The metadata_csum feature changes how ext4_group_desc->bg_checksum is calculated, which would break write support. The 64bit feature however introduces changes such that it cannot be read by implementations that do not support it. Since we do not support this, we must not mount it.
Cc: Stephen Warren <swarren@nvidia.com> Cc: Simon Glass <sjg@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stefan Roese <sr@denx.de> Reported-by: Andrew Bradford <andrew.bradford@kodakalaris.com> Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
52b1eaf9 |
| 17-May-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
37f23885 |
| 28-Apr-2016 |
Ronald Zachariah <rozachar@cisco.com> |
fs: ext4: fix symlink read function
The function ext4fs_read_symlink was unable to handle a symlink which had target name of exactly 60 characters.
Signed-off-by: Ronald Zachariah <rozachar@cisco.c
fs: ext4: fix symlink read function
The function ext4fs_read_symlink was unable to handle a symlink which had target name of exactly 60 characters.
Signed-off-by: Ronald Zachariah <rozachar@cisco.com> Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Cc: Tom Rini <trini@konsulko.com>
show more ...
|
| #
88033d73 |
| 14-Mar-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
2a981dc2 |
| 29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: block: Adjust device calls to go through helpers function
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reim
dm: block: Adjust device calls to go through helpers function
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments.
Use inline functions to avoid increasing code size on some boards.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
495c3a1e |
| 10-Dec-2015 |
Tom Rini <trini@konsulko.com> |
ext4_common.c: Clean up failure cases in alloc_triple_indirect_block
As noted by Coverity, when we have an error in alloc_triple_indirect_block we will leak ti_pbuff_start_addr as it's not being fre
ext4_common.c: Clean up failure cases in alloc_triple_indirect_block
As noted by Coverity, when we have an error in alloc_triple_indirect_block we will leak ti_pbuff_start_addr as it's not being freed. Further inspection here shows that we could also leak ti_cbuff_start_addr in one corner case so free that as well.
Reported-by: Coverity (CID 131205, 131206) Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
7c4213f6 |
| 07-Dec-2015 |
Stephen Warren <swarren@nvidia.com> |
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
54d68e93 |
| 18-Nov-2015 |
Thomas Fitzsimmons <fitzsim@cisco.com> |
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir
If the ext3 journal gets out of sync with what is written on disk, for example because of an unexpected power cut, ext4fs_read_file can return a
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir
If the ext3 journal gets out of sync with what is written on disk, for example because of an unexpected power cut, ext4fs_read_file can return an all-zero directory entry. In that case, ext4fs_iterate_dir would infinite loop.
This patch detects when a directory entry's direntlen member is 0 and returns a failure status, which breaks out of the infinite loop. As a result, U-Boot will not find files that may subsequently be recovered when the journal is replayed.
This is better behaviour than hanging in an infinite loop, but as a further improvement maybe U-Boot could interpret the ext3 journal and actually find the unsynced entries.
Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com> Reviewed-by: Stefan Roese <sr@denx.de>
show more ...
|
| #
13a39725 |
| 14-Oct-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master'
|
| #
9d2f6a9a |
| 07-Sep-2015 |
Gary Bisson <gary.bisson@boundarydevices.com> |
fs: ext4: fix symlink read function
Since last API changes for files >2GB, the read of symlink is broken as ext4fs_read_file now returns 0 instead of the length of the actual read.
Signed-off-by: G
fs: ext4: fix symlink read function
Since last API changes for files >2GB, the read of symlink is broken as ext4fs_read_file now returns 0 instead of the length of the actual read.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
show more ...
|
| #
d56b2015 |
| 05-Sep-2015 |
Stephen Warren <swarren@nvidia.com> |
ext4: fix leak in check_filename()
root_first_block_buffer should be free()d in all cases, not just when an error occurs. Fix the success exit path of the function to do this.
Signed-off-by: Stephe
ext4: fix leak in check_filename()
root_first_block_buffer should be free()d in all cases, not just when an error occurs. Fix the success exit path of the function to do this.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
934b14f2 |
| 05-Sep-2015 |
Stephen Warren <swarren@nvidia.com> |
ext4: free allocations by parse_path()
parse_path() malloc()s the entries in the array it's passed. Those allocations must be free()d by the caller, ext4fs_get_parent_inode_num(). Add code to do thi
ext4: free allocations by parse_path()
parse_path() malloc()s the entries in the array it's passed. Those allocations must be free()d by the caller, ext4fs_get_parent_inode_num(). Add code to do this.
For this to work, all the array entries must be dynamically allocated, rather than a mix of dynamic and static allocations. Fix parse_path() not to over-write arr[0] with a pointer to statically allocated data.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
cf92e05c |
| 02-Sep-2015 |
Simon Glass <sjg@chromium.org> |
Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also.
Signed-off-
Move ALLOC_CACHE_ALIGN_BUFFER() to the new memalign.h header
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
9f12cd0e |
| 17-Nov-2014 |
Suriyan Ramasami <suriyan.r@gmail.com> |
ext4: Prepare API change for files greater than 2GB
Change the internal EXT4 functions to use loff_t for offsets.
Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@ch
ext4: Prepare API change for files greater than 2GB
Change the internal EXT4 functions to use loff_t for offsets.
Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update common/spl/spl_ext.c] Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|
| #
aac618a3 |
| 15-Oct-2014 |
Simon Glass <sjg@chromium.org> |
ext4: Use inttypes for printf() string
On 64-bit platforms (like sandbox) 64-bit integers may be 'long' rather than 'long long'. Use the inttypes header to avoid compiler warnings.
Signed-off-by: S
ext4: Use inttypes for printf() string
On 64-bit platforms (like sandbox) 64-bit integers may be 'long' rather than 'long long'. Use the inttypes header to avoid compiler warnings.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
dab5e346 |
| 16-Jul-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Conflicts: boards.cfg
|
| #
ed1d98d8 |
| 25-Jun-2014 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
d0180280 |
| 11-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
fs: ext4: fix writing zero-length files
ext4fs_allocate_blocks() always allocates at least one block for a file. If the file size is zero, this causes total_remaining_blocks to underflow, which then
fs: ext4: fix writing zero-length files
ext4fs_allocate_blocks() always allocates at least one block for a file. If the file size is zero, this causes total_remaining_blocks to underflow, which then causes an apparent hang while 2^32 blocks are allocated.
To solve this, check that total_remaining_blocks is non-zero as part of the loop condition (i.e. before each loop) rather than at the end of the loop.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
05d134b0 |
| 20-May-2014 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master'
Conflicts: boards.cfg
Conflicts were trivial once u-boot-arm/master boards.cfg was reformatted (commit 6130c146) to match u-boot/master's own reformatt
Merge remote-tracking branch 'u-boot/master'
Conflicts: boards.cfg
Conflicts were trivial once u-boot-arm/master boards.cfg was reformatted (commit 6130c146) to match u-boot/master's own reformatting (commit 1b37fa83).
show more ...
|
| #
4180b3db |
| 14-May-2014 |
Marek Vasut <marex@denx.de> |
Merge remote-tracking branch 'u-boot/master' into test
|
| #
8b454eee |
| 06-May-2014 |
Łukasz Majewski <l.majewski@samsung.com> |
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting fi
fs:ext4:write:fix: Reinitialize global variables after updating a file
This bug shows up when file stored on the ext4 file system is updated.
The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage) data. However some global data (especially ext4fs_indir2_block), which is used during file deletion are left unchanged.
The ext4fs_indir2_block pointer stores reference to old ext4 double indirect allocated blocks. When it is unchanged, after file deletion, ext4fs_write_file() uses the same pointer (since it is already initialized - i.e. not NULL) to return number of blocks to write. This trunks larger file when previous one was smaller.
Lets consider following scenario:
1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself) 2. Developer wants to upload their custom uImage [**] - When new uImage [**] is smaller than the [*] - everything works correctly - we are able to store the whole smaller file with corrupted ext4fs_indir2_block pointer - When new uImage [**] is larger than the [*] - theCRC is corrupted, since truncation on data stored at eMMC was done. 3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes proper setting of ext4fs_indir2_block() and after that uImage[**] is successfully stored (correct uImage [*] metadata is stored at an eMMC on the first flashing).
Due to above the bug was very difficult to reproduce. This patch sets default values for all ext4fs_indir* pointers/variables.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
35dd055b |
| 06-May-2014 |
Łukasz Majewski <l.majewski@samsung.com> |
fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B can be ordered to take less space.
This patch does that for ext4 common and write
fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B can be ordered to take less space.
This patch does that for ext4 common and write files.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
715b56fe |
| 26-Feb-2014 |
Tom Rini <trini@ti.com> |
Revert "ext4fs: Add ext4 extent cache for read operations"
This reverts commit fc0fc50f38a4d7d0554558076a79dfe8b0d78cd5.
The author has asked on the mailing list that we revert this for now as it b
Revert "ext4fs: Add ext4 extent cache for read operations"
This reverts commit fc0fc50f38a4d7d0554558076a79dfe8b0d78cd5.
The author has asked on the mailing list that we revert this for now as it breaks write support.
Reported-by: Łukasz Majewski <l.majewski@samsung.com> Signed-off-by: Tom Rini <trini@ti.com>
show more ...
|