[U-Boot] [PATCH v5] fs: fat/ext4/sandbox - Deal with files greater than 2GB
Suriyan Ramasami
suriyan.r at gmail.com
Wed Oct 29 20:29:17 CET 2014
Hello Simon,
On Wed, Oct 29, 2014 at 12:20 PM, Simon Glass <sjg at chromium.org> wrote:
> Hi Suriyan,
>
> On 28 October 2014 17:00, Suriyan Ramasami <suriyan.r at gmail.com> wrote:
>> The commands fatls/ext4ls give negative values when dealing with files
>> greater than 2GB.
>> The commands fatsize/ext4size do not update the variable filesize for
>> these files.
>>
>> To deal with 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: Suriyan Ramasami <suriyan.r at gmail.com>
>>
>> ---
>>
>> Changes in v5:
>> * Simon - update fs.h with comments for fs_read/fs_write/fs_size
>> * Simon - test/fs/fs-test.sh. Many changes as listed under
>> * Add README file to document how to run it
>> * Generate output in a sandbox environment
>> * Add one line comments on shell variables used
>> * Avoid camel case through out
>> * Path to UBOOT is variable at top
>> * Print PASSED or FAILED at end, and set return code, 0 if OK, 1 otherwise
>
> I am still seeing failures:
>
>
>
> ** Start sandbox/test/fs/fs-test.ext4.out
> pass - ls host 0:0 of 2.5GB.file
> pass - ls host 0:0 of 1MB.file
> pass - size host 0:0 1MB.file
> pass - size host 0:0 2.5GB.file
> pass - load host 0:0 0x01000008 1MB.file size
> pass - load host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00200000 0x9C300000 size
> pass - write host 0:0 0x01000008 /1MB.file
> pass - load host 0:0 0x01000008 /1MB.file
> ** End sandbox/test/fs/fs-test.ext4.out
> Summary: PASS: 11 FAIL: 8
> Creating files in ext4 image if not already present.
> ** Start sandbox/test/fs/fs-test.fs.ext4.out
> pass - ls host 0:0 of 2.5GB.file
> pass - ls host 0:0 of 1MB.file
> pass - size host 0:0 1MB.file
> pass - size host 0:0 2.5GB.file
> pass - load host 0:0 0x01000008 1MB.file size
> pass - load host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000 size
> FAIL - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00200000 0x9C300000 size
> pass - write host 0:0 0x01000008 /1MB.file
> pass - load host 0:0 0x01000008 /1MB.file
> ** End sandbox/test/fs/fs-test.fs.ext4.out
> Summary: PASS: 11 FAIL: 8
> --------------------------------------------
> Creating vfat image if not already present.
> Creating files in vfat image if not already present.
> ** Start sandbox/test/fs/fs-test.vfat.out
> pass - ls host 0:0 of 2.5GB.file
> pass - ls host 0:0 of 1MB.file
> pass - size host 0:0 1MB.file
> pass - size host 0:0 2.5GB.file
> pass - load host 0:0 0x01000008 1MB.file size
> pass - load host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00200000 0x9C300000 size
> pass - write host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 1MB.file
> ** End sandbox/test/fs/fs-test.vfat.out
> Summary: PASS: 19 FAIL: 0
> Creating files in vfat image if not already present.
> ** Start sandbox/test/fs/fs-test.fs.vfat.out
> pass - ls host 0:0 of 2.5GB.file
> pass - ls host 0:0 of 1MB.file
> pass - size host 0:0 1MB.file
> pass - size host 0:0 2.5GB.file
> pass - load host 0:0 0x01000008 1MB.file size
> pass - load host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x0
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x9C300000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF00000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x80000000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000 size
> pass - load host 0:0 0x01000008 2.5GB.file 0x00100000 0x7FF80000
> pass - load host 0:0 0x01000008 2.5GB.file 0x00200000 0x9C300000 size
> pass - write host 0:0 0x01000008 1MB.file
> pass - load host 0:0 0x01000008 1MB.file
> ** End sandbox/test/fs/fs-test.fs.vfat.out
> Summary: PASS: 19 FAIL: 0
> --------------------------------------------
> Total Summary: TOTAL PASS: 60 TOTAL FAIL: 16
> --------------------------------------------
> FAILED
>
>
> Any ideas on how to resolve this? Can you please send the output of a
> clear run, and the command you type?
>
The output you got is currently the expected output. The failure cases
are when using EXT fs and doing a read with file offset !=0. I am
currently marking it as a FAIL (till the code to handle offsets in EXT
reads is implemented).
I am guessing I should mark it a PASS for the ext case for now?
> Regards,
> Simon
More information about the U-Boot
mailing list