)]}'
{
  "commit": "fc5d3f843250c9d3bfa2bcfdb7369f4753a49f0e",
  "tree": "7d9d31289930195a4184a75982bf1248de55add4",
  "parents": [
    "f660dc6a2e97756596b2e79ce6127a3034f2308b"
  ],
  "author": {
    "name": "Ian Main",
    "email": "imain@redhat.com",
    "time": "Fri Jul 26 11:39:04 2013 -0700"
  },
  "committer": {
    "name": "Kevin Wolf",
    "email": "kwolf@redhat.com",
    "time": "Fri Jul 26 22:01:31 2013 +0200"
  },
  "message": "Implement sync modes for drive-backup.\n\nThis patch adds sync-modes to the drive-backup interface and\nimplements the FULL, NONE and TOP modes of synchronization.\n\nFULL performs as before copying the entire contents of the drive\nwhile preserving the point-in-time using CoW.\nNONE only copies new writes to the target drive.\nTOP copies changes to the topmost drive image and preserves the\npoint-in-time using CoW.\n\nFor sync mode TOP are creating a new target image using the same backing\nfile as the original disk image.  Then any new data that has been laid\non top of it since creation is copied in the main backup_run() loop.\nThere is an extra check in the \u0027TOP\u0027 case so that we don\u0027t bother to copy\nall the data of the backing file as it already exists in the target.\nThis is where the bdrv_co_is_allocated() is used to determine if the\ndata exists in the topmost layer or below.\n\nAlso any new data being written is intercepted via the write_notifier\nhook which ends up calling backup_do_cow() to copy old data out before\nit gets overwritten.\n\nFor mode \u0027NONE\u0027 we create the new target image and only copy in the\noriginal data from the disk image starting from the time the call was\nmade.  This preserves the point in time data by only copying the parts\nthat are *going to change* to the target image.  This way we can\nreconstruct the final image by checking to see if the given block exists\nin the new target image first, and if it does not, you can get it from\nthe original image.  This is basically an optimization allowing you to\ndo point-in-time snapshots with low overhead vs the \u0027FULL\u0027 version.\n\nSince there is no old data to copy out the loop in backup_run() for the\nNONE case just calls qemu_coroutine_yield() which only wakes up after\nan event (usually cancel in this case).  The rest is handled by the\nbefore_write notifier which again calls backup_do_cow() to write out\nthe old data so it can be preserved.\n\nSigned-off-by: Ian Main \u003cimain@redhat.com\u003e\nSigned-off-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "16105d40b193be9bb40346027bdf58e62b956a96",
      "old_mode": 33188,
      "old_path": "block/backup.c",
      "new_id": "6ae8a05a3eae4efcd7a29fc0be502a9240552688",
      "new_mode": 33188,
      "new_path": "block/backup.c"
    },
    {
      "type": "modify",
      "old_id": "ef55b1a15ca33e27dde71ad764d89fa4195c7d15",
      "old_mode": 33188,
      "old_path": "blockdev.c",
      "new_id": "453486480237b24e221374ac0367f86518ec70dd",
      "new_mode": 33188,
      "new_path": "blockdev.c"
    },
    {
      "type": "modify",
      "old_id": "c6ac871e210ea21f91d799e44a102119048dde54",
      "old_mode": 33188,
      "old_path": "include/block/block_int.h",
      "new_id": "e45f2a0d5686139b5c1facebe0509778c3965e30",
      "new_mode": 33188,
      "new_path": "include/block/block_int.h"
    },
    {
      "type": "modify",
      "old_id": "65a9e26423d22868446b871f0ea3d0ba26ed252a",
      "old_mode": 33188,
      "old_path": "qmp-commands.hx",
      "new_id": "2e59b0d21824e7a3dff1d672662256f134d580c0",
      "new_mode": 33188,
      "new_path": "qmp-commands.hx"
    }
  ]
}
