aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Busch <[email protected]>2023-07-12 07:54:59 -0700
committerKeith Busch <[email protected]>2023-07-12 08:48:19 -0700
commitb718ae835bd5de891ff6fefa290940b7613d2b07 (patch)
tree04c4e9ae1a14e5955828825e3dd4f32ad1b5f8ca
parentb938e6603660652dc3db66d3c915fbfed3bce21d (diff)
nvme: warn only once for legacy uuid attribute
Report the legacy fallback behavior for uuid attributes just once instead of logging repeated warnings for the same condition every time the attribute is read. The old behavior is too spamy on the kernel logs. Cc: Johannes Thumshirn <[email protected]> Reported-by: Breno Leitao <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
-rw-r--r--drivers/nvme/host/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c
index 45e91811f905..212e1b05d298 100644
--- a/drivers/nvme/host/sysfs.c
+++ b/drivers/nvme/host/sysfs.c
@@ -92,7 +92,7 @@ static ssize_t uuid_show(struct device *dev, struct device_attribute *attr,
* we have no UUID set
*/
if (uuid_is_null(&ids->uuid)) {
- dev_warn_ratelimited(dev,
+ dev_warn_once(dev,
"No UUID available providing old NGUID\n");
return sysfs_emit(buf, "%pU\n", ids->nguid);
}