)]}'
{
  "commit": "53a295131274c87914c97053e2ca00f19a9c2efa",
  "tree": "406f8e40ae60809acc190a8202ca1d8472e3637c",
  "parents": [
    "06207b0ff596aa4bb192d1fafc593847ed888e39"
  ],
  "author": {
    "name": "Max Reitz",
    "email": "mreitz@redhat.com",
    "time": "Thu Mar 19 14:53:16 2015 -0400"
  },
  "committer": {
    "name": "Kevin Wolf",
    "email": "kwolf@redhat.com",
    "time": "Fri Jun 12 15:54:07 2015 +0200"
  },
  "message": "block: driver should override flags in bdrv_open()\n\nThe BDRV_O_PROTOCOL flag should have an impact only if no driver is\nspecified explicitly. Therefore, if bdrv_open() is called with an\nexplicit block driver argument (either through the options QDict or\nthrough the drv parameter) and that block driver is a protocol block\ndriver, BDRV_O_PROTOCOL should be set; if it is a format block driver,\nBDRV_O_PROTOCOL should be unset.\n\nWhile there was code to unset the flag in case a format block driver\nhas been selected, it only followed the bdrv_fill_options() function\ncall whereas the flag in fact needs to be adjusted before it is used\nthere.\n\nWith that change, BDRV_O_PROTOCOL will always be set if the BDS should\nbe a protocol driver; if the driver has been specified explicitly, the\nnew code will set it; and bdrv_fill_options() will only \"probe\" a\nprotocol driver if BDRV_O_PROTOCOL is set. The probing after\nbdrv_fill_options() cannot select a protocol driver.\n\nThus, bdrv_open_image() to open BDS.file is never called if a protocol\nBDS is about to be created. With that change in turn it is impossible to\ncall bdrv_open_common() with a protocol drv and file !\u003d NULL, which\nallows us to remove the bdrv_swap() call.\n\nThis change breaks a test case in qemu-iotest 051:\n\"-drive file\u003dt.qcow2,file.driver\u003dqcow2\" now works because the explicitly\nspecified \"qcow2\" overrides the BDRV_O_PROTOCOL which is automatically\nset for the \"file\" BDS (and the filename is just passed down).\nTherefore, this patch removes that test case.\n\nSigned-off-by: Max Reitz \u003cmreitz@redhat.com\u003e\nSigned-off-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4ea2c4f5c8decb49caa93f87da96021c8bdc0d7d",
      "old_mode": 33188,
      "old_path": "block.c",
      "new_id": "b2e784e3fffec047ef41f8d257aa5f0b30640c92",
      "new_mode": 33188,
      "new_path": "block.c"
    },
    {
      "type": "modify",
      "old_id": "0360f37e5a9ec37f5a254b67a3bd389725e4723d",
      "old_mode": 33261,
      "old_path": "tests/qemu-iotests/051",
      "new_id": "4a8055b6734887cbb29d265370510b3637ef9593",
      "new_mode": 33261,
      "new_path": "tests/qemu-iotests/051"
    },
    {
      "type": "modify",
      "old_id": "2890eac08429e9bb5d28ad726b4df4cbbbaf53de",
      "old_mode": 33188,
      "old_path": "tests/qemu-iotests/051.out",
      "new_id": "652dd63bf89b26663fd7f5f9e7a9e209d43fd0c3",
      "new_mode": 33188,
      "new_path": "tests/qemu-iotests/051.out"
    }
  ]
}
