Re: [PATCH v4 2/4] nfit, libnvdimm: allow an ARS scrub to be triggered on demand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 23, 2016 at 10:26 PM, Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
> From: Vishal Verma <vishal.l.verma@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---
>  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().
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux