]> git.ipfire.org Git - thirdparty/mdadm.git/commit - monitor.c
mdmon: bad block support for external metadata - clear bad blocks
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Thu, 27 Oct 2016 08:53:45 +0000 (10:53 +0200)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 28 Nov 2016 22:49:42 +0000 (17:49 -0500)
commit42d902d9db0874933d23b9735d76427b0ee23828
tree827bc4cfac9913e472381e601fded05de765909e
parent1ab97c976b3f1cdc6d36d72a42ae863188555732
mdmon: bad block support for external metadata - clear bad blocks

If an update of acknowledged bad blocks file is notified, read entire
bad block list from sysfs file and compare it against local list of bad
blocks. If any obsolete entries are found, remove them from metadata.

As mdmon cannot perform any memory allocation, new superswitch method
get_bad_blocks is expected to return a list of bad blocks in metadata
without allocating memory. It's up to metadata handler to allocate all
required memory in advance.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
mdadm.h
monitor.c