From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: change some error-less functions to void types
Date: Thu, 2 May 2019 08:16:52 +1000 [thread overview]
Message-ID: <20190501221652.GJ29573@dread.disaster.area> (raw)
In-Reply-To: <a8eec37c-0cb1-0dc6-aa65-7248e367fc08@redhat.com>
On Wed, May 01, 2019 at 10:55:54AM -0500, Eric Sandeen wrote:
> There are several functions which have no opportunity to retun
> an error, and don't contain any ASSERTs which could be argued
> to be better constructed as error cases. So, make them voids
> to simplify the callers.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
....
> @@ -1840,7 +1840,6 @@ xlog_sync(
> uint count_init; /* initial count before roundup */
> int roundoff; /* roundoff to BB or stripe */
> int split = 0; /* split write into two regions */
> - int error;
> int v2 = xfs_sb_version_haslogv2(&log->l_mp->m_sb);
> int size;
>
> @@ -1959,11 +1958,8 @@ xlog_sync(
> * Don't call xfs_bwrite here. We do log-syncs even when the filesystem
> * is shutting down.
> */
> - error = xlog_bdstrat(bp);
> - if (error) {
> - xfs_buf_ioerror_alert(bp, "xlog_sync");
> - return error;
> - }
> + xlog_bdstrat(bp);
Shouldn't this be checking bp->b_error rather than completely
ignoring buffer submit errors?
> +
> if (split) {
> bp = iclog->ic_log->l_xbuf;
> XFS_BUF_SET_ADDR(bp, 0); /* logical 0 */
> @@ -1978,11 +1974,7 @@ xlog_sync(
>
> /* account for internal log which doesn't start at block #0 */
> XFS_BUF_SET_ADDR(bp, XFS_BUF_ADDR(bp) + log->l_logBBstart);
> - error = xlog_bdstrat(bp);
> - if (error) {
> - xfs_buf_ioerror_alert(bp, "xlog_sync (split)");
> - return error;
> - }
> + xlog_bdstrat(bp);
Ditto.
Otherwise it looks fine.
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2019-05-01 22:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 15:55 [PATCH] xfs: change some error-less functions to void types Eric Sandeen
2019-05-01 22:16 ` Dave Chinner [this message]
2019-05-01 22:20 ` [PATCH V2] " Eric Sandeen
2019-05-01 23:49 ` Dave Chinner
2019-05-02 12:17 ` Brian Foster
2019-05-02 14:44 ` Eric Sandeen
2019-05-02 14:50 ` [PATCH V3] " Eric Sandeen
2019-05-02 14:59 ` [PATCH V4] " Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190501221652.GJ29573@dread.disaster.area \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox