)]}'
{
  "commit": "13ceef099edd2b70c5a6f3a9ef5d6d97cda2e096",
  "tree": "5d65c397e9e85abe11a6fb0ebf3a69e8a4e91e0d",
  "parents": [
    "a39953dd95ff10e311083d94f4f95c348cb22464"
  ],
  "author": {
    "name": "Jan Kara",
    "email": "jack@suse.cz",
    "time": "Wed Jul 14 07:56:33 2010 +0200"
  },
  "committer": {
    "name": "Joel Becker",
    "email": "joel.becker@oracle.com",
    "time": "Thu Jul 15 15:17:47 2010 -0700"
  },
  "message": "jbd2/ocfs2: Fix block checksumming when a buffer is used in several transactions\n\nOCFS2 uses t_commit trigger to compute and store checksum of the just\ncommitted blocks. When a buffer has b_frozen_data, checksum is computed\nfor it instead of b_data but this can result in an old checksum being\nwritten to the filesystem in the following scenario:\n\n1) transaction1 is opened\n2) handle1 is opened\n3) journal_access(handle1, bh)\n    - This sets jh-\u003eb_transaction to transaction1\n4) modify(bh)\n5) journal_dirty(handle1, bh)\n6) handle1 is closed\n7) start committing transaction1, opening transaction2\n8) handle2 is opened\n9) journal_access(handle2, bh)\n    - This copies off b_frozen_data to make it safe for transaction1 to commit.\n      jh-\u003eb_next_transaction is set to transaction2.\n10) jbd2_journal_write_metadata() checksums b_frozen_data\n11) the journal correctly writes b_frozen_data to the disk journal\n12) handle2 is closed\n    - There was no dirty call for the bh on handle2, so it is never queued for\n      any more journal operation\n13) Checkpointing finally happens, and it just spools the bh via normal buffer\nwriteback.  This will write b_data, which was never triggered on and thus\ncontains a wrong (old) checksum.\n\nThis patch fixes the problem by calling the trigger at the moment data is\nfrozen for journal commit - i.e., either when b_frozen_data is created by\ndo_get_write_access or just before we write a buffer to the log if\nb_frozen_data does not exist. We also rename the trigger to t_frozen as\nthat better describes when it is called.\n\nSigned-off-by: Jan Kara \u003cjack@suse.cz\u003e\nSigned-off-by: Mark Fasheh \u003cmfasheh@suse.com\u003e\nSigned-off-by: Joel Becker \u003cjoel.becker@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bc2ff5932769199f271db9055f7881b2e9c4bf54",
      "old_mode": 33188,
      "old_path": "fs/jbd2/journal.c",
      "new_id": "036880895bfc8c2e99c42f6fd900819315bd508a",
      "new_mode": 33188,
      "new_path": "fs/jbd2/journal.c"
    },
    {
      "type": "modify",
      "old_id": "e214d68620ac167fb5ddeb71775ead1b6063a571",
      "old_mode": 33188,
      "old_path": "fs/jbd2/transaction.c",
      "new_id": "b8e0806681bb0f4acf63964fa3f72ae00e1f8900",
      "new_mode": 33188,
      "new_path": "fs/jbd2/transaction.c"
    },
    {
      "type": "modify",
      "old_id": "39113b5e79e78ef13b78c3cf9c371bf8e40e7386",
      "old_mode": 33188,
      "old_path": "fs/ocfs2/journal.c",
      "new_id": "625de9d7088cdf2c82008b2e875094ec2b43f1d0",
      "new_mode": 33188,
      "new_path": "fs/ocfs2/journal.c"
    },
    {
      "type": "modify",
      "old_id": "a4d2e9f7088ada70d8b1357f418c32cd09a5bf1a",
      "old_mode": 33188,
      "old_path": "include/linux/jbd2.h",
      "new_id": "adf832dec3f37dd639e8aa24fe3cc29c7504a6a7",
      "new_mode": 33188,
      "new_path": "include/linux/jbd2.h"
    }
  ]
}
