]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, btt: consolidate arena validation
authorVishal Verma <vishal.l.verma@intel.com>
Wed, 29 Jul 2015 20:58:08 +0000 (14:58 -0600)
committerDan Williams <dan.j.williams@intel.com>
Fri, 14 Aug 2015 17:43:04 +0000 (13:43 -0400)
commite6e5338fb733e85e8c4dac783d7837eaa5d14113
tree84a669c9fb6c9889ba7b17976acf5b50c08bbd54
parent18b8b8625b41ff09fd5057327193c86515261415
libnvdimm, btt: consolidate arena validation

Use arena_is_valid as a common routine for checking the validity of an
info block from both discover_arenas, and nd_btt_probe.

As a result, don't check for validity of the BTT's UUID, and lbasize.
The checksum in the BTT info block guarantees self-consistency, and when
we're called from nd_btt_probe, we don't have a valid uuid or lbasize
available to check against.

Also cleanup to return a bool instead of an int.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/btt.c
drivers/nvdimm/btt.h
drivers/nvdimm/btt_devs.c