[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01d47263-50a1-4626-ad34-446996ac970e@acm.org>
Date: Mon, 10 Feb 2025 10:30:31 -0800
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] scsi: ufs: critical health condition
On 2/10/25 5:58 AM, Avri Altman wrote:
> To handle this new `sysfs` entry, either `udev` rules or some other
> polling code can be configured to monitor changes in the
> `critical_health` attribute.
Hmm ... I'm not aware of any support in udevd to poll on sysfs
attributes? I think that calling select(), poll() or epoll() is required
to wait for a sysfs_notify() call.
> +Description: Report the number of times a critical health event has been
> + reported by a UFS device. further insight into the specific
further -> Further?
> +static ssize_t critical_health_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct ufs_hba *hba = dev_get_drvdata(dev);
> +
> + return sysfs_emit(buf, "%d\n", hba->critical_health);
> +}
Now that the data type of hba->critical_health has been changed from
boolean into integer, should its name perhaps be changed into
hba->critical_health_count?
> @@ -1130,6 +1131,9 @@ struct ufs_hba {
> struct delayed_work ufs_rtc_update_work;
> struct pm_qos_request pm_qos_req;
> bool pm_qos_enabled;
> +
> + /* HEALTH_CRITICAL exception reported */
> + int critical_health;
> };
Please leave out the inline comment since @critical_health already
has a kernel-doc comment.
Thanks,
Bart.
Powered by blists - more mailing lists