]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, btt: ensure that initializing metadata clears poison
authorVishal Verma <vishal.l.verma@intel.com>
Wed, 10 May 2017 21:01:31 +0000 (15:01 -0600)
committerDan Williams <dan.j.williams@intel.com>
Thu, 11 May 2017 04:46:22 +0000 (21:46 -0700)
commit7134bd9aee2fb513d98d8b012ab37b67f740d9ff
treefe0b38a554197181de1f019a14893c83201d7bb1
parentba379ee272f33398894f5169ea35f840c2455c27
libnvdimm, btt: ensure that initializing metadata clears poison

If we had badblocks/poison in the metadata area of a BTT, recreating the
BTT would not clear the poison in all cases, notably the flog area. This
is because rw_bytes will only clear errors if the request being sent
down is 512B aligned and sized.

Make sure that when writing the map and info blocks, the rw_bytes being
sent are of the correct size/alignment. For the flog, instead of doing
the smaller log_entry writes only, first do a 'wipe' of the entire area
by writing zeroes in large enough chunks so that errors get cleared.

Cc: Andy Rudoff <andy.rudoff@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/btt.c