1. 13 6月, 2020 3 次提交
  2. 12 6月, 2020 6 次提交
  3. 11 6月, 2020 1 次提交
  4. 09 6月, 2020 1 次提交
  5. 07 6月, 2020 1 次提交
  6. 05 6月, 2020 14 次提交
  7. 04 6月, 2020 14 次提交
    • D
      afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly · 8409f67b
      David Howells 提交于
      Adjust the fileserver rotation algorithm so that if we've tried all the
      addresses on a server (cumulatively over multiple operations) until we've
      run out of untried addresses, immediately reprobe all that server's
      interfaces and retry the op at least once before we move onto the next
      server.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      8409f67b
    • D
      afs: Show more a bit more server state in /proc/net/afs/servers · 32275d3f
      David Howells 提交于
      Display more information about the state of a server record, including the
      flags, rtt and break counter plus the probe state for each server in
      /proc/net/afs/servers.
      
      Rearrange the server flags a bit to make them easier to read at a glance in
      the proc file.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      32275d3f
    • D
      afs: Don't use probe running state to make decisions outside probe code · f3c130e6
      David Howells 提交于
      Don't use the running state for fileserver probes to make decisions about
      which server to use as the state is cleared at the start of a probe and
      also intermediate values might be misleading.
      
      Instead, add a separate 'latest known' rtt in the afs_server struct and a
      flag to indicate if the server is known to be responding and update these
      as and when we know what to change them to.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f3c130e6
    • D
      afs: Fix afs_statfs() to not let the values go below zero · f11a016a
      David Howells 提交于
      Fix afs_statfs() so that the value for f_bavail and f_bfree don't go
      "negative" if the number of blocks in use by a volume exceeds the max quota
      for that volume.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f11a016a
    • D
      afs: Fix the by-UUID server tree to allow servers with the same UUID · 3c4c4075
      David Howells 提交于
      Whilst it shouldn't happen, it is possible for multiple fileservers to
      share a UUID, particularly if an entire cell has been duplicated, UUIDs and
      all.  In such a case, it's not necessarily possible to map the effect of
      the CB.InitCallBackState3 incoming RPC to a specific server unambiguously
      by UUID and thus to a specific cell.
      
      Indeed, there's a problem whereby multiple server records may need to
      occupy the same spot in the rb_tree rooted in the afs_net struct.
      
      Fix this by allowing servers to form a list, with the head of the list in
      the tree.  When the front entry in the list is removed, the second in the
      list just replaces it.  afs_init_callback_state() then just goes down the
      line, poking each server in the list.
      
      This means that some servers will be unnecessarily poked, unfortunately.
      An alternative would be to route by call parameters.
      Reported-by: NJeffrey Altman <jaltman@auristor.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Fixes: d2ddc776 ("afs: Overhaul volume and server record caching and fileserver rotation")
      3c4c4075
    • D
      afs: Reorganise volume and server trees to be rooted on the cell · 20325960
      David Howells 提交于
      Reorganise afs_volume objects such that they're in a tree keyed on volume
      ID, rooted at on an afs_cell object rather than being in multiple trees,
      each of which is rooted on an afs_server object.
      
      afs_server structs become per-cell and acquire a pointer to the cell.
      
      The process of breaking a callback then starts with finding the server by
      its network address, following that to the cell and then looking up each
      volume ID in the volume tree.
      
      This is simpler than the afs_vol_interest/afs_cb_interest N:M mapping web
      and allows those structs and the code for maintaining them to be simplified
      or removed.
      
      It does make a couple of things a bit more tricky, though:
      
       (1) Operations now start with a volume, not a server, so there can be more
           than one answer as to whether or not the server we'll end up using
           supports the FS.InlineBulkStatus RPC.
      
       (2) CB RPC operations that specify the server UUID.  There's still a tree
           of servers by UUID on the afs_net struct, but the UUIDs in it aren't
           guaranteed unique.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      20325960
    • D
      afs: Add a tracepoint to track the lifetime of the afs_volume struct · cca37d45
      David Howells 提交于
      Add a tracepoint to track the lifetime of the afs_volume struct.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cca37d45
    • D
      afs: Detect cell aliases 3 - YFS Cells with a canonical cell name op · 6dfdf536
      David Howells 提交于
      YFS Volume Location servers have an operation by which the cell name may be
      queried.  Use this to find out what a YFS server thinks the canonical cell
      name should be.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      6dfdf536
    • D
      afs: Detect cell aliases 2 - Cells with no root volumes · 6ef350b1
      David Howells 提交于
      Implement the second phase of cell alias detection.  This part handles
      alias detection for cells that don't have root.cell volumes and so we have
      to find some other volume or fileserver to query.
      
      We take the first volume from each such cell and attempt to look it up in
      the new cell.  If found, we compare the records, if they are the same, we
      judge the cell names to be aliases.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      6ef350b1
    • D
      afs: Detect cell aliases 1 - Cells with root volumes · 8a070a96
      David Howells 提交于
      Put in the first phase of cell alias detection.  This part handles alias
      detection for cells that have root.cell volumes (which is expected to be
      likely).
      
      When a cell becomes newly active, it is probed for its root.cell volume,
      and if it has one, this volume is compared against other root.cell volumes
      to find out if the list of fileserver UUIDs have any in common - and if
      that's the case, do the address lists of those fileservers have any
      addresses in common.  If they do, the new cell is adjudged to be an alias
      of the old cell and the old cell is used instead.
      
      Comparing is aided by the server list in struct afs_server_list being
      sorted in UUID order and the addresses in the fileserver address lists
      being sorted in address order.
      
      The cell then retains the afs_volume object for the root.cell volume, even
      if it's not mounted for future alias checking.
      
      This necessary because:
      
       (1) Whilst fileservers have UUIDs that are meant to be globally unique, in
           practice they are not because cells get cloned without changing the
           UUIDs - so afs_server records need to be per cell.
      
       (2) Sometimes the DNS is used to make cell aliases - but if we don't know
           they're the same, we may end up with multiple superblocks and multiple
           afs_server records for the same thing, impairing our ability to
           deliver callback notifications of third party changes
      
       (3) The fileserver RPC API doesn't contain the cell name, so it can't tell
           us which cell it's notifying and can't see that a change made to to
           one cell should notify the same client that's also accessed as the
           other cell.
      Reported-by: NJeffrey Altman <jaltman@auristor.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      8a070a96
    • D
      afs: Implement client support for the YFSVL.GetCellName RPC op · c3e9f888
      David Howells 提交于
      Implement client support for the YFSVL.GetCellName RPC operation by which
      YFS permits the canonical cell name to be queried from a VL server.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      c3e9f888
    • D
      afs: Retain more of the VLDB record for alias detection · 194d28cf
      David Howells 提交于
      Save more bits from the volume location database record obtained for a
      server so that we can use this information in cell alias detection.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      194d28cf
    • D
      afs: Fix handling of CB.ProbeUuid cache manager op · 3120c170
      David Howells 提交于
      The AFS filesystem driver is handling the CB.ProbeUuid request incorrectly.
      The UUID presented in the request is that of the cache manager, not the
      fileserver, so afs_deliver_cb_probe_uuid() shouldn't be using that UUID to
      look up the server.
      
      Fix this by looking up the server by address instead.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      3120c170
    • D
      afs: Don't get epoch from a server because it may be ambiguous · 44746355
      David Howells 提交于
      Don't get the epoch from a server, particularly one that we're looking up
      by UUID, as UUIDs may be ambiguous and may map to more than one server - so
      we can't draw any conclusions from it.
      Reported-by: NJeffrey Altman <jaltman@auristor.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      44746355