)]}'
{
  "commit": "cee40cdca905a1284f3a9c50af25afd50c379371",
  "tree": "93a874ace542d110078f1207250cd5898e787bc7",
  "parents": [
    "ca0bd7c0a3ffbd35897b13148b92f16f607839e6"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Tue Oct 10 09:48:31 2017 +0100"
  },
  "committer": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Wed Oct 11 09:57:32 2017 +0100"
  },
  "message": "afs: Overhaul volume and server record caching and fileserver rotation\n\nThe current code assumes that volumes and servers are per-cell and are\nnever shared, but this is not enforced, and, indeed, public cells do exist\nthat are aliases of each other.  Further, an organisation can, say, set up\na public cell and a private cell with overlapping, but not identical, sets\nof servers.  The difference is purely in the database attached to the VL\nservers.\n\nThe current code will malfunction if it sees a server in two cells as it\nassumes global address -\u003e server record mappings and that each server is in\njust one cell.\n\nFurther, each server may have multiple addresses - and may have addresses\nof different families (IPv4 and IPv6, say).\n\nTo this end, the following structural changes are made:\n\n (1) Server record management is overhauled:\n\n     (a) Server records are made independent of cell.  The namespace keeps\n     \t track of them, volume records have lists of them and each vnode\n     \t has a server on which its callback interest currently resides.\n\n     (b) The cell record no longer keeps a list of servers known to be in\n     \t that cell.\n\n     (c) The server records are now kept in a flat list because there\u0027s no\n     \t single address to sort on.\n\n     (d) Server records are now keyed by their UUID within the namespace.\n\n     (e) The addresses for a server are obtained with the VL.GetAddrsU\n     \t rather than with VL.GetEntryByName, using the server\u0027s UUID as a\n     \t parameter.\n\n     (f) Cached server records are garbage collected after a period of\n     \t non-use and are counted out of existence before purging is allowed\n     \t to complete.  This protects the work functions against rmmod.\n\n     (g) The servers list is now in /proc/fs/afs/servers.\n\n (2) Volume record management is overhauled:\n\n     (a) An RCU-replaceable server list is introduced.  This tracks both\n     \t servers and their coresponding callback interests.\n\n     (b) The superblock is now keyed on cell record and numeric volume ID.\n\n     (c) The volume record is now tied to the superblock which mounts it,\n     \t and is activated when mounted and deactivated when unmounted.\n     \t This makes it easier to handle the cache cookie without causing a\n     \t double-use in fscache.\n\n     (d) The volume record is loaded from the VLDB using VL.GetEntryByNameU\n     \t to get the server UUID list.\n\n     (e) The volume name is updated if it is seen to have changed when the\n     \t volume is updated (the update is keyed on the volume ID).\n\n (3) The vlocation record is got rid of and VLDB records are no longer\n     cached.  Sufficient information is stored in the volume record, though\n     an update to a volume record is now no longer shared between related\n     volumes (volumes come in bundles of three: R/W, R/O and backup).\n\nand the following procedural changes are made:\n\n (1) The fileserver cursor introduced previously is now fleshed out and\n     used to iterate over fileservers and their addresses.\n\n (2) Volume status is checked during iteration, and the server list is\n     replaced if a change is detected.\n\n (3) Server status is checked during iteration, and the address list is\n     replaced if a change is detected.\n\n (4) The abort code is saved into the address list cursor and -ECONNABORTED\n     returned in afs_make_call() if a remote abort happened rather than\n     translating the abort into an error message.  This allows actions to\n     be taken depending on the abort code more easily.\n\n     (a) If a VMOVED abort is seen then this is handled by rechecking the\n     \t volume and restarting the iteration.\n\n     (b) If a VBUSY, VRESTARTING or VSALVAGING abort is seen then this is\n         handled by sleeping for a short period and retrying and/or trying\n         other servers that might serve that volume.  A message is also\n         displayed once until the condition has cleared.\n\n     (c) If a VOFFLINE abort is seen, then this is handled as VBUSY for the\n     \t moment.\n\n     (d) If a VNOVOL abort is seen, the volume is rechecked in the VLDB to\n     \t see if it has been deleted; if not, the fileserver is probably\n     \t indicating that the volume couldn\u0027t be attached and needs\n     \t salvaging.\n\n     (e) If statfs() sees one of these aborts, it does not sleep, but\n     \t rather returns an error, so as not to block the umount program.\n\n (5) The fileserver iteration functions in vnode.c are now merged into\n     their callers and more heavily macroised around the cursor.  vnode.c\n     is removed.\n\n (6) Operations on a particular vnode are serialised on that vnode because\n     the server will lock that vnode whilst it operates on it, so a second\n     op sent will just have to wait.\n\n (7) Fileservers are probed with FS.GetCapabilities before being used.\n     This is where service upgrade will be done.\n\n (8) A callback interest on a fileserver is set up before an FS operation\n     is performed and passed through to afs_make_call() so that it can be\n     set on the vnode if the operation returns a callback.  The callback\n     interest is passed through to afs_iget() also so that it can be set\n     there too.\n\nIn general, record updating is done on an as-needed basis when we try to\naccess servers, volumes or vnodes rather than offloading it to work items\nand special threads.\n\nNotes:\n\n (1) Pre AFS-3.4 servers are no longer supported, though this can be added\n     back if necessary (AFS-3.4 was released in 1998).\n\n (2) VBUSY is retried forever for the moment at intervals of 1s.\n\n (3) /proc/fs/afs/\u003ccell\u003e/servers no longer exists.\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "539b12b2450f2858c17fd68a8ec8bf47e476c1b3",
      "old_mode": 33188,
      "old_path": "fs/afs/Makefile",
      "new_id": "703d9fa1cd3ea075c34e3b15ea52882ea4db2d21",
      "new_mode": 33188,
      "new_path": "fs/afs/Makefile"
    },
    {
      "type": "modify",
      "old_id": "7a25445ac2f5ffeaa050c8b65fb4227d4fda3c0c",
      "old_mode": 33188,
      "old_path": "fs/afs/addr_list.c",
      "new_id": "aa76b9eec792f3b95df670c1105cfa705b89f7e6",
      "new_mode": 33188,
      "new_path": "fs/afs/addr_list.c"
    },
    {
      "type": "modify",
      "old_id": "05395d0f1941d1ebeedf74f0370dea1cc8500de2",
      "old_mode": 33188,
      "old_path": "fs/afs/afs_fs.h",
      "new_id": "d47b6d01e4c0222b9407f0928f6f197ae7e594f9",
      "new_mode": 33188,
      "new_path": "fs/afs/afs_fs.h"
    },
    {
      "type": "modify",
      "old_id": "4eaa620992c80a2238b8ddc4aaff3fc521796498",
      "old_mode": 33188,
      "old_path": "fs/afs/afs_vl.h",
      "new_id": "6350b417aee93ecbe0e849d9ed43c3d28ca32fa0",
      "new_mode": 33188,
      "new_path": "fs/afs/afs_vl.h"
    },
    {
      "type": "modify",
      "old_id": "aead4202131fa75553b8ee92f1dd643180a0f8dd",
      "old_mode": 33188,
      "old_path": "fs/afs/callback.c",
      "new_id": "ac3b39061c5dfd1ffe35ca9a151c91f569580e47",
      "new_mode": 33188,
      "new_path": "fs/afs/callback.c"
    },
    {
      "type": "modify",
      "old_id": "6854291ab12f4a35049f5ac305162f469bd41e3a",
      "old_mode": 33188,
      "old_path": "fs/afs/cell.c",
      "new_id": "d1f55fa361d1c61bdf9d2f08776c724fbabdee4c",
      "new_mode": 33188,
      "new_path": "fs/afs/cell.c"
    },
    {
      "type": "modify",
      "old_id": "37083699a0dfef55b1056ea03bb214a045b77489",
      "old_mode": 33188,
      "old_path": "fs/afs/dir.c",
      "new_id": "53f3917440e7c4d642a54eadd6534e6848ed95a8",
      "new_mode": 33188,
      "new_path": "fs/afs/dir.c"
    },
    {
      "type": "modify",
      "old_id": "08f9f0c5dfacf0d64138738259c87748f85e656c",
      "old_mode": 33188,
      "old_path": "fs/afs/file.c",
      "new_id": "1f26ac9f816d60609db0011471f7be825ce53e85",
      "new_mode": 33188,
      "new_path": "fs/afs/file.c"
    },
    {
      "type": "modify",
      "old_id": "2b31ea58c50ca2adc3b25972a8d6b1d5b0d6bce3",
      "old_mode": 33188,
      "old_path": "fs/afs/flock.c",
      "new_id": "77b0a4606efd88f4f41f90d3835b2620e1a082aa",
      "new_mode": 33188,
      "new_path": "fs/afs/flock.c"
    },
    {
      "type": "modify",
      "old_id": "6614d0a78daa2cc788ce7429ab0985f6b2abd3d6",
      "old_mode": 33188,
      "old_path": "fs/afs/fsclient.c",
      "new_id": "b7c2dda7dc52f59ee72fc1d05d96166b9bda59f0",
      "new_mode": 33188,
      "new_path": "fs/afs/fsclient.c"
    },
    {
      "type": "modify",
      "old_id": "ee86d5ad22d1dc4e532e7d5abf08ff3227d0ca36",
      "old_mode": 33188,
      "old_path": "fs/afs/inode.c",
      "new_id": "5a2f5854f349cb29447f65c03564f6bcd179db41",
      "new_mode": 33188,
      "new_path": "fs/afs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "a0f24a1a3f5fcb844cf8c3e3c0e6b976d4343b98",
      "old_mode": 33188,
      "old_path": "fs/afs/internal.h",
      "new_id": "a49d31ce82f39d36f4e4d53e14455c6d487eb107",
      "new_mode": 33188,
      "new_path": "fs/afs/internal.h"
    },
    {
      "type": "modify",
      "old_id": "0ad22c8a74f62d7ebea35f004557b1b7e61b2b16",
      "old_mode": 33188,
      "old_path": "fs/afs/main.c",
      "new_id": "84a7f4b7ae37f461fad8196198b4a554beffeb11",
      "new_mode": 33188,
      "new_path": "fs/afs/main.c"
    },
    {
      "type": "modify",
      "old_id": "9cf9ce88a8dd349ea70e2155e2b3a4ba31e78233",
      "old_mode": 33188,
      "old_path": "fs/afs/proc.c",
      "new_id": "4508dd54f78968dab3d9e85cc0a7deb6a1b31a7d",
      "new_mode": 33188,
      "new_path": "fs/afs/proc.c"
    },
    {
      "type": "modify",
      "old_id": "c7975b3ba59afd2f0a87ccb0314c446f303b9912",
      "old_mode": 33188,
      "old_path": "fs/afs/rotate.c",
      "new_id": "e728ca1776c9b36640dd8ad69178e5c0d07a0a29",
      "new_mode": 33188,
      "new_path": "fs/afs/rotate.c"
    },
    {
      "type": "modify",
      "old_id": "1b348c8848f7d1ab7f72928c7547d75a3f4adce8",
      "old_mode": 33188,
      "old_path": "fs/afs/rxrpc.c",
      "new_id": "77c33e9131e59cce5e50b02f15aacd4fe7e98069",
      "new_mode": 33188,
      "new_path": "fs/afs/rxrpc.c"
    },
    {
      "type": "modify",
      "old_id": "1b5198fc165794d3e35d7519ed39a1ae797d7ce1",
      "old_mode": 33188,
      "old_path": "fs/afs/security.c",
      "new_id": "46a881a4d08f6a48a2cb463ea332a14709dbeb47",
      "new_mode": 33188,
      "new_path": "fs/afs/security.c"
    },
    {
      "type": "modify",
      "old_id": "172e125e8c247cc4d73916211b66b12d189382dc",
      "old_mode": 33188,
      "old_path": "fs/afs/server.c",
      "new_id": "3226becf8a0bf094790da9ab2295c0d599dafba7",
      "new_mode": 33188,
      "new_path": "fs/afs/server.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ce9d3b62ce7fbd72af94cdb2667317c56fb512a8",
      "new_mode": 33188,
      "new_path": "fs/afs/server_list.c"
    },
    {
      "type": "modify",
      "old_id": "3d53b78b350d1fb91cc6cbac33a5e54757fbfb95",
      "old_mode": 33188,
      "old_path": "fs/afs/super.c",
      "new_id": "b72e3c7a336c4719ead4d474bc87899358ce979e",
      "new_mode": 33188,
      "new_path": "fs/afs/super.c"
    },
    {
      "type": "modify",
      "old_id": "1d1e7df77dd5c0081713a1bec59c4c277e16e2cd",
      "old_mode": 33188,
      "old_path": "fs/afs/vlclient.c",
      "new_id": "578778078d41263a039c35b98e2c6bc8ed55eed2",
      "new_mode": 33188,
      "new_path": "fs/afs/vlclient.c"
    },
    {
      "type": "delete",
      "old_id": "52c31ad0ef6076c4f2981ffeff080569dcb631e3",
      "old_mode": 33188,
      "old_path": "fs/afs/vlocation.c",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "9c7333eb01c2b8b804fcd28b821cf096d9cb7d0a",
      "old_mode": 33188,
      "old_path": "fs/afs/vnode.c",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "3c5ad1cc50f36cd1af2f33921a9c4ee1e38fe930",
      "old_mode": 33188,
      "old_path": "fs/afs/volume.c",
      "new_id": "018bd04ae0e19ad02f3d8b14dc2a92686bd36f72",
      "new_mode": 33188,
      "new_path": "fs/afs/volume.c"
    },
    {
      "type": "modify",
      "old_id": "106e43db11153fc1faed12ab326e25d4a9dc3c7d",
      "old_mode": 33188,
      "old_path": "fs/afs/write.c",
      "new_id": "1377a40ecdbb44e7d9aaef716717ed952a9a1310",
      "new_mode": 33188,
      "new_path": "fs/afs/write.c"
    },
    {
      "type": "modify",
      "old_id": "e58e00ee974708612252d350d815257cb79a5adb",
      "old_mode": 33188,
      "old_path": "fs/afs/xattr.c",
      "new_id": "cfcc674e64a55bc52be024d873a5b70fa85fafc1",
      "new_mode": 33188,
      "new_path": "fs/afs/xattr.c"
    }
  ]
}
