From: "Darrick J. Wong" <djwong@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs_repair: don't guess about failure reason in phase6
Date: Fri, 10 Dec 2021 16:23:19 -0800 [thread overview]
Message-ID: <20211211002319.GD1218082@magnolia> (raw)
In-Reply-To: <1639167697-15392-5-git-send-email-sandeen@sandeen.net>
On Fri, Dec 10, 2021 at 02:21:37PM -0600, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
>
> There are many error messages in phase 6 which say
> "filesystem may be out of space," when in reality the failure could
> have been corruption or some other issue. Rather than guessing, and
> emitting a confusing and possibly-wrong message, use the existing
> res_failed() for any xfs_trans_alloc failures, and simply print the
> error number in the other cases.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> repair/phase6.c | 30 +++++++++---------------------
> 1 file changed, 9 insertions(+), 21 deletions(-)
>
> diff --git a/repair/phase6.c b/repair/phase6.c
> index 696a642..df22daa 100644
> --- a/repair/phase6.c
> +++ b/repair/phase6.c
> @@ -1067,9 +1067,7 @@ mv_orphanage(
> err = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_rename,
> nres, 0, 0, &tp);
> if (err)
> - do_error(
> - _("space reservation failed (%d), filesystem may be out of space\n"),
> - err);
> + res_failed(err);
>
> libxfs_trans_ijoin(tp, orphanage_ip, 0);
> libxfs_trans_ijoin(tp, ino_p, 0);
> @@ -1078,8 +1076,7 @@ mv_orphanage(
> ino, nres);
> if (err)
> do_error(
> - _("name create failed in %s (%d), filesystem may be out of space\n"),
> - ORPHANAGE, err);
> + _("name create failed in %s (%d)\n"), ORPHANAGE, err);
>
> if (irec)
> add_inode_ref(irec, ino_offset);
> @@ -1091,8 +1088,7 @@ mv_orphanage(
> orphanage_ino, nres);
> if (err)
> do_error(
> - _("creation of .. entry failed (%d), filesystem may be out of space\n"),
> - err);
> + _("creation of .. entry failed (%d)\n"), err);
>
> inc_nlink(VFS_I(ino_p));
> libxfs_trans_log_inode(tp, ino_p, XFS_ILOG_CORE);
> @@ -1104,9 +1100,7 @@ mv_orphanage(
> err = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_rename,
> nres, 0, 0, &tp);
> if (err)
> - do_error(
> - _("space reservation failed (%d), filesystem may be out of space\n"),
> - err);
> + res_failed(err);
>
> libxfs_trans_ijoin(tp, orphanage_ip, 0);
> libxfs_trans_ijoin(tp, ino_p, 0);
> @@ -1116,8 +1110,7 @@ mv_orphanage(
> ino, nres);
> if (err)
> do_error(
> - _("name create failed in %s (%d), filesystem may be out of space\n"),
> - ORPHANAGE, err);
> + _("name create failed in %s (%d)\n"), ORPHANAGE, err);
>
> if (irec)
> add_inode_ref(irec, ino_offset);
> @@ -1135,8 +1128,7 @@ mv_orphanage(
> nres);
> if (err)
> do_error(
> - _("name replace op failed (%d), filesystem may be out of space\n"),
> - err);
> + _("name replace op failed (%d)\n"), err);
> }
>
> err = -libxfs_trans_commit(tp);
> @@ -1156,9 +1148,7 @@ mv_orphanage(
> err = -libxfs_trans_alloc(mp, &M_RES(mp)->tr_remove,
> nres, 0, 0, &tp);
> if (err)
> - do_error(
> - _("space reservation failed (%d), filesystem may be out of space\n"),
> - err);
> + res_failed(err);
>
> libxfs_trans_ijoin(tp, orphanage_ip, 0);
> libxfs_trans_ijoin(tp, ino_p, 0);
> @@ -1167,8 +1157,7 @@ mv_orphanage(
> nres);
> if (err)
> do_error(
> - _("name create failed in %s (%d), filesystem may be out of space\n"),
> - ORPHANAGE, err);
> + _("name create failed in %s (%d)\n"), ORPHANAGE, err);
> ASSERT(err == 0);
>
> set_nlink(VFS_I(ino_p), 1);
> @@ -1351,8 +1340,7 @@ longform_dir2_rebuild(
> nres);
> if (error) {
> do_warn(
> -_("name create failed in ino %" PRIu64 " (%d), filesystem may be out of space\n"),
> - ino, error);
> +_("name create failed in ino %" PRIu64 " (%d)\n"), ino, error);
> goto out_bmap_cancel;
> }
>
> --
> 1.8.3.1
>
prev parent reply other threads:[~2021-12-11 0:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 20:21 [PATCH 0/4] xfsprogs: misc small fixes Eric Sandeen
2021-12-10 20:21 ` [PATCH 1/4] xfs_quota: document unit multipliers used in limit command Eric Sandeen
2021-12-11 0:15 ` Darrick J. Wong
2021-12-11 5:47 ` Eric Sandeen
2021-12-11 16:55 ` Darrick J. Wong
2021-12-10 20:21 ` [PATCH 2/4] mkfs.xfs(8): remove incorrect default inode allocator description Eric Sandeen
2021-12-11 0:19 ` Darrick J. Wong
2021-12-10 20:21 ` [PATCH 3/4] xfs_quota: don't exit on fs_table_insert_project_path failure Eric Sandeen
2021-12-11 0:21 ` Darrick J. Wong
2021-12-11 5:52 ` Eric Sandeen
2021-12-11 16:56 ` Darrick J. Wong
2021-12-10 20:21 ` [PATCH 4/4] xfs_repair: don't guess about failure reason in phase6 Eric Sandeen
2021-12-11 0:23 ` Darrick J. Wong [this message]
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=20211211002319.GD1218082@magnolia \
--to=djwong@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox