]> Git Repo - linux.git/commit
btrfs: always update fstrim_range on failure in FITRIM ioctl
authorLuca Stefani <[email protected]>
Mon, 2 Sep 2024 11:10:53 +0000 (13:10 +0200)
committerDavid Sterba <[email protected]>
Tue, 10 Sep 2024 14:51:21 +0000 (16:51 +0200)
commit3368597206dc3c6c3c2247ee146beada14c67380
tree9e283800f88c206ebe5c8ba84e213bd476852680
parentfaad57ae20190de6375e1c3a7144c7ae66ab4ddf
btrfs: always update fstrim_range on failure in FITRIM ioctl

Even in case of failure we could've discarded some data and userspace
should be made aware of it, so copy fstrim_range to userspace
regardless.

Also make sure to update the trimmed bytes amount even if
btrfs_trim_free_extents fails.

CC: [email protected] # 5.15+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Luca Stefani <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c
This page took 0.05874 seconds and 4 git commands to generate.