# Re: \[PATCH 4/4 v4\] mdmon: bad block support for external metadata - clear bad blocks

- From: Jes Sorensen \<hidden\>
- Date: 2016-11-28 22:50:13 
- List: linux-raid
- Page: https://ratatoskr.run/linux-raid/2016/11/6633711
- Thread: https://ratatoskr.run/linux-raid/2016/11/6633711/t.md

```text
Tomasz Majchrzak [ref] writes:
> 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 <redacted>
> Reviewed-by: Artur Paszkiewicz <redacted>
> ---
>  mdadm.h   |  7 ++++++
>  monitor.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 86 insertions(+), 2 deletions(-)

Applied!

Thanks,
Jes
```
