Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756383AbcJMTKr (ORCPT ); Thu, 13 Oct 2016 15:10:47 -0400 Received: from mga05.intel.com ([192.55.52.43]:29669 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756274AbcJMTKm (ORCPT ); Thu, 13 Oct 2016 15:10:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,489,1473145200"; d="scan'208";a="19778995" Date: Thu, 13 Oct 2016 13:09:48 -0600 From: Ross Zwisler To: "Kani, Toshimitsu" Cc: "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" Subject: Re: [PATCH] pmem: report error on clear poison failure Message-ID: <20161013190948.GA26922@linux.intel.com> References: <1476374061-9080-1-git-send-email-toshi.kani@hpe.com> <1476374787.20881.34.camel@hpe.com> <1476382494.20881.58.camel@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1476382494.20881.58.camel@hpe.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2238 Lines: 57 On Thu, Oct 13, 2016 at 06:16:29PM +0000, Kani, Toshimitsu wrote: > On Thu, 2016-10-13 at 10:22 -0700, Dan Williams wrote: > > On Thu, Oct 13, 2016 at 9:08 AM, Kani, Toshimitsu > > wrote: > > > > > > On Thu, 2016-10-13 at 09:01 -0700, Dan Williams wrote: > > > > > > > > On Thu, Oct 13, 2016 at 8:54 AM, Toshi Kani > > > > wrote: > > > > > > > > > > > > > > > ACPI Clear Uncorrectable Error DSM function may fail or may be > > > > > unsupported on a platform.??pmem_clear_poison() returns without > > > > > clearing badblocks in such cases, which leads to a silent data > > > > > corruption. > > > > > > > > > > Change pmem_do_bvec() and pmem_clear_poison() to return -EIO > > > > > so that filesystem can log an error message. > > > > > > > > What's the silent data corruption scenario???If the clear poison > > > > fails I'm assuming that the poison will still be notified on the > > > > next > > > > read. > > > > > > I agree that the data is eventually read, but there is no guranteed > > > that when it is read soon enough, i.e. user might not access to the > > > data for a long time. > > > > ...but that's the same behavior for errors that we don't yet know > > about.??That said, we indeed know that the write failed.??I'd feel > > better about this patch if the justification / impact was clearer in > > the changelog, because "silent data corruption" is not the impact. > > Agreed. ?How about the following descritpion? > > === > ACPI Clear Uncorrectable Error DSM function may fail or may be > unsupported on a platform.??pmem_clear_poison() returns without > clearing badblocks in such cases. ?This failure is detected at > the next read (-EIO). > > This behavior can lead to an issue when user keeps writing but > does not read immedicately. ?For instance, flight recorder file immediately > may be only read when it is necessary for troubleshooting. > > Change pmem_do_bvec() and pmem_clear_poison() to return -EIO > so that filesystem can log an error message on a write error. > === > > Thanks, > -Toshi > _______________________________________________ > Linux-nvdimm mailing list > Linux-nvdimm@lists.01.org > https://lists.01.org/mailman/listinfo/linux-nvdimm