On 9/2/25 19:58, Yu Kuai wrote: > Hi, > > 在 2025/9/2 17:38, Damien Le Moal 写道: >> raid1_set_limits(), raid10_set_queue_limits() and raid5_set_limits() >> set max_write_zeroes_sectors to 0 to disable write zeroes support. >> >> However, blk_validate_limits() checks that if >> max_hw_wzeroes_unmap_sectors is not zero, it must be equal to >> max_write_zeroes_sectors. When creating a RAID1, RAID10 or RAID5 array >> of block devices that have a non-zero max_hw_wzeroes_unmap_sectors >> limit, blk_validate_limits() returns an error resulting in a failure >> to start the array. >> >> Fix this by setting max_hw_wzeroes_unmap_sectors to 0 as well in >> raid1_set_limits(), raid10_set_queue_limits() and raid5_set_limits(). >> >> Fixes: 0c40d7cb5ef3 ("block: introduce max_{hw|user}_wzeroes_unmap_sectors to queue limits") >> Signed-off-by: Damien Le Moal <dlemoal@xxxxxxxxxx> >> --- >> drivers/md/raid1.c | 2 ++ >> drivers/md/raid10.c | 1 + >> drivers/md/raid5.c | 1 + >> 3 files changed, 4 insertions(+) > > Yi already posted a fix: > > [PATCH 1/2] md: init queue_limits->max_hw_wzeroes_unmap_sectors > parameter - Zhang Yi <https://lore.kernel.org/all/20250825083320.797165-2-yi.zhang@xxxxxxxxxxxxxxx/> Missed that... Thank you for the link. -- Damien Le Moal Western Digital Research