All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@sandeen.net
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 8/5] mkfs: fix incorrect error message
Date: Fri, 1 Nov 2019 11:52:45 -0700	[thread overview]
Message-ID: <20191101185245.GC15222@magnolia> (raw)
In-Reply-To: <157176999124.1458930.5678023201951458107.stgit@magnolia>

From: Darrick J. Wong <darrick.wong@oracle.com>

If we encounter a failure while fixing the freelist during mkfs, we
shouldn't print a misleading message about space reservation.  Fix it so
that we print something about what we were trying to do when the error
happened.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 mkfs/xfs_mkfs.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 10a40cd4..18338a61 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -3481,8 +3481,11 @@ initialise_ag_freespace(
 	libxfs_alloc_fix_freelist(&args, 0);
 	libxfs_perag_put(args.pag);
 	c = -libxfs_trans_commit(tp);
-	if (c)
-		res_failed(c);
+	if (c) {
+		errno = c;
+		perror(_("initializing AG free space list"));
+		exit(1);
+	}
 }
 
 /*

  parent reply	other threads:[~2019-11-01 19:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 18:46 [PATCH 0/5] xfsprogs: random fixes Darrick J. Wong
2019-10-22 18:46 ` [PATCH 1/5] xfs_spaceman: always report sick metadata, checked or not Darrick J. Wong
2019-11-01 18:17   ` Eric Sandeen
2019-11-01 18:40     ` Darrick J. Wong
2019-11-01 18:44       ` Darrick J. Wong
2019-10-22 18:46 ` [PATCH 2/5] xfs_db: btheight should check geometry more carefully Darrick J. Wong
2019-11-01 18:21   ` Eric Sandeen
2019-10-22 18:46 ` [PATCH 3/5] xfs_scrub: report repair activities on stdout, not stderr Darrick J. Wong
2019-11-01 18:26   ` Eric Sandeen
2019-11-01 18:42     ` Darrick J. Wong
2019-10-22 18:46 ` [PATCH 4/5] xfs_scrub: don't allow error or negative error injection interval Darrick J. Wong
2019-11-01 18:31   ` Eric Sandeen
2019-10-22 18:47 ` [PATCH 5/5] libfrog: fix workqueue_add error out Darrick J. Wong
2019-11-01 18:33   ` Eric Sandeen
2019-10-30 17:52 ` [PATCH 6/5] xfs_repair: print better information when metadata updates fail Darrick J. Wong
2019-11-01 18:42   ` Eric Sandeen
2019-10-30 17:53 ` [PATCH 7/5] libxfs: fix typo in message about write verifier Darrick J. Wong
2019-11-01 18:44   ` Eric Sandeen
2019-11-01 18:52 ` Darrick J. Wong [this message]
2019-11-01 19:28   ` [PATCH 8/5] mkfs: fix incorrect error message 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=20191101185245.GC15222@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.