libnvdimm: fix badblock range handling of ARS range
__add_badblock_range() does not account sector alignment when it sets 'num_sectors'. Therefore, an ARS error record range spanning across two sectors is set to a single sector length, which leaves the 2nd sector unprotected. Change __add_badblock_range() to set 'num_sectors' properly. Cc: <stable@vger.kernel.org> Fixes: 0caeef63 ("libnvdimm: Add a poison list and export badblocks") Signed-off-by: NToshi Kani <toshi.kani@hpe.com> Reviewed-by: NVishal Verma <vishal.l.verma@intel.com> Signed-off-by: NDan Williams <dan.j.williams@intel.com>
Showing
想要评论请 注册 或 登录