)]}'
{
  "commit": "47ea0f2ebffd400d36ab5946ec8d6d6e08a67d53",
  "tree": "c3100b32ecadbc87bcefad4e00079ac52f5c69b4",
  "parents": [
    "0da0b7fd73e4f20e1a987dfade0b36bb4813cf10"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Fri Jun 15 15:24:50 2018 +0100"
  },
  "committer": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Fri Jun 15 15:27:09 2018 +0100"
  },
  "message": "afs: Optimise callback breaking by not repeating volume lookup\n\nAt the moment, afs_break_callbacks calls afs_break_one_callback() for each\nseparate FID it was given, and the latter looks up the volume individually\nfor each one.\n\nHowever, this is inefficient if two or more FIDs have the same vid as we\ncould reuse the volume.  This is complicated by cell aliasing whereby we\nmay have multiple cells sharing a volume and can therefore have multiple\ncallback interests for any particular volume ID.\n\nAt the moment afs_break_one_callback() scans the entire list of volumes\nwe\u0027re getting from a server and breaks the appropriate callback in every\nmatching volume, regardless of cell.  This scan is done for every FID.\n\nOptimise callback breaking by the following means:\n\n (1) Sort the FID list by vid so that all FIDs belonging to the same volume\n     are clumped together.\n\n     This is done through the use of an indirection table as we cannot do\n     an insertion sort on the afs_callback_break array as we decode FIDs\n     into it as we subsequently also have to decode callback info into it\n     that corresponds by array index only.\n\n     We also don\u0027t really want to bubblesort afterwards if we can avoid it.\n\n (2) Sort the server-\u003ecb_interests array by vid so that all the matching\n     volumes are grouped together.  This permits the scan to stop after\n     finding a record that has a higher vid.\n\n (3) When breaking FIDs, we try to keep server-\u003ecb_break_lock as long as\n     possible, caching the start point in the array for that volume group\n     as long as possible.\n\n     It might make sense to add another layer in that list and have a\n     refcounted volume ID anchor that has the matching interests attached\n     to it rather than being in the list.  This would allow the lock to be\n     dropped without losing the cursor.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "571437dcb252842578b92a6f3b5b60a574703b94",
      "old_mode": 33188,
      "old_path": "fs/afs/callback.c",
      "new_id": "5f261fbf2182b22a47fc93b7c6fee35f113e0097",
      "new_mode": 33188,
      "new_path": "fs/afs/callback.c"
    },
    {
      "type": "modify",
      "old_id": "5d8260b4c2b382d7fa18e579776dae07872ecd4a",
      "old_mode": 33188,
      "old_path": "fs/afs/internal.h",
      "new_id": "9778df1357179d14238cfa52e7394886206a1f1d",
      "new_mode": 33188,
      "new_path": "fs/afs/internal.h"
    },
    {
      "type": "modify",
      "old_id": "3af4625e2f8cc7049185048a602826c53a169c03",
      "old_mode": 33188,
      "old_path": "fs/afs/server.c",
      "new_id": "1d329e6981d515c06bb5b711a1e3880226c2cce8",
      "new_mode": 33188,
      "new_path": "fs/afs/server.c"
    }
  ]
}
