mbox series

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

Message ID 20230418-btrfs-extent-reads-v1-0-47ba9839f0cc@codewreck.org
Headers show
Series btrfs: fix and improve read code | expand

Message

Dominique Martinet April 18, 2023, 1:17 a.m. UTC
I'm posting this as a series but this is really three independant
patches.
The first is a real bug that has made our board unable to boot as it was
corrupting the kernel and image CRC validation failed (yay for checksums
-- any plan of enabling validation of data checksums too? I see the code
is there for metadata already, so it's probably not missing that much,
but unfortunately as far as I understand it would only have seen that
the extent data was correct and still corrupted the final buffer as it's
just an offset error...)

The second patch is an opportunistic optimization as I noticed the code
behaved differently than before, and there doesn't seem to be a reason
the reads couldn't be coalesced.

The last patch is just something that looked odd and looks "obviously
better" but I'll leave that up to you.

Thanks!

Link: https://lore.kernel.org/linux-btrfs/20200525063257.46757-1-wqu@suse.com/ [1]
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
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 extent was found

 fs/btrfs/inode.c | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)
---
base-commit: 5db4972a5bbdbf9e3af48ffc9bc4fec73b7b6a79
change-id: 20230418-btrfs-extent-reads-e2df6e329ad4

Best regards,