]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super-ddf: optimize DDF header search for widely used RAID controllers
authorlilinzhe <llz@antiy.cn>
Mon, 16 Dec 2024 04:11:41 +0000 (12:11 +0800)
committerMariusz Tkaczyk <mtkaczyk@kernel.org>
Mon, 3 Feb 2025 10:19:00 +0000 (11:19 +0100)
commitf2197b6b6c14af6c788c628acd1fc6d92c268c53
treed0c3d135379f589634c5cc3a18837a61d5138659
parent9e8b3b1492cff63dafb759382c74a479460f49e6
super-ddf: optimize DDF header search for widely used RAID controllers

Implemented fallback logic to search the last 32MB of the device
for the DDF header (magic). If found, proceeds to load the DDF metadata
from the located position.

When clearing metadata as required by the mdadm --zero (function Kill),
also erase the last 32MB of data; otherwise, it may result in an
infinite loop.

According to the specification, the Anchor Header should be placed at
the end of the disk. However,some widely used RAID hardware, such as
LSI and PERC, do not position it within the last 512 bytes of the disk.

Signed-off-by: lilinzhe <llz@antiy.cn>
super-ddf.c
xmalloc.c
xmalloc.h