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

2023-04-18 Thread Dominique Martinet
Qu Wenruo wrote on Tue, Apr 18, 2023 at 10:04:56AM +0800: > > This is a theorical fix only and hasn't been tested on a file that > > actually runs this code path. > > IIRC there is a memset() at the very beginning of btrfs_file_read() to set > the whole dest memory to zero. Right, sorry. I'll

[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 actually runs this code path.

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

2023-04-17 Thread Qu Wenruo
On 2023/4/18 09:17, Dominique Martinet wrote: 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