)]}'
{
  "commit": "b348ca2e043c0f7c9ecc1bbbd7dd87db47887e9f",
  "tree": "e9c26a542a03226f2c38a81fe70f058a7184c292",
  "parents": [
    "1cf18cc9bf5e9f88ad92f89886652e0361e2f41f"
  ],
  "author": {
    "name": "Stefan Hajnoczi",
    "email": "stefanha@redhat.com",
    "time": "Tue Mar 11 21:26:08 2025 +0800"
  },
  "committer": {
    "name": "Kevin Wolf",
    "email": "kwolf@redhat.com",
    "time": "Thu Mar 13 17:57:23 2025 +0100"
  },
  "message": "virtio-scsi: introduce event and ctrl virtqueue locks\n\nVirtqueues are not thread-safe. Until now this was not a major issue\nsince all virtqueue processing happened in the same thread. The ctrl\nqueue\u0027s Task Management Function (TMF) requests sometimes need the main\nloop, so a BH was used to schedule the virtqueue completion back in the\nthread that has virtqueue access.\n\nWhen IOThread Virtqueue Mapping is introduced in later commits, event\nand ctrl virtqueue accesses from other threads will become necessary.\nIntroduce an optional per-virtqueue lock so the event and ctrl\nvirtqueues can be protected in the commits that follow.\n\nThe addition of the ctrl virtqueue lock makes\nvirtio_scsi_complete_req_from_main_loop() and its BH unnecessary.\nInstead, take the ctrl virtqueue lock from the main loop thread.\n\nThe cmd virtqueue does not have a lock because the entirety of SCSI\ncommand processing happens in one thread. Only one thread accesses the\ncmd virtqueue and a lock is unnecessary.\n\nSigned-off-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\nReviewed-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\nMessage-ID: \u003c20250311132616.1049687-6-stefanha@redhat.com\u003e\nTested-by: Peter Krempa \u003cpkrempa@redhat.com\u003e\nSigned-off-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7d094e188103ca96f6acbf06ad022f4ced066c1f",
      "old_mode": 33188,
      "old_path": "hw/scsi/virtio-scsi.c",
      "new_id": "073ccd3d5b47ffe1f7e3d8a8b4b58f47ea8430d0",
      "new_mode": 33188,
      "new_path": "hw/scsi/virtio-scsi.c"
    },
    {
      "type": "modify",
      "old_id": "be230cd4bfcd737ad1c6124e29d5122f87e02361",
      "old_mode": 33188,
      "old_path": "include/hw/virtio/virtio-scsi.h",
      "new_id": "4ee98ebf6327668c6e3ab081b9dbadf2027eb934",
      "new_mode": 33188,
      "new_path": "include/hw/virtio/virtio-scsi.h"
    }
  ]
}
