)]}'
{
  "commit": "5eb46851de3904cd1be9192fdacb8d34deadc1fc",
  "tree": "f0f0e6e6142cb50d8581477fb79a32f8f3a724ca",
  "parents": [
    "2984ff38ccf6cbc02a7a996a36c7d6f69f3c6146"
  ],
  "author": {
    "name": "Yasuaki Ishimatsu",
    "email": "isimatu.yasuaki@jp.fujitsu.com",
    "time": "Fri Dec 02 10:07:07 2011 +0100"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "axboe@kernel.dk",
    "time": "Fri Dec 02 10:07:07 2011 +0100"
  },
  "message": "cfq-iosched: fix cfq_cic_link() race confition\n\ncfq_cic_link() has race condition. When some processes which shared ioc\nissue I/O to same block device simultaneously, cfq_cic_link() returns -EEXIST\nsometimes. The race condition might stop I/O by following steps:\n\nstep  1: Process A: Issue an I/O to /dev/sda\nstep  2: Process A: Get an ioc (iocA here) in get_io_context() which does not\n\t\t    linked with a cic for the device\nstep  3: Process A: Get a new cic for the device (cicA here) in\n\t\t    cfq_alloc_io_context()\n\nstep  4: Process B: Issue an I/O to /dev/sda\nstep  5: Process B: Get iocA in get_io_context() since process A and B share the\n\t\t    same ioc\nstep  6: Process B: Get a new cic for the device (cicB here) in\n\t\t    cfq_alloc_io_context() since iocA has not been linked with a\n\t\t    cic for the device yet\n\nstep  7: Process A: Link cicA to iocA in cfq_cic_link()\nstep  8: Process A: Dispatch I/O to driver and finish it\n\nstep  9: Process B: Try to link cicB to iocA in cfq_cic_link()\n\t\t    But it fails with showing \"cfq: cic link failed!\" kernel\n\t\t    message, since iocA has already linked with cicA at step 7.\nstep 10: Process B: Wait for finishig I/O in get_request_wait()\n\t\t    The function does not wake up, when there is no I/O to the\n\t\t    device.\n\nWhen cfq_cic_link() returns -EEXIST, it means ioc has already linked with cic.\nSo when cfq_cic_link() return -EEXIST, retry cfq_cic_lookup().\n\nSigned-off-by: Yasuaki Ishimatsu \u003cisimatu.yasuaki@jp.fujitsu.com\u003e\nCc: stable@kernel.org\nSigned-off-by: Jens Axboe \u003caxboe@kernel.dk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3beed83437a3268242e1bb33a10076644dd7b338",
      "old_mode": 33188,
      "old_path": "block/cfq-iosched.c",
      "new_id": "4c12869fcf77e044f75dfd3f4728c3343d9ef1f3",
      "new_mode": 33188,
      "new_path": "block/cfq-iosched.c"
    }
  ]
}
