On Thu, Feb 11, 2021 at 10:09:58PM +0100, David Hildenbrand wrote: > The issue is when the discard happened before starting the snapshot. > Write-protection won‘t work and the zeroed content won‘t be retained in the > snapshot.
I see what you mean now, and iiuc it will only be a problem if init_on_free=1. I think CONFIG_INIT_ON_FREE_DEFAULT_ON should be off for most distros, so the impact should be small, I think. I thought about it, but indeed I didn't see a good way to fix this if without fixing the zero page copy for live snapshot. -- Peter Xu