• Mike Snitzer's avatar
    dm snapshot: allow live exception store handover between tables · c1f0c183
    Mike Snitzer authored
    Permit in-use snapshot exception data to be 'handed over' from one
    snapshot instance to another.  This is a pre-requisite for patches
    that allow the changes made in a snapshot device to be merged back into
    its origin device and also allows device resizing.
    
    The basic call sequence is:
    
      dmsetup load new_snapshot (referencing the existing in-use cow device)
         - the ctr code detects that the cow is already in use and allows the
           two snapshot target instances to be linked together
      dmsetup suspend original_snapshot
      dmsetup resume new_snapshot
         - the new_snapshot becomes live, and if anything now tries to access
           the original one it will receive -EIO
      dmsetup remove original_snapshot
    
    (There can only be two snapshot targets referencing the same cow device
    simultaneously.)
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
    c1f0c183
dm-snap.c 40 KB