)]}'
{
  "commit": "91614c054c9ffc26b47a5cb3135113aa0f6e6ff0",
  "tree": "83a618f1b3c02569b11d83f91e0b8492f06c61f9",
  "parents": [
    "477ffb9d8732f30e7ab2d20f6ed0c22bad37a4a5"
  ],
  "author": {
    "name": "Kai Makisara",
    "email": "Kai.Makisara@kolumbus.fi",
    "time": "Fri Jan 26 00:38:39 2007 +0200"
  },
  "committer": {
    "name": "James Bottomley",
    "email": "jejb@mulgrave.il.steeleye.com",
    "time": "Sat Jan 27 09:18:21 2007 -0600"
  },
  "message": "[SCSI] st: A MTIOCTOP/MTWEOF within the early warning will cause the file number to be incorrect\n\nOn Wed, 24 Jan 2007, Andrew Morton wrote:\n\n\u003e On Mon, 22 Jan 2007 13:07:20 -0800\n\u003e bugme-daemon@bugzilla.kernel.org wrote:\n\u003e\n\u003e \u003e http://bugzilla.kernel.org/show_bug.cgi?id\u003d7864\n\u003e \u003e\n\u003e \u003e            Summary: A MTIOCTOP/MTWEOF within the early warning will cause\n\u003e \u003e                     the file number to be incorrect\n\u003e \u003e     Kernel Version: 2.6.19.2\n\u003e \u003e             Status: NEW\n\u003e \u003e           Severity: low\n\u003e \u003e              Owner: io_scsi@kernel-bugs.osdl.org\n\u003e \u003e          Submitter: ce_reisinger@yahoo.com\n\u003e \u003e\n\u003e \u003e\n\u003e \u003e Write records to a SCSI tape until a write fails with a ENOSPC (you have reached\n\u003e \u003e early warning.\n\u003e \u003e Now perform a:\n\u003e \u003e    struct mtget before, after;\n\u003e \u003e    ioctl(fd, MTIOCGET, \u0026before);\n\u003e \u003e    struct mtop mtop \u003d { MTWEOF, 1 };\n\u003e \u003e    ioctl(fd, MTIOCTOP, \u0026mtop);\n\u003e \u003e    ioctl(fd, MTIOCGET, \u0026after);\n\u003e \u003e\n\u003e \u003e Check the value of mt_fileno in the before and after structures. Notice the\n\u003e \u003e after is 2 greater then the before.\n\u003e \u003e\n\u003e \u003e The problem appears to be in the block of code starting at line 2817 in st.c.\n\u003e \u003e This block is entered because the drive did return a CHECK CONDITION with NO\n\u003e \u003e SENSE and the SENSE_EOM bit set. At lines 2824/5 the fileno is incremented. But\n\u003e \u003e it has already been increased by the number of filemarks requested by the\n\u003e \u003e MTIOCTOP. I believe that the residue count in the sense data should be\n\u003e \u003e subtracted from fileno, not a increment as is done.\n\u003e \u003e\n\u003e\n\u003e Thanks.  Could you please send us a tested patch to fix these things, as\n\u003e per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt ?\n\u003e\nThe analysis is basically correct and explains the bug. According to the\nSCSI standards, the sense code is NO SENSE or RECOVERED ERROR in case\nwriting filemark(s) succeeds. If it fails (partly or completely) the sense\ncode is VOLUME OVERFLOW. The patch below is tested to fix the case when\none filemark is successfully written after the EOM early warning. It\nshould also fix the case at real EOM but this has not been tested.\n\nCarl, thanks for reporting the bug and providing the analysis for the fix.\n\nSigned-off-by: Kai Makisara \u003ckai.makisara@kolumbus.fi\u003e\nSigned-off-by: James Bottomley \u003cJames.Bottomley@SteelEye.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e016e0906e1a99aa2a26728e3b9238213aafd97b",
      "old_mode": 33188,
      "old_path": "drivers/scsi/st.c",
      "new_id": "488ec7948a570766856436970a40aa2fd3813528",
      "new_mode": 33188,
      "new_path": "drivers/scsi/st.c"
    }
  ]
}
