)]}'
{
  "commit": "174e27c607cfa3ebb92934d28c0fdfcf5ce6c3af",
  "tree": "1bc8f1804dc0917f1a86b2d32c701883932d81fe",
  "parents": [
    "0e6b3e5e97e2e8a25bcfc528dad94edf5220dfeb"
  ],
  "author": {
    "name": "Chen, Kenneth W",
    "email": "kenneth.w.chen@intel.com",
    "time": "Sat Mar 25 03:08:16 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Sat Mar 25 08:23:00 2006 -0800"
  },
  "message": "[PATCH] direct-io: bug fix in dio handling write error\n\nThere is a bug in direct-io on propagating write error up to the higher I/O\nlayer.  When performing an async ODIRECT write to a block device, if a\ndevice error occurred (like media error or disk is pulled), the error code\nis only propagated from device driver to the DIO layer.  The error code\nstops at finished_one_bio().  The aysnc write, however, is supposedly have\na corresponding AIO event with appropriate return code (in this case -EIO).\n Application which waits on the async write event, will hang forever since\nsuch AIO event is lost forever (if such app did not use the timeout option\nin io_getevents call.  Regardless, an AIO event is lost).\n\nThe discovery of above bug leads to another discovery of potential race\nwindow with dio-\u003eresult.  The fundamental problem is that dio-\u003eresult is\noverloaded with dual use: an indicator of fall back path for partial dio\nwrite, and an error indicator used in the I/O completion path.  In the\nevent of device error, the setting of -EIO to dio-\u003eresult clashes with\nvalue used to track partial write that activates the fall back path.\n\nIt was also pointed out that it is impossible to use dio-\u003eresult to track\npartial write and at the same time to track error returned from device\ndriver.  Because direct_io_work can only determines whether it is a partial\nwrite at the end of io submission and in mid stream of those io submission,\na return code could be coming back from the driver.  Thus messing up all\nthe subsequent logic.\n\nProposed fix is to separating out error code returned by the IO completion\npath from partial IO submit tracking.  A new variable is added to dio\nstructure specifically to track io error returned in the completion path.\n\nSigned-off-by: Ken Chen \u003ckenneth.w.chen@intel.com\u003e\nAcked-by: Zach Brown \u003czach.brown@oracle.com\u003e\nAcked-by: Suparna Bhattacharya \u003csuparna@in.ibm.com\u003e\nCc: Badari Pulavarty \u003cpbadari@us.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "27f3e787facaff34b29f28ed6830148a843ffbdb",
      "old_mode": 33188,
      "old_path": "fs/direct-io.c",
      "new_id": "235ed8d1f11e3b41cb332713108ca53ca063245a",
      "new_mode": 33188,
      "new_path": "fs/direct-io.c"
    }
  ]
}
