libnvdimm: Export max available extent
authorKeith Busch <keith.busch@intel.com>
Tue, 24 Jul 2018 21:07:58 +0000 (15:07 -0600)
committerDave Jiang <dave.jiang@intel.com>
Wed, 25 Jul 2018 21:11:43 +0000 (14:11 -0700)
commit1e687220ef2d95a582e13d8de79932bfe32fdfa8
treef3e15d37cff8ebc26e86a679938f4a4f276b47cb
parent12e3129e29b406c41bc89231092a20d79dbf802c
libnvdimm: Export max available extent

The 'available_size' attribute showing the combined total of all
unallocated space isn't always useful to know how large of a namespace
a user may be able to allocate if the region is fragmented. This patch
will export the largest extent of unallocated space that may be allocated
to create a new namespace.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/nvdimm/region_devs.c