From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752320AbcEWJSE (ORCPT ); Mon, 23 May 2016 05:18:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:60049 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242AbcEWJSB (ORCPT ); Mon, 23 May 2016 05:18:01 -0400 Date: Mon, 23 May 2016 11:17:58 +0200 From: Johannes Thumshirn To: Dan Williams Cc: linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/2] libnvdimm, dax: fix alignment validation Message-ID: <20160523091758.git26qatm2yav5rg@c203.arch.suse.de> References: <146361503689.37798.44566892348278285.stgit@dwillia2-desk3.amr.corp.intel.com> <146361504728.37798.4211838382035993859.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <146361504728.37798.4211838382035993859.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: Mutt/1.6.1-neo () Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2016 at 04:44:07PM -0700, Dan Williams wrote: > Testing the dax-device autodetect support revealed a probe failure with > the following result: > > dax0.1: bad offset: 0x8200000 dax disabled > > The original pfn-device implementation inferred the alignment from > ilog2(offset), now that the alignment is explicit the is_power_of_2() > needs replacing with a real sanity check against the recorded alignment. > Otherwise the alignment check is useless in the implicit case and only > the minimum size of the offset matters. > > This self-consistency check is further validated by the probe path that > will re-check that the offset is large enough to contain all the > metadata required to enable the device. > > Cc: > Signed-off-by: Dan Williams Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumshirn@suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850