aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorAndrew Price <[email protected]>2022-03-22 18:49:19 +0000
committerAndreas Gruenbacher <[email protected]>2022-05-24 19:29:14 +0000
commitf4a47561fcc1494ee3f273163189cf4462b6a245 (patch)
tree5d96864510cdfc4c14bf173c012dbf1ff27b25c1 /fs/jbd2/commit.c
parentgfs2: Use container_of() for gfs2_glock(aspace) (diff)
downloadkernel-f4a47561fcc1494ee3f273163189cf4462b6a245.tar.gz
kernel-f4a47561fcc1494ee3f273163189cf4462b6a245.zip
gfs2: Return more useful errors from gfs2_rgrp_send_discards()
The bug that 27ca8273f ("gfs2: Make sure FITRIM minlen is rounded up to fs block size") fixes was a little confusing as the user saw "Input/output error" which masked the -EINVAL that sb_issue_discard() returned. sb_issue_discard() can fail for various reasons, so we should return its return value from gfs2_rgrp_send_discards() to avoid all errors being reported as IO errors. This improves error reporting for FITRIM and makes no difference to the -o discard code path because the return value from gfs2_rgrp_send_discards() gets thrown away in that case (and the option switches off). Presumably that's why it was ok to just return -EIO in the past, before FITRIM was implemented. Tested with xfstests. Signed-off-by: Andrew Price <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions