]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: preserve first error in btrfs_trim_fs()
authorjinbaohong <jinbaohong@synology.com>
Wed, 28 Jan 2026 07:06:39 +0000 (07:06 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:56:24 +0000 (07:56 +0100)
commit1cc4ada4182fadb82837831cabf1027bff0322d7
treeac0fd4bd5c3636c3f611d8a0e24e9ac25c00a9ce
parent912d1c6680bdb40b72b1b9204706f32b6eb842c3
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>
fs/btrfs/extent-tree.c