* [PATCH] libxfs: print the device name if flush-on-close fails
@ 2024-04-17 23:16 Darrick J. Wong
2024-04-18 4:26 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2024-04-17 23:16 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs, Carlos Maiolino
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libxfs: print the device name if flush-on-close fails
2024-04-17 23:16 [PATCH] libxfs: print the device name if flush-on-close fails Darrick J. Wong
@ 2024-04-18 4:26 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2024-04-18 4:26 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, linux-xfs, Carlos Maiolino
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-18 4:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 23:16 [PATCH] libxfs: print the device name if flush-on-close fails Darrick J. Wong
2024-04-18 4:26 ` Christoph Hellwig
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.