From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [Linux-nvdimm] [PATCH v2 08/20] libnd, nd_acpi: regions (block-data-window, persistent memory, volatile memory) Date: Thu, 28 May 2015 12:36:16 -0600 Message-ID: <1432838176.23540.9.camel@misato.fc.hp.com> References: <20150428181203.35812.60474.stgit@dwillia2-desk3.amr.corp.intel.com> <20150428182455.35812.14950.stgit@dwillia2-desk3.amr.corp.intel.com> <1430771187.23761.237.camel@misato.fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from g4t3427.houston.hp.com ([15.201.208.55]:56723 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754381AbbE1Szs (ORCPT ); Thu, 28 May 2015 14:55:48 -0400 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Dan Williams Cc: "linux-nvdimm@lists.01.org" , Neil Brown , Greg KH , "Rafael J. Wysocki" , Robert Moore , "linux-kernel@vger.kernel.org" , Linux ACPI On Sat, 2015-05-09 at 16:55 -0700, Dan Williams wrote: > On Mon, May 4, 2015 at 1:26 PM, Toshi Kani wrote: > > On Tue, 2015-04-28 at 14:24 -0400, Dan Williams wrote: : > > > > The libnd does not support memdev->flags, which contains "Memory Device > > State Flags" defined in Table 5-129 of ACPI 6.0. In case of major > > errors, we should only allow a failed NVDIMM be accessed with read-only > > for possible data recovery (or not allow any access when the data is > > completely lost), and should not let users operate normally over the > > corrupted data until the error is dealt properly. > > I agree with setting read-only access when these flags show that the > battery is not ready to persist new writes, but I don't think we > should block access in the case where the restore from flash failed. > If the data is potentially corrupted we should log that fact, but > otherwise enable access. I.e. potentially corrupt data is better than > unavailable data. It's up to filesystem or application to maintain > its own checksums to catch data corruption. > > > Can you set memdev->flags to nd_region(_desc) so that the pmem driver > > can check the status in nd_pmem_probe()? nd_pmem_probe() can then set > > the disk read-only or fail probing, and log errors accordingly. > > Will do. I do not see this change in v4. Is this part of the pending changes behind this release? Thanks, -Toshi