From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Date: Tue, 17 May 2022 13:30:30 +0200 Subject: [Cluster-devel] [PATCH RESEND] gfs2: Return more useful errors from gfs2_rgrp_send_discards() In-Reply-To: <5488b93e-96c8-9007-9ee4-667247fa8c30@redhat.com> References: <20220405120847.583327-1-anprice@redhat.com> <4f808327-b831-f546-8d3f-5dfdf849bdef@redhat.com> <5488b93e-96c8-9007-9ee4-667247fa8c30@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, May 9, 2022 at 12:41 PM Andrew Price wrote: > On 29/04/2022 15:08, Andrew Price wrote: > > On 19/04/2022 16:49, Andrew Price wrote: > >> On 05/04/2022 13:08, Andrew Price wrote: > >>> 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. > >> > >> Can I get a thumbs-up or thumbs-down for this patch? It's pretty > >> straightforward. I just don't want it to get forgotten about. > >> > >> Cheers, > >> Andy > > > > Please could you take this patch? > > > > Cheers, > > Andy > > For convenience, I've pushed this patch to gitlab: > > git fetch https://gitlab.com/andyprice/linux.git discard_errors > git show FETCH_HEAD Pulled, thanks. Andreas