From: cel@kernel.org
To: <linux-nfs@vger.kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Chuck Lever <chuck.lever@oracle.com>
Subject: [RFC PATCH 2/4] nfs/blocklayout: Report only when /no/ device is found
Date: Wed, 19 Jun 2024 13:39:32 -0400 [thread overview]
Message-ID: <20240619173929.177818-8-cel@kernel.org> (raw)
In-Reply-To: <20240619173929.177818-6-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
Since f931d8374cad ("nfs/blocklayout: refactor block device
opening"), an error is reported when no multi-path device is
found. But this isn't a fatal error if the subsequent device open
is successful. On systems without multi-path devices, this message
always appears whether there is a problem or not.
Instead, generate less system journal noise by reporting an error
only when both open attempts fail. The new error message is more
actionable since it indicates that there is a real configuration
issue to be addressed.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfs/blocklayout/dev.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
index b3828e5ee079..356bc967fb5d 100644
--- a/fs/nfs/blocklayout/dev.c
+++ b/fs/nfs/blocklayout/dev.c
@@ -318,7 +318,7 @@ bl_open_path(struct pnfs_block_volume *v, const char *prefix)
bdev_file = bdev_file_open_by_path(devname, BLK_OPEN_READ | BLK_OPEN_WRITE,
NULL, NULL);
if (IS_ERR(bdev_file)) {
- pr_warn("pNFS: failed to open device %s (%ld)\n",
+ dprintk("failed to open device %s (%ld)\n",
devname, PTR_ERR(bdev_file));
}
@@ -348,8 +348,11 @@ bl_parse_scsi(struct nfs_server *server, struct pnfs_block_dev *d,
bdev_file = bl_open_path(v, "dm-uuid-mpath-0x");
if (IS_ERR(bdev_file))
bdev_file = bl_open_path(v, "wwn-0x");
- if (IS_ERR(bdev_file))
+ if (IS_ERR(bdev_file)) {
+ pr_err("pNFS: no device found for volume %*phN\n",
+ v->scsi.designator_len, v->scsi.designator);
return PTR_ERR(bdev_file);
+ }
d->bdev_file = bdev_file;
bdev = file_bdev(bdev_file);
--
2.45.1
next prev parent reply other threads:[~2024-06-19 17:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 17:39 [RFC PATCH 0/4] Snapshot of fixes for SCSI PR key registration cel
2024-06-19 17:39 ` [RFC PATCH 1/4] nfs/blocklayout: SCSI layout trace points for reservation key reg/unreg cel
2024-06-20 4:50 ` Christoph Hellwig
2024-06-20 4:52 ` Christoph Hellwig
2024-06-20 14:30 ` Chuck Lever
2024-06-19 17:39 ` cel [this message]
2024-06-20 4:36 ` [RFC PATCH 2/4] nfs/blocklayout: Report only when /no/ device is found Christoph Hellwig
2024-06-20 14:59 ` Chuck Lever
2024-06-20 12:17 ` Benjamin Coddington
2024-06-20 14:10 ` Christoph Hellwig
2024-06-19 17:39 ` [RFC PATCH 3/4] nfs/blocklayout: Fix premature PR key unregistration cel
2024-06-20 5:06 ` Christoph Hellwig
2024-06-20 13:52 ` Benjamin Coddington
2024-06-20 13:58 ` Chuck Lever
2024-06-20 14:15 ` Christoph Hellwig
2024-06-20 14:18 ` Chuck Lever III
2024-06-20 15:45 ` Benjamin Coddington
2024-06-20 15:48 ` Chuck Lever
2024-06-20 15:58 ` Benjamin Coddington
2024-06-20 15:39 ` Chuck Lever
2024-06-20 13:51 ` Benjamin Coddington
2024-06-20 14:34 ` Chuck Lever
2024-06-20 14:37 ` Christoph Hellwig
2024-06-20 15:30 ` Benjamin Coddington
2024-06-20 15:46 ` Chuck Lever
2024-06-20 15:56 ` Benjamin Coddington
2024-06-20 16:45 ` Benjamin Coddington
2024-06-20 17:08 ` Chuck Lever
2024-06-19 17:39 ` [RFC PATCH 4/4] nfs/blocklayout: Use bulk page allocation APIs cel
2024-06-20 4:44 ` 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=20240619173929.177818-8-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=hch@lst.de \
--cc=linux-nfs@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