Commit 1cc4ada
btrfs: preserve first error in btrfs_trim_fs()
When multiple block groups or devices fail during trim, preserve the
first error encountered rather than the last one. The first error is
typically more useful for debugging as it represents the original
failure, while subsequent errors may be cascading effects.
Signed-off-by: Robbie Ko <robbieko@synology.com>
Signed-off-by: jinbaohong <jinbaohong@synology.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 912d1c6 commit 1cc4ada
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6608 | 6608 | | |
6609 | 6609 | | |
6610 | 6610 | | |
6611 | | - | |
| 6611 | + | |
6612 | 6612 | | |
6613 | 6613 | | |
6614 | 6614 | | |
| |||
6653 | 6653 | | |
6654 | 6654 | | |
6655 | 6655 | | |
6656 | | - | |
| 6656 | + | |
| 6657 | + | |
6657 | 6658 | | |
6658 | 6659 | | |
6659 | 6660 | | |
| |||
6666 | 6667 | | |
6667 | 6668 | | |
6668 | 6669 | | |
6669 | | - | |
| 6670 | + | |
| 6671 | + | |
6670 | 6672 | | |
6671 | 6673 | | |
6672 | 6674 | | |
6673 | 6675 | | |
6674 | 6676 | | |
6675 | 6677 | | |
6676 | 6678 | | |
6677 | | - | |
| 6679 | + | |
6678 | 6680 | | |
6679 | 6681 | | |
6680 | 6682 | | |
| |||
6687 | 6689 | | |
6688 | 6690 | | |
6689 | 6691 | | |
6690 | | - | |
| 6692 | + | |
| 6693 | + | |
6691 | 6694 | | |
6692 | 6695 | | |
6693 | 6696 | | |
6694 | 6697 | | |
6695 | 6698 | | |
6696 | 6699 | | |
6697 | 6700 | | |
6698 | | - | |
| 6701 | + | |
6699 | 6702 | | |
6700 | 6703 | | |
6701 | 6704 | | |
| |||
0 commit comments