[PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers

Zhang Yi posted 2 patches 3 weeks, 1 day ago
drivers/block/drbd/drbd_nl.c | 1 +
drivers/md/md-linear.c       | 1 +
drivers/md/raid0.c           | 1 +
drivers/md/raid1.c           | 1 +
drivers/md/raid10.c          | 1 +
drivers/md/raid5.c           | 1 +
6 files changed, 6 insertions(+)
[PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers
Posted by Zhang Yi 3 weeks, 1 day ago
From: Zhang Yi <yi.zhang@huawei.com>

Changes since v1:
 - Improve commit messages in patch 1 by adding a simple reproduction
   case as Paul suggested and explaining the implementation differences
   between RAID 0 and RAID 1/10/5, no code changes.

v1: https://lore.kernel.org/linux-block/20250825083320.797165-1-yi.zhang@huaweicloud.com/

This series fixes the initialization of max_hw_wzeroes_unmap_sectors in
queue_limits for all md raid and drbd drivers, preventing
blk_validate_limits() failures on underlying devices that support the
unmap write zeroes command.

Best regards,
Yi.

Zhang Yi (2):
  md: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
  drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter

 drivers/block/drbd/drbd_nl.c | 1 +
 drivers/md/md-linear.c       | 1 +
 drivers/md/raid0.c           | 1 +
 drivers/md/raid1.c           | 1 +
 drivers/md/raid10.c          | 1 +
 drivers/md/raid5.c           | 1 +
 6 files changed, 6 insertions(+)

-- 
2.46.1
Re: [PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers
Posted by Zhang Yi 2 weeks, 6 days ago
Hi, Jens!

Can you take this patch set through the linux-block tree?

Thanks,
Yi.

On 9/10/2025 7:11 PM, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
> 
> Changes since v1:
>  - Improve commit messages in patch 1 by adding a simple reproduction
>    case as Paul suggested and explaining the implementation differences
>    between RAID 0 and RAID 1/10/5, no code changes.
> 
> v1: https://lore.kernel.org/linux-block/20250825083320.797165-1-yi.zhang@huaweicloud.com/
> 
> This series fixes the initialization of max_hw_wzeroes_unmap_sectors in
> queue_limits for all md raid and drbd drivers, preventing
> blk_validate_limits() failures on underlying devices that support the
> unmap write zeroes command.
> 
> Best regards,
> Yi.
> 
> Zhang Yi (2):
>   md: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
>   drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
> 
>  drivers/block/drbd/drbd_nl.c | 1 +
>  drivers/md/md-linear.c       | 1 +
>  drivers/md/raid0.c           | 1 +
>  drivers/md/raid1.c           | 1 +
>  drivers/md/raid10.c          | 1 +
>  drivers/md/raid5.c           | 1 +
>  6 files changed, 6 insertions(+)
>
Re: [PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers
Posted by John Garry 2 weeks, 3 days ago
On 12/09/2025 07:16, Zhang Yi wrote:
> Hi, Jens!
> 
> Can you take this patch set through the linux-block tree?


md raid maintainers,

please try to get this picked up ASAP. As things stand, all these RAID 
personalities will be broken for 6.17 on drives supporting/reporting 
write zeroes.

Thanks

> 
> Thanks,
> Yi.
> 
> On 9/10/2025 7:11 PM, Zhang Yi wrote:
>> From: Zhang Yi <yi.zhang@huawei.com>
>>
>> Changes since v1:
>>   - Improve commit messages in patch 1 by adding a simple reproduction
>>     case as Paul suggested and explaining the implementation differences
>>     between RAID 0 and RAID 1/10/5, no code changes.
>>
>> v1: https://urldefense.com/v3/__https://lore.kernel.org/linux-block/20250825083320.797165-1-yi.zhang@huaweicloud.com/__;!!ACWV5N9M2RV99hQ!JAN4eq3ePrspeto0Hn7563lg3392Lh44jM1oTbgxbDoClxVOh5B73QhGD53f9tiLxuxfJCr51PyAP55COV2TTZAt$
>>
>> This series fixes the initialization of max_hw_wzeroes_unmap_sectors in
>> queue_limits for all md raid and drbd drivers, preventing
>> blk_validate_limits() failures on underlying devices that support the
>> unmap write zeroes command.
>>
>> Best regards,
>> Yi.
>>
>> Zhang Yi (2):
>>    md: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
>>    drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
>>
>>   drivers/block/drbd/drbd_nl.c | 1 +
>>   drivers/md/md-linear.c       | 1 +
>>   drivers/md/raid0.c           | 1 +
>>   drivers/md/raid1.c           | 1 +
>>   drivers/md/raid10.c          | 1 +
>>   drivers/md/raid5.c           | 1 +
>>   6 files changed, 6 insertions(+)
>>
> 
>
Re: [PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers
Posted by Yu Kuai 2 weeks, 2 days ago
Hi,

在 2025/09/15 18:43, John Garry 写道:
> On 12/09/2025 07:16, Zhang Yi wrote:
>> Hi, Jens!
>>
>> Can you take this patch set through the linux-block tree?
> 
> 
> md raid maintainers,
> 
> please try to get this picked up ASAP. As things stand, all these RAID 
> personalities will be broken for 6.17 on drives supporting/reporting 
> write zeroes.
> 

Not sure if Jens missed this, I'll pick patch 1 later today if Jens
doesn't apply.

Thanks,
Kuai

> Thanks
> 
>>
>> Thanks,
>> Yi.
>>
>> On 9/10/2025 7:11 PM, Zhang Yi wrote:
>>> From: Zhang Yi <yi.zhang@huawei.com>
>>>
>>> Changes since v1:
>>>   - Improve commit messages in patch 1 by adding a simple reproduction
>>>     case as Paul suggested and explaining the implementation differences
>>>     between RAID 0 and RAID 1/10/5, no code changes.
>>>
>>> v1: 
>>> https://urldefense.com/v3/__https://lore.kernel.org/linux-block/20250825083320.797165-1-yi.zhang@huaweicloud.com/__;!!ACWV5N9M2RV99hQ!JAN4eq3ePrspeto0Hn7563lg3392Lh44jM1oTbgxbDoClxVOh5B73QhGD53f9tiLxuxfJCr51PyAP55COV2TTZAt$ 
>>>
>>>
>>> This series fixes the initialization of max_hw_wzeroes_unmap_sectors in
>>> queue_limits for all md raid and drbd drivers, preventing
>>> blk_validate_limits() failures on underlying devices that support the
>>> unmap write zeroes command.
>>>
>>> Best regards,
>>> Yi.
>>>
>>> Zhang Yi (2):
>>>    md: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
>>>    drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
>>>
>>>   drivers/block/drbd/drbd_nl.c | 1 +
>>>   drivers/md/md-linear.c       | 1 +
>>>   drivers/md/raid0.c           | 1 +
>>>   drivers/md/raid1.c           | 1 +
>>>   drivers/md/raid10.c          | 1 +
>>>   drivers/md/raid5.c           | 1 +
>>>   6 files changed, 6 insertions(+)
>>>
>>
>>
> 
> 
> .
> 

Re: (subset) [PATCH v2 0/2] Fix the initialization of max_hw_wzeroes_unmap_sectors for stacking drivers
Posted by Jens Axboe 2 weeks, 1 day ago
On Wed, 10 Sep 2025 19:11:05 +0800, Zhang Yi wrote:
> Changes since v1:
>  - Improve commit messages in patch 1 by adding a simple reproduction
>    case as Paul suggested and explaining the implementation differences
>    between RAID 0 and RAID 1/10/5, no code changes.
> 
> v1: https://lore.kernel.org/linux-block/20250825083320.797165-1-yi.zhang@huaweicloud.com/
> 
> [...]

Applied, thanks!

[2/2] drbd: init queue_limits->max_hw_wzeroes_unmap_sectors parameter
      commit: 027a7a9c07d0d759ab496a7509990aa33a4b689c

Best regards,
-- 
Jens Axboe