)]}'
{
  "commit": "52c6e6f990669deac3f370f1603815adb55a1dbd",
  "tree": "11e1cf3982cfffb36010faef4a77903473b89d4f",
  "parents": [
    "b50b9f408502a2ea90459ae36ba8cdc9cc005cfe"
  ],
  "author": {
    "name": "Artem Bityutskiy",
    "email": "Artem.Bityutskiy@nokia.com",
    "time": "Mon Apr 25 18:46:31 2011 +0300"
  },
  "committer": {
    "name": "Artem Bityutskiy",
    "email": "Artem.Bityutskiy@nokia.com",
    "time": "Mon May 02 19:23:48 2011 +0300"
  },
  "message": "UBIFS: seek journal heads to the latest bud in replay\n\nThis is the second fix of the following symptom:\n\nUBIFS error (pid 34456): could not find an empty LEB\n\nwhich sometimes happens after power cuts when we mount the file-system - UBIFS\nrefuses it with the above error message which comes from the\n\u0027ubifs_rcvry_gc_commit()\u0027 function. I can reproduce this using the integck test\nwith the UBIFS power cut emulation enabled.\n\nAnalysis of the problem.\n\nCurrently UBIFS replay seeks the journal heads to the last _replayed_ bud.\nBut the buds are replayed out-of-order, so the replay basically seeks journal\nheads to the \"random\" bud belonging to this head, and not to the _last_ one.\n\nThe result of this is that the GC head may be seeked to a full LEB with no free\nspace, or very little free space. And \u0027ubifs_rcvry_gc_commit()\u0027 tries to find a\nfully or mostly dirty LEB to match the current GC head (because we need to\ngarbage-collect that dirty LEB at one go, because we do not have @c-\u003egc_lnum).\nSo \u0027ubifs_find_dirty_leb()\u0027 fails and we fall back to finding an empty LEB and\nalso fail. As a result - recovery fails and mounting fails.\n\nThis patch teaches the replay to initialize the GC heads exactly to the latest\nbuds, i.e. the buds which have the largest sequence number in corresponding\nlog reference nodes.\n\nSigned-off-by: Artem Bityutskiy \u003cArtem.Bityutskiy@nokia.com\u003e\nCc: stable@kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eed0fcff8d731710dc7723d25b1adb10ecbe6805",
      "old_mode": 33188,
      "old_path": "fs/ubifs/replay.c",
      "new_id": "d3d6d365bfc11345d49e3a6bbdc33dd97c476ea9",
      "new_mode": 33188,
      "new_path": "fs/ubifs/replay.c"
    }
  ]
}
