)]}'
{
  "commit": "7b3d9545f9ac8b31528dd2d6d8ec8d19922917b8",
  "tree": "e8af5ec41abf8ec3a678b5643de5580db417d16f",
  "parents": [
    "911833440b498e3e4fe2f12c1ae2bd44400c7004"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Sun Jan 06 10:17:12 2008 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Sun Jan 06 10:17:12 2008 -0800"
  },
  "message": "Revert \"scsi: revert \"[SCSI] Get rid of scsi_cmnd-\u003edone\"\"\n\nThis reverts commit ac40532ef0b8649e6f7f83859ea0de1c4ed08a19, which gets\nus back the original cleanup of 6f5391c283d7fdcf24bf40786ea79061919d1e1d.\n\nIt turns out that the bug that was triggered by that commit was\napparently not actually triggered by that commit at all, and just the\ntesting conditions had changed enough to make it appear to be due to it.\n\nThe real problem seems to have been found by Peter Osterlund:\n\n  \"pktcdvd sets it [block device size] when opening the /dev/pktcdvd\n   device, but when the drive is later opened as /dev/scd0, there is\n   nothing that sets it back.  (Btw, 40944 is possible if the disk is a\n   CDRW that was formatted with \"cdrwtool -m 10236\".)\n\n   The problem is that pktcdvd opens the cd device in non-blocking mode\n   when pktsetup is run, and doesn\u0027t close it again until pktsetup -d is\n   run.  The effect is that if you meanwhile open the cd device,\n   blkdev.c:do_open() doesn\u0027t call bd_set_size() because\n   bdev-\u003ebd_openers is non-zero.\"\n\nIn particular, to repeat the bug (regardless of whether commit\n6f5391c283d7fdcf24bf40786ea79061919d1e1d is applied or not):\n\n  \" 1. Start with an empty drive.\n    2. pktsetup 0 /dev/scd0\n    3. Insert a CD containing an isofs filesystem.\n    4. mount /dev/pktcdvd/0 /mnt/tmp\n    5. umount /mnt/tmp\n    6. Press the eject button.\n    7. Insert a DVD containing a non-writable filesystem.\n    8. mount /dev/scd0 /mnt/tmp\n    9. find /mnt/tmp -type f -print0 | xargs -0 sha1sum \u003e/dev/null\n    10. If the DVD contains data beyond the physical size of a CD, you\n        get I/O errors in the terminal, and dmesg reports lots of\n        \"attempt to access beyond end of device\" errors.\"\n\nwhich in turn is because the nested open after the media change won\u0027t\ncause the size to be set properly (because the original open still holds\nthe block device, and we only do the bd_set_size() when we don\u0027t have\nother people holding the device open).\n\nThe proper fix for that is probably to just do something like\n\n\tbdev-\u003ebd_inode-\u003ei_size \u003d (loff_t)get_capacity(disk)\u003c\u003c9;\n\nin fs/block_dev.c:do_open() even for the cases where we\u0027re not the\noriginal opener (but *not* call bd_set_size(), since that will also\nchange the block size of the device).\n\nCc: Peter Osterlund \u003cpetero2@telia.com\u003e\nCc: James Bottomley \u003cJames.Bottomley@HansenPartnership.com\u003e\nCc: Matthew Wilcox \u003cmatthew@wil.cx\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7ceb8209e5df416f93dac3916e4f11e1b75616ee",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi.c",
      "new_id": "0fb1709ce5e371649c0c90126a3a8558a1fd13a4",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi.c"
    },
    {
      "type": "modify",
      "old_id": "70700b97c915a482210c8bcab5462d22b0a38889",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_error.c",
      "new_id": "ebaca4ca4a135787a6ff3fa477a722dbc4b2ec45",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_error.c"
    },
    {
      "type": "modify",
      "old_id": "60f77c4b39468d17852e78a503602d42f470f58a",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_lib.c",
      "new_id": "a9ac5b1b1667f339d5db22760e308b18ac9a3a71",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_lib.c"
    },
    {
      "type": "modify",
      "old_id": "1de52b6ded40c2dfdadfd8f23408f07d985856ac",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_priv.h",
      "new_id": "3f34e9376b0aa148c8dafc58ee0c52c65849b1e1",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_priv.h"
    },
    {
      "type": "modify",
      "old_id": "cb85296d53842ae1bea20b88aa492d021412853d",
      "old_mode": 33188,
      "old_path": "drivers/scsi/sd.c",
      "new_id": "a69b155f39a2b2a1c4134b440e2cd5404d478e10",
      "new_mode": 33188,
      "new_path": "drivers/scsi/sd.c"
    },
    {
      "type": "modify",
      "old_id": "a0c4e13d4dabbbe70a962e103e78577ce71c6803",
      "old_mode": 33188,
      "old_path": "drivers/scsi/sr.c",
      "new_id": "c61999031141ca8912a3ac0cecd441bae53cc2db",
      "new_mode": 33188,
      "new_path": "drivers/scsi/sr.c"
    },
    {
      "type": "modify",
      "old_id": "7613c29893703bc52cf532f9ad1896e3444a904d",
      "old_mode": 33188,
      "old_path": "include/scsi/scsi_cmnd.h",
      "new_id": "3f47e522a1ec3bedf6c85b9d30145c7208a626b5",
      "new_mode": 33188,
      "new_path": "include/scsi/scsi_cmnd.h"
    },
    {
      "type": "modify",
      "old_id": "56a304709fde0acc626f0ec4e8a6740c1ee2851e",
      "old_mode": 33188,
      "old_path": "include/scsi/scsi_driver.h",
      "new_id": "1f5ca7f621165797ff559203e99b5a1deebe1624",
      "new_mode": 33188,
      "new_path": "include/scsi/scsi_driver.h"
    },
    {
      "type": "modify",
      "old_id": "aa1e716130108dc40e6b2681e879dfca453ba3e0",
      "old_mode": 33188,
      "old_path": "include/scsi/sd.h",
      "new_id": "f7513313ef0d5d5bdd85194dfb6771ac294cc22d",
      "new_mode": 33188,
      "new_path": "include/scsi/sd.h"
    }
  ]
}
