From: "Kani, Toshi" <toshi.kani-ZPxbGqLxI0U@public.gmane.org>
To: "dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Cc: "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 5/6] nfit, address-range-scrub: rework and simplify ARS state machine
Date: Wed, 4 Apr 2018 16:26:09 +0000 [thread overview]
Message-ID: <1522859143.2693.296.camel@hpe.com> (raw)
In-Reply-To: <152273078779.38372.13062348829183334140.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Mon, 2018-04-02 at 21:46 -0700, Dan Williams wrote:
:
> +static int init_ars(struct acpi_nfit_desc *acpi_desc, struct nfit_spa *nfit_spa,
> + int query_rc)
> {
> - struct acpi_nfit_system_address *spa = nfit_spa->spa;
> - unsigned int overflow_retry = scrub_overflow_abort;
> - u64 init_ars_start = 0, init_ars_len = 0;
> - struct device *dev = acpi_desc->dev;
> - unsigned int tmo = scrub_timeout;
> int rc;
>
> - if (!test_bit(ARS_REQ, &nfit_spa->ars_state) || !nfit_spa->nd_region)
> - return;
> + switch (query_rc) {
> + case 0:
> + /* ARS is idle, lets look for critical known errors... */
> + break;
> + case -EBUSY:
> + /*
> + * ARS is already running, some agent thought it was ok
> + * to busy ARS before handing off to the nfit driver.
> + */
> + clear_bit(ARS_SHORT, &nfit_spa->ars_state);
> + rc = query_rc;
> + goto out;
> + case -ENOSPC:
> + /* ARS continuation needed... */
> + clear_bit(ARS_SHORT, &nfit_spa->ars_state);
> + rc = query_rc;
> + goto out;
> + default:
> + rc = query_rc;
> + goto out;
> + }
>
> + WARN_ON_ONCE(!test_bit(ARS_SHORT, &nfit_spa->ars_state));
I am hitting this WARN_ON_ONCE. I think there is an issue in the code
flow that ars_complete() clears ARS_SHORT before init_ars().
acpi_nfit_scrub
acpi_nfit_query_poison
ars_status_process_records
ars_complete
init_ars
Thanks!
-Toshi
next prev parent reply other threads:[~2018-04-04 16:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 4:46 [PATCH 0/6] nfit, address-range-scrub: rework and fixes Dan Williams
[not found] ` <152273076087.38372.4803377088477706610.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 4:46 ` [PATCH 1/6] nfit: fix region registration vs block-data-window ranges Dan Williams
2018-04-03 15:30 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 2/6] nfit, address-range-scrub: fix scrub in-progress reporting Dan Williams
[not found] ` <152273077198.38372.11857145045474104173.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 3/6] libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' Dan Williams
[not found] ` <152273077753.38372.6434283957266644623.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 4/6] nfit, address-range-scrub: introduce nfit_spa->ars_state Dan Williams
[not found] ` <152273078267.38372.2191145328822655057.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 5/6] nfit, address-range-scrub: rework and simplify ARS state machine Dan Williams
[not found] ` <152273078779.38372.13062348829183334140.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:29 ` Dave Jiang
[not found] ` <f4c0ca57-3c4a-9805-a66a-6a61aec2b108-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:33 ` Dan Williams
2018-04-04 16:26 ` Kani, Toshi [this message]
[not found] ` <1522859143.2693.296.camel-ZPxbGqLxI0U@public.gmane.org>
2018-04-04 17:08 ` Dan Williams
2018-04-03 4:46 ` [PATCH 6/6] nfit, address-range-scrub: add module option to skip initial ars Dan Williams
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=1522859143.2693.296.camel@hpe.com \
--to=toshi.kani-zpxbgqlxi0u@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.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