)]}'
{
  "commit": "ef54efb5bcbb9e125ded561dc20710450bb301c7",
  "tree": "96fa4b7ae64901f3b4a3bf713e7bbd8324aa113f",
  "parents": [
    "15a8bccc9403c0ab1dbe869aa3afce7be9e1dd49"
  ],
  "author": {
    "name": "Omar Sandoval",
    "email": "osandov@fb.com",
    "time": "Fri Sep 15 08:32:48 2017 -0500"
  },
  "committer": {
    "name": "Eric Sandeen",
    "email": "sandeen@redhat.com",
    "time": "Fri Sep 15 08:32:48 2017 -0500"
  },
  "message": "xfs: fix inobt inode allocation search optimization\n\nSource kernel commit: c44245b3d5435f533ca8346ece65918f84c057f9\n\nWhen we try to allocate a free inode by searching the inobt, we try to\nfind the inode nearest the parent inode by searching chunks both left\nand right of the chunk containing the parent. As an optimization, we\ncache the leftmost and rightmost records that we previously searched; if\nwe do another allocation with the same parent inode, we\u0027ll pick up the\nsearch where it last left off.\n\nThere\u0027s a bug in the case where we found a free inode to the left of the\nparent\u0027s chunk: we need to update the cached left and right records, but\nbecause we already reassigned the right record to point to the left, we\nend up assigning the left record to both the cached left and right\nrecords.\n\nThis isn\u0027t a correctness problem strictly, but it can result in the next\nallocation rechecking chunks unnecessarily or allocating inodes further\naway from the parent than it needs to. Fix it by swapping the record\npointer after we update the cached left and right records.\n\nFixes: bd169565993b (\"xfs: speed up free inode search\")\nSigned-off-by: Omar Sandoval \u003cosandov@fb.com\u003e\nReviewed-by: Christoph Hellwig \u003chch@lst.de\u003e\nReviewed-by: Darrick J. Wong \u003cdarrick.wong@oracle.com\u003e\nSigned-off-by: Darrick J. Wong \u003cdarrick.wong@oracle.com\u003e\nSigned-off-by: Eric Sandeen \u003csandeen@sandeen.net\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b7f5a30f935ac2930fd48b7afe5e0401f431f1fb",
      "old_mode": 33188,
      "old_path": "libxfs/xfs_ialloc.c",
      "new_id": "13a4446bf6a0b99adeb66feae5089b7d9c3027ad",
      "new_mode": 33188,
      "new_path": "libxfs/xfs_ialloc.c"
    }
  ]
}
