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
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
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
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
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
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
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
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
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
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
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
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
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
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
x8mq_reform2/lpddr4_timing* are autogenerated?
which covers everything, and it looks good to me:
Reviewed-by: Dominique Martinet
Thanks!
--
Dominique Martinet
15 matches
Mail list logo