Commit b718ae83 authored by Keith Busch's avatar Keith Busch

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 <johannes.thumshirn@wdc.com>
Reported-by: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent b938e660
...@@ -92,7 +92,7 @@ static ssize_t uuid_show(struct device *dev, struct device_attribute *attr, ...@@ -92,7 +92,7 @@ static ssize_t uuid_show(struct device *dev, struct device_attribute *attr,
* we have no UUID set * we have no UUID set
*/ */
if (uuid_is_null(&ids->uuid)) { if (uuid_is_null(&ids->uuid)) {
dev_warn_ratelimited(dev, dev_warn_once(dev,
"No UUID available providing old NGUID\n"); "No UUID available providing old NGUID\n");
return sysfs_emit(buf, "%pU\n", ids->nguid); return sysfs_emit(buf, "%pU\n", ids->nguid);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment