On 2024-06-04 06:46, Xiao Ni wrote: > Hi Mariusz > > The discard can't promise to write zero to nvme disks, right? If so, > we can't use it for resync, because it can't make sure the raid is in > sync state. Yes, discard requests are a best effort and the drive is free to ignore some or all of the request. See [1] for more information from Martin Peterson. I think if we have a device that has a fast zero operation that we know guarantees zeroing then the kernel's write-zeros operation should be changed to use it. We shouldn't make fast-but-dangerous options in mdadm. Thanks, Logan [1] https://lore.kernel.org/all/yq1fsgwbijv.fsf@xxxxxxxxxxxxxxxxxxxx/T/#u