[linux-lvm] exposing snapshot block device
zkabelac at redhat.com
Tue Nov 5 16:24:01 UTC 2019
Dne 04. 11. 19 v 18:28 Tomas Dalebjörk napsal(a):
> thanks, I understand that meta data blocks needs to be update, that I can understand.
> how about the other questions?
> like : data write will happen towards which device? cow device or after the copying has been completed to the origin disk?
I'd assume - if the block is still mapped in COW and the block is not yet
merged into origin - the 'write' needs to lend COW - as there is no 'extra'
information about which 'portion' of the chunk has been already 'merged'.
If you happen to 'write' your I/O to currently merged 'chunk' - you will
wait till check gets merged and metadata are updated and then your I/O land in
But I don't think there are any optimization made - as it doesn't really
matter too much in terms of the actual merging speed - if couple I/O are
repeated - who cares - on the overall time of whole merging process it will
have negligible impact - and as said - the preference was made towards
simplicity and correctness.
For the most details - just feel free to take a look at:
i.e. function snapshot_merge_next_chunks()
The snapshot was designed to be small and map a very low percentage of origin
device - it's never been assumed to be used with 200GiB and similar snapshot
More information about the linux-lvm