From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <avri.altman@wdc.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] scsi: ufs: critical health condition
Date: Mon, 10 Feb 2025 10:30:31 -0800 [thread overview]
Message-ID: <01d47263-50a1-4626-ad34-446996ac970e@acm.org> (raw)
In-Reply-To: <20250210135814.50783-1-avri.altman@wdc.com>
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.
next prev parent reply other threads:[~2025-02-10 18:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 13:58 Avri Altman
2025-02-10 18:30 ` Bart Van Assche [this message]
2025-02-10 19:57 ` Avri Altman
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=01d47263-50a1-4626-ad34-446996ac970e@acm.org \
--to=bvanassche@acm.org \
--cc=avri.altman@wdc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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
all inboxes | Powered by JetHome®