From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, Carlos Maiolino <cem@kernel.org>
Subject: [PATCH] libxfs: print the device name if flush-on-close fails
Date: Wed, 17 Apr 2024 16:16:50 -0700 [thread overview]
Message-ID: <20240417231650.GE11948@frogsfrogsfrogs> (raw)
From: Darrick J. Wong <djwong@kernel.org>
Print the name of the device if persisting the write cache fails.
Printing a pointer does not help the user at all, and this causes the
32-bit build to complain:
init.c: In function ‘libxfs_device_close’:
init.c:178:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
178 | progname, (long long)dev, ret);
| ^
cc1: all warnings being treated as errors
Fixes: fc83c7574b1f ("libxfs: split out a libxfs_dev structure from struct libxfs_init")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
libxfs/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libxfs/init.c b/libxfs/init.c
index 1e035c48f57f..6ac9d682490a 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -171,8 +171,8 @@ libxfs_device_close(
if (ret) {
ret = -errno;
fprintf(stderr,
- _("%s: flush of device %lld failed, err=%d"),
- progname, (long long)dev, ret);
+ _("%s: flush of device %s failed, err=%d"),
+ progname, dev->name, ret);
}
close(dev->fd);
next reply other threads:[~2024-04-17 23:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 23:16 Darrick J. Wong [this message]
2024-04-18 4:26 ` [PATCH] libxfs: print the device name if flush-on-close fails Christoph Hellwig
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=20240417231650.GE11948@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).