)]}'
{
  "commit": "df8e96f39103adf5a13332d784040a2c62667243",
  "tree": "01d7259260f628f4075c39c1cc7804b72998a601",
  "parents": [
    "44b998e1eb254edc87177819ee693690fac68b7f"
  ],
  "author": {
    "name": "David Woodhouse",
    "email": "dwmw2@infradead.org",
    "time": "Wed Apr 25 03:23:42 2007 +0100"
  },
  "committer": {
    "name": "David Woodhouse",
    "email": "dwmw2@infradead.org",
    "time": "Wed Apr 25 03:23:42 2007 +0100"
  },
  "message": "[JFFS2] Improve read_inode memory usage, v2.\n\nWe originally used to read every node and allocate a jffs2_tmp_dnode_info\nstructure for each, before processing them in (reverse) version order\nand discarding the ones which are obsoleted by later nodes.\n\nWith huge logfiles, this behaviour caused memory problems. For example, a\nfile involved in OLPC trac #1292 has 1822391 nodes, and would cause the XO\nmachine to run out of memory during the first stage of read_inode().\n\nInstead of just inserting nodes into a tree in version order as we find\nthem, we now put them into a tree in order of their offset within the\nfile, which allows us to immediately discard nodes which are completely\nobsoleted.\n\nWe don\u0027t use a full tree with \u0027fragments\u0027 pointing to the real data\nstructure, as we do in the normal fragtree. We sort only on the start\naddress, and add an \u0027overlapped\u0027 flag to the tmp_dnode_info to indicate\nthat the node in question is (partially) overlapped by another.\n\nWhen the scan is complete, we start at the end of the file, adding each\nnode to a real fragtree as before. Where the node is non-overlapped, we\njust add it (it doesn\u0027t matter that it\u0027s not the latest version; there is\nno overlap). When the node at the end of the tree _is_ overlapped, we sort\nit and all its overlapping nodes into version order and then add them to\nthe fragtree in that order.\n\nThis \u0027early discard\u0027 reduces the peak allocation of tmp_dnode_info\nstructures from 1.8M to a mere 62872 (3.5%) in the degenerate case\nreferenced above.\n\nThis version of the patch also correctly rememembers the highest node\nversion# seen for an inode when it\u0027s scanned.\n\nSigned-off-by: David Woodhouse \u003cdwmw2@infradead.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5a6b4d64206c2920159c33a48608468352c72c02",
      "old_mode": 33188,
      "old_path": "fs/jffs2/nodelist.c",
      "new_id": "fecffbc63552eef7f0be8a36440074419b0b76ea",
      "new_mode": 33188,
      "new_path": "fs/jffs2/nodelist.c"
    },
    {
      "type": "modify",
      "old_id": "382662cc61e7891831ae737f22a0a36305d518f5",
      "old_mode": 33188,
      "old_path": "fs/jffs2/nodelist.h",
      "new_id": "e5c8f2be8e221acb55fae65cf9866eb511bea1bc",
      "new_mode": 33188,
      "new_path": "fs/jffs2/nodelist.h"
    },
    {
      "type": "modify",
      "old_id": "1298848336b8139e099eb51b757e34b610e9835d",
      "old_mode": 33188,
      "old_path": "fs/jffs2/readinode.c",
      "new_id": "49d4b0a67c55b4ca8c86faf558ef75a5e6abfad9",
      "new_mode": 33188,
      "new_path": "fs/jffs2/readinode.c"
    }
  ]
}
