diff options
author | Tomasz Majchrzak <tomasz.majchrzak@intel.com> | 2016-10-27 10:53:45 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-11-28 17:49:42 -0500 |
commit | 42d902d9db0874933d23b9735d76427b0ee23828 (patch) | |
tree | 827bc4cfac9913e472381e601fded05de765909e /mdadm.h | |
parent | 1ab97c976b3f1cdc6d36d72a42ae863188555732 (diff) | |
download | mdadm-42d902d9db0874933d23b9735d76427b0ee23828.tar.gz |
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>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1059,6 +1059,13 @@ extern struct superswitch { int (*record_bad_block)(struct active_array *a, int n, unsigned long long sector, int length); + /* clears bad block from metadata */ + int (*clear_bad_block)(struct active_array *a, int n, + unsigned long long sector, int length); + + /* get list of bad blocks from metadata */ + struct md_bb *(*get_bad_blocks)(struct active_array *a, int n); + int swapuuid; /* true if uuid is bigending rather than hostendian */ int external; const char *name; /* canonical metadata name */ |