[PATCH u-boot v2] fs: btrfs: hide duplicate 'Cannot lookup file' error on 'load'

2024-11-14 Thread Dominique Martinet
From: Dominique Martinet Running commands such as 'load mmc 2:1 $addr $path' when path does not exists will print an error twice if the file does not exist, e.g.: ``` Cannot lookup file boot/boot.scr Failed to load 'boot/boot.scr' ``` (where the first line is printed by btr

Re: [u-boot PATCH] fs: btrfs: hide 'Cannot lookup file' errors on 'load'

2024-11-12 Thread Dominique Martinet
Dominique Martinet wrote on Wed, Nov 06, 2024 at 09:56:42AM +0900: > Running commands such as 'load mmc 2:1 $addr $path' when path does not > exists historically do not print any error on filesystems such as ext4 > or fat. > Changing the root filesystem to btrfs would mak

[u-boot PATCH] fs: btrfs: hide 'Cannot lookup file' errors on 'load'

2024-11-05 Thread Dominique Martinet
From: Dominique Martinet Running commands such as 'load mmc 2:1 $addr $path' when path does not exists historically do not print any error on filesystems such as ext4 or fat. Changing the root filesystem to btrfs would make existing boot script print 'Cannot lookup file xxx

Re: [PATCH U-BOOT 1/3] btrfs: fix offset within btrfs_read_extent_reg()

2023-04-18 Thread Dominique Martinet
Qu Wenruo wrote on Tue, Apr 18, 2023 at 09:58:37AM +0800: > The subject can be changed to "btrfs: fix offset when reading compressed > extents". > The original one is a little too generic. Ok. > > btrfs_file_read() > > -> btrfs_read_extent_reg > > (aligned part loop from 0x4048 to 0x40

[PATCH U-BOOT v2] btrfs: fix offset when reading compressed extents

2023-04-18 Thread Dominique Martinet
From: Dominique Martinet btrfs_read_extent_reg correctly computed the extent offset in the BTRFS_COMPRESS_NONE case, but did not account for the 'offset - key.offset' part correctly in the compressed case, making the function read incorrect data. In the case I examined, the last 4k

Re: [PATCH U-BOOT 2/3] btrfs: btrfs_file_read: allow opportunistic read until the end

2023-04-18 Thread Dominique Martinet
Dominique Martinet wrote on Tue, Apr 18, 2023 at 12:53:35PM +0900: > Ok, there is one exception for inline extents apparently.. But I'm not > still not convinced the `aligned_start != file_offset` check is enough > for that either; I'd say it's unlikely but the inline part

Re: [PATCH U-BOOT 2/3] btrfs: btrfs_file_read: allow opportunistic read until the end

2023-04-18 Thread Dominique Martinet
nt start matches current offset instead of checking for sectorsize alignment, or we can just fix the loop and remove the first if. -- Dominique Martinet | Asmadeus

Re: [PATCH U-BOOT 2/3] btrfs: btrfs_file_read: allow opportunistic read until the end

2023-04-18 Thread Dominique Martinet
that my board does crash), I guess that at this point I should spend some time building a qemu u-boot and hooking up gdb will be faster.. > My initial plan is to merge the tailing part into the aligned loop, but > since you're already working in this part, feel free to do it. Yes, sure -- removing the if is easy, I'd just rather not make it fail for someone else :) -- Dominique Martinet | Asmadeus

Re: [PATCH U-BOOT 3/3] btrfs: btfs_file_read: zero trailing data if no extent was found

2023-04-18 Thread Dominique Martinet
zero. Right, sorry. I'll drop this and send a new patch that removes the duplicate memset (at "The whole file is a hole" comment) instead as seeing multiple memsets is what made me think it'd be necessary without thinking; that can be done even if we rework the function a bi

Re: [PATCH U-BOOT 2/3] btrfs: btrfs_file_read: allow opportunistic read until the end

2023-04-18 Thread Dominique Martinet
all the time so I guess I've found something else to dig into. This isn't a priority for me right now but I'll look a bit more when I have more time if you haven't first. -- Dominique Martinet | Asmadeus

[PATCH U-BOOT 3/3] btrfs: btfs_file_read: zero trailing data if no extent was found

2023-04-18 Thread Dominique Martinet
From: Dominique Martinet btfs_file_read's truncate path has a comment noting '>0 means no extent' and bailing out immediately, but the buffer has not been written so probably needs zeroing out. This is a theorical fix only and hasn't been tested on a file that actua

[PATCH U-BOOT 2/3] btrfs: btrfs_file_read: allow opportunistic read until the end

2023-04-18 Thread Dominique Martinet
From: Dominique Martinet btrfs_file_read main 'aligned read' loop would limit the last read to the aligned end even if the data is present in the extent: there is no reason not to read the data that we know will be presented correctly. If that somehow fails cur only advances

[PATCH U-BOOT 1/3] btrfs: fix offset within btrfs_read_extent_reg()

2023-04-18 Thread Dominique Martinet
From: Dominique Martinet btrfs_read_extent_reg correctly computed the extent offset in the BTRFS_COMPRESS_NONE case, but did not account for the 'offset - key.offset' part correctly in the compressed case, making the function read incorrect data. In the case I examined, the last 4k

[PATCH U-BOOT 0/3] btrfs: fix and improve read code

2023-04-18 Thread Dominique Martinet
l.org/linux-btrfs/20200525063257.46757-1-...@suse.com/ [1] Signed-off-by: Dominique Martinet --- Dominique Martinet (3): btrfs: fix offset within btrfs_read_extent_reg() btrfs: btrfs_file_read: allow opportunistic read until the end btrfs: btfs_file_read: zero trailing data if no

Re: [PATCH v7] board: mntre: imx8mq: Add MNT Reform 2 board support

2023-02-04 Thread Dominique Martinet
x8mq_reform2/lpddr4_timing* are autogenerated? which covers everything, and it looks good to me: Reviewed-by: Dominique Martinet Thanks! -- Dominique Martinet