)]}'
{
  "commit": "ecb554a846f8e9d2a58f6d6c118168a63ac065aa",
  "tree": "c52b265969972d5df0fe104110bc5cbfb220f3a7",
  "parents": [
    "76da03467a1a78811777561bbb1fa56175ee4778"
  ],
  "author": {
    "name": "FUJITA Tomonori",
    "email": "fujita.tomonori@lab.ntt.co.jp",
    "time": "Thu Jul 09 14:46:53 2009 +0200"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "axboe@carl.(none)",
    "time": "Fri Jul 10 20:31:53 2009 +0200"
  },
  "message": "block: fix sg SG_DXFER_TO_FROM_DEV regression\n\nI overlooked SG_DXFER_TO_FROM_DEV support when I converted sg to use\nthe block layer mapping API (2.6.28).\n\nDouglas Gilbert explained SG_DXFER_TO_FROM_DEV:\n\nhttp://www.spinics.net/lists/linux-scsi/msg37135.html\n\n\u003d\nThe semantics of SG_DXFER_TO_FROM_DEV were:\n   - copy user space buffer to kernel (LLD) buffer\n   - do SCSI command which is assumed to be of the DATA_IN\n     (data from device) variety. This would overwrite\n     some or all of the kernel buffer\n   - copy kernel (LLD) buffer back to the user space.\n\nThe idea was to detect short reads by filling the original\nuser space buffer with some marker bytes (\"0xec\" it would\nseem in this report). The \"resid\" value is a better way\nof detecting short reads but that was only added this century\nand requires co-operation from the LLD.\n\u003d\n\nThis patch changes the block layer mapping API to support this\nsemantics. This simply adds another field to struct rq_map_data and\nenables __bio_copy_iov() to copy data from user space even with READ\nrequests.\n\nIt\u0027s better to add the flags field and kills null_mapped and the new\nfrom_user fields in struct rq_map_data but that approach makes it\ndifficult to send this patch to stable trees because st and osst\ndrivers use struct rq_map_data (they were converted to use the block\nlayer in 2.6.29 and 2.6.30). Well, I should clean up the block layer\nmapping API.\n\nzhou sf reported this regiression and tested this patch:\n\nhttp://www.spinics.net/lists/linux-scsi/msg37128.html\nhttp://www.spinics.net/lists/linux-scsi/msg37168.html\n\nReported-by: zhou sf \u003csxzzsf@gmail.com\u003e\nTested-by: zhou sf \u003csxzzsf@gmail.com\u003e\nCc: stable@kernel.org\nSigned-off-by: FUJITA Tomonori \u003cfujita.tomonori@lab.ntt.co.jp\u003e\nSigned-off-by: Jens Axboe \u003cjens.axboe@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4d6f2fe1cfe9987ee5a6be65dfc75fc77111745e",
      "old_mode": 33188,
      "old_path": "drivers/scsi/sg.c",
      "new_id": "9230402c45afcbe0c1a06188b83c99a3f39a104b",
      "new_mode": 33188,
      "new_path": "drivers/scsi/sg.c"
    },
    {
      "type": "modify",
      "old_id": "1486b19fc431560b84c4a8627e229ac359f719c6",
      "old_mode": 33188,
      "old_path": "fs/bio.c",
      "new_id": "76738005c8e8af43c3b084a48d4f752e36e2186d",
      "new_mode": 33188,
      "new_path": "fs/bio.c"
    },
    {
      "type": "modify",
      "old_id": "bb3d3997870139293998814762493632329310fe",
      "old_mode": 33188,
      "old_path": "include/linux/blkdev.h",
      "new_id": "0146e0fecf1aa3ae76edb1662294a0eae9c0f2df",
      "new_mode": 33188,
      "new_path": "include/linux/blkdev.h"
    }
  ]
}
