Description of problem:
When 'raid' is made from SSD with working zeroing feature (whitelisted in kernel or whatever else that would mean) - raid 'sync' should avoid useless syncing and just 'TRIM' both legs and have raid in sync.
Likely lvm2 should be able to recognize this state and prepare raid/mirror automatically in-sync state.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Triming/discarding any storage device as requested doesn't make sense for various reasons:
- discards can take (too) long depending on their implementation
- the RAID device on top can be written to immediately after creation, thus
it's not trivial to allow that in parallel with large and slow discard processing
- on upgrades from linear we need to assume the full content need resynchronizing
Closing, because this is an optimization for the very case of raid1/10/4/5 creation
and initial resynchronization (raid6 requires it) which is costly to implement.