)]}'
{
  "commit": "6e0d9fd38b750d678bf9fd07db23582f52fafa55",
  "tree": "e802c35a4543f1f55f782838cb946c81c124843a",
  "parents": [
    "1a067a22e466d2910d10d47a7125bf7ced943165"
  ],
  "author": {
    "name": "Artem Bityutskiy",
    "email": "Artem.Bityutskiy@nokia.com",
    "time": "Thu Apr 21 14:49:55 2011 +0300"
  },
  "committer": {
    "name": "Artem Bityutskiy",
    "email": "Artem.Bityutskiy@nokia.com",
    "time": "Thu Apr 21 15:27:21 2011 +0300"
  },
  "message": "UBIFS: fix master node recovery\n\nThis patch fixes the following symptoms:\n1. Unmount UBIFS cleanly.\n2. Start mounting UBIFS R/W and have a power cut immediately\n3. Start mounting UBIFS R/O, this succeeds\n4. Try to re-mount UBIFS R/W - this fails immediately or later on,\n   because UBIFS will write the master node to the flash area\n   which has been written before.\n\nThe analysis of the problem:\n\n1. UBIFS is unmounted cleanly, both copies of the master node are clean.\n2. UBIFS is being mounter R/W, starts changing master node copy 1, and\n   a power cut happens. The copy N1 becomes corrupted.\n3. UBIFS is being mounted R/O. It notices the copy N1 is corrupted and\n   reads copy N2. Copy N2 is clean.\n4. Because of R/O mode, UBIFS cannot recover copy 1.\n5. The mount code (ubifs_mount()) sees that the master node is clean,\n   so it decides that no recovery is needed.\n6. We are re-mounting R/W. UBIFS believes no recovery is needed and\n   starts updating the master node, but copy N1 is still corrupted\n   and was not recovered!\n\nFix this problem by marking the master node as dirty every time we\nrecover it and we are in R/O mode. This forces further recovery and\nthe UBIFS cleans-up the corruptions and recovers the copy N1 when\nre-mounting R/W later.\n\nSigned-off-by: Artem Bityutskiy \u003cArtem.Bityutskiy@nokia.com\u003e\nCc: stable@kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "936f2cbfe6b672437aec08219ad017f0fc6f3074",
      "old_mode": 33188,
      "old_path": "fs/ubifs/recovery.c",
      "new_id": "3dbad6fbd1eba528661e458ae56e97c03c43b609",
      "new_mode": 33188,
      "new_path": "fs/ubifs/recovery.c"
    }
  ]
}
