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: <[email protected]> > Signed-off-by: Dan Williams <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]> -- Johannes Thumshirn Storage [email protected] +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

