)]}'
{
  "commit": "ef2b02d3e617cb0400eedf2668f86215e1b0e6af",
  "tree": "d6d65ea9ad201645dab91383dc6e0928c2069024",
  "parents": [
    "e42601973b1bce1d2987f82159c1ebeaccc6b310"
  ],
  "author": {
    "name": "Eric Sandeen",
    "email": "sandeen@redhat.com",
    "time": "Tue Sep 18 22:46:42 2007 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@woody.linux-foundation.org",
    "time": "Wed Sep 19 11:24:18 2007 -0700"
  },
  "message": "ext34: ensure do_split leaves enough free space in both blocks\n\nThe do_split() function for htree dir blocks is intended to split a leaf\nblock to make room for a new entry.  It sorts the entries in the original\nblock by hash value, then moves the last half of the entries to the new\nblock - without accounting for how much space this actually moves.  (IOW,\nit moves half of the entry *count* not half of the entry *space*).  If by\nchance we have both large \u0026 small entries, and we move only the smallest\nentries, and we have a large new entry to insert, we may not have created\nenough space for it.\n\nThe patch below stores each record size when calculating the dx_map, and\nthen walks the hash-sorted dx_map, calculating how many entries must be\nmoved to more evenly split the existing entries between the old block and\nthe new block, guaranteeing enough space for the new entry.\n\nThe dx_map \"offs\" member is reduced to u16 so that the overall map size\ndoes not change - it is temporarily stored at the end of the new block, and\nif it grows too large it may be overwritten.  By making offs and size both\nu16, we won\u0027t grow the map size.\n\nAlso add a few comments to the functions involved.\n\nThis fixes the testcase reported by hooanon05@yahoo.co.jp on the\nlinux-ext4 list, \"ext3 dir_index causes an error\"\n\nThanks to Andreas Dilger for discussing the problem \u0026 solution with me.\n\nSigned-off-by: Eric Sandeen \u003csandeen@redhat.com\u003e\nSigned-off-by: Andreas Dilger \u003cadilger@clusterfs.com\u003e\nTested-by: Junjiro Okajima \u003chooanon05@yahoo.co.jp\u003e\nCc: Theodore Ts\u0027o \u003ctytso@mit.edu\u003e\nCc: \u003clinux-ext4@vger.kernel.org\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9d4a89820e1ef3c3b90ce3cabf193a0f55f56cd0",
      "old_mode": 33188,
      "old_path": "fs/ext3/namei.c",
      "new_id": "c1fa1908dba05137158d0e9f40b991a983a4c9d8",
      "new_mode": 33188,
      "new_path": "fs/ext3/namei.c"
    },
    {
      "type": "modify",
      "old_id": "9468289637a565881885b9d44c0e0405a79bf0ff",
      "old_mode": 33188,
      "old_path": "fs/ext4/namei.c",
      "new_id": "5fdb862e71c47fb8df885e87e93090141227154a",
      "new_mode": 33188,
      "new_path": "fs/ext4/namei.c"
    }
  ]
}
