[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4g=x52KnuSxgmAEt0NDqvTYntm=eqW_FJD67K1CyCge0g@mail.gmail.com>
Date: Sun, 24 Jul 2016 07:55:53 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v4 2/4] nfit, libnvdimm: allow an ARS scrub to be
triggered on demand
On Sat, Jul 23, 2016 at 10:26 PM, Dan Williams <dan.j.williams@...el.com> wrote:
> From: Vishal Verma <vishal.l.verma@...el.com>
>
> Normally, an ARS (Address Range Scrub) only happens at
> boot/initialization time. There can however arise situations where a
> bus-wide rescan is needed - notably, in the case of discovering a latent
> media error, we should do a full rescan to figure out what other sectors
> are bad, and thus potentially avoid triggering an mce on them in the
> future. Also provide a sysfs trigger to start a bus-wide scrub.
>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@...el.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
> drivers/acpi/nfit.c | 167 +++++++++++++++++++++++++++++++++++++++++++--
> drivers/acpi/nfit.h | 4 +
> drivers/nvdimm/core.c | 7 ++
> include/linux/libnvdimm.h | 1
> 4 files changed, 171 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> index be7c2fde16e7..2eaa03dc185a 100644
> --- a/drivers/acpi/nfit.c
> +++ b/drivers/acpi/nfit.c
[..]
> @@ -2308,17 +2423,30 @@ int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *data, acpi_size sz)
> const void *end;
> int rc;
>
> + acpi_nfit_init_dsms(acpi_desc);
> +
> if (!acpi_desc->nvdimm_bus) {
> + acpi_nfit_init_dsms(acpi_desc);
> +
> acpi_desc->nvdimm_bus = nvdimm_bus_register(dev,
> &acpi_desc->nd_desc);
> if (!acpi_desc->nvdimm_bus)
> return -ENOMEM;
> +
> rc = devm_add_action_or_reset(dev, acpi_nfit_destruct,
> acpi_desc);
> if (rc)
> return rc;
> +
> + rc = acpi_nfit_desc_init_scrub_attr(acpi_desc);
> + if (rc)
> + return rc;
> }
>
> + rc = acpi_nfit_desc_init_scrub_attr(acpi_desc);
> + if (rc)
> + return rc;
> +
Whoops, rebase error. I was moving acpi_nfit_init_dsms() and
acpi_nfit_desc_init_scrub_attr() to only run at the initial call to
acpi_nfit_init().
Powered by blists - more mailing lists