Re: [PATCH] btrfs: Fix return value of btrfs_mark_extent_written() in case of error
From: Ritesh Harjani <hidden>
Date: 2021-06-01 06:01:45
From: Ritesh Harjani <hidden>
Date: 2021-06-01 06:01:45
On 21/05/31 08:49PM, David Sterba wrote:
On Sun, May 30, 2021 at 08:24:05PM +0530, Ritesh Harjani wrote:quoted
We always return 0 even in case of an error in btrfs_mark_extent_written(). Fix it to return proper error value in case of a failure.Oh right, this looks like it got forgotten, the whole function does the right thing regarding errors and the callers also handle it.quoted
Signed-off-by: Ritesh Harjani <redacted> --- Tested fstests with "-g quick" group. No new failure seen.That won't be probably enough to trigger the error paths but the patch
Yes. However, I found the bug while stress testing btrfs/062 failure with bs < ps patch series from Qu. On analyzing the kernel panic [1], it looked like it was caused by not properly returning an error from btrfs_mark_extent_written(). So, I thought of just running "-g quick" test to avoid any obvious issue. [1]: https://www.spinics.net/lists/linux-btrfs/msg113280.html
otherwise looks correct to me. Added to misc-next, thanks.
Thanks