1. 10 4月, 2018 1 次提交
  2. 13 11月, 2017 4 次提交
    • D
      afs: Overhaul permit caching · be080a6f
      David Howells 提交于
      Overhaul permit caching in AFS by making it per-vnode and sharing permit
      lists where possible.
      
      When most of the fileserver operations are called, they return a status
      structure indicating the (revised) details of the vnode or vnodes involved
      in the operation.  This includes the access mark derived from the ACL
      (named CallerAccess in the protocol definition file).  This is cacheable
      and if the ACL changes, the server will tell us that it is breaking the
      callback promise, at which point we can discard the currently cached
      permits.
      
      With this patch, the afs_permits structure has, at the end, an array of
      { key, CallerAccess } elements, sorted by key pointer.  This is then cached
      in a hash table so that it can be shared between vnodes with the same
      access permits.
      
      Permit lists can only be shared if they contain the exact same set of
      key->CallerAccess mappings.
      
      Note that that table is global rather than being per-net_ns.  If the keys
      in a permit list cross net_ns boundaries, there is no problem sharing the
      cached permits, since the permits are just integer masks.
      
      Since permit lists pin keys, the permit cache also makes it easier for a
      future patch to find all occurrences of a key and remove them by means of
      setting the afs_permits::invalidated flag and then clearing the appropriate
      key pointer.  In such an event, memory barriers will need adding.
      
      Lastly, the permit caching is skipped if the server has sent either a
      vnode-specific or an entire-server callback since the start of the
      operation.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      be080a6f
    • D
      afs: Fix the afs_uuid struct to make the char-sized fields signed · 03dc2cfc
      David Howells 提交于
      In AFS's encoding of a UUID, the eight 'char' fields are all signed, so
      represent them with __s8 rather than __u8.  This makes the compiler
      sign-extend them correctly when XDR-encoding them.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      03dc2cfc
    • D
      afs: Add some protocol defs · 91a90380
      David Howells 提交于
      Add some protocol definitions, including max field lengths, flag defs, an
      XDR-encoded UUID def, more VL operation IDs and more fileserver abort
      codes.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      91a90380
    • D
      afs: Lay the groundwork for supporting network namespaces · f044c884
      David Howells 提交于
      Lay the groundwork for supporting network namespaces (netns) to the AFS
      filesystem by moving various global features to a network-namespace struct
      (afs_net) and providing an instance of this as a temporary global variable
      that everything uses via accessor functions for the moment.
      
      The following changes have been made:
      
       (1) Store the netns in the superblock info.  This will be obtained from
           the mounter's nsproxy on a manual mount and inherited from the parent
           superblock on an automount.
      
       (2) The cell list is made per-netns.  It can be viewed through
           /proc/net/afs/cells and also be modified by writing commands to that
           file.
      
       (3) The local workstation cell is set per-ns in /proc/net/afs/rootcell.
           This is unset by default.
      
       (4) The 'rootcell' module parameter, which sets a cell and VL server list
           modifies the init net namespace, thereby allowing an AFS root fs to be
           theoretically used.
      
       (5) The volume location lists and the file lock manager are made
           per-netns.
      
       (6) The AF_RXRPC socket and associated I/O bits are made per-ns.
      
      The various workqueues remain global for the moment.
      
      Changes still to be made:
      
       (1) /proc/fs/afs/ should be moved to /proc/net/afs/ and a symlink emplaced
           from the old name.
      
       (2) A per-netns subsys needs to be registered for AFS into which it can
           store its per-netns data.
      
       (3) Rather than the AF_RXRPC socket being opened on module init, it needs
           to be opened on the creation of a superblock in that netns.
      
       (4) The socket needs to be closed when the last superblock using it is
           destroyed and all outstanding client calls on it have been completed.
           This prevents a reference loop on the namespace.
      
       (5) It is possible that several namespaces will want to use AFS, in which
           case each one will need its own UDP port.  These can either be set
           through /proc/net/afs/cm_port or the kernel can pick one at random.
           The init_ns gets 7001 by default.
      
      Other issues that need resolving:
      
       (1) The DNS keyring needs net-namespacing.
      
       (2) Where do upcalls go (eg. DNS request-key upcall)?
      
       (3) Need something like open_socket_in_file_ns() syscall so that AFS
           command line tools attempting to operate on an AFS file/volume have
           their RPC calls go to the right place.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      f044c884
  3. 13 2月, 2013 1 次提交
    • E
      afs: Support interacting with multiple user namespaces · a0a5386a
      Eric W. Biederman 提交于
      Modify struct afs_file_status to store owner as a kuid_t and group as
      a kgid_t.
      
      In xdr_decode_AFSFetchStatus as owner is now a kuid_t and group is now
      a kgid_t don't use the EXTRACT macro.  Instead perform the work of
      the extract macro explicitly.  Read the value with ntohl and
      convert it to the appropriate type with make_kuid or make_kgid.
      Test if the value is different from what is stored in status and
      update changed.   Update the value in status.
      
      In xdr_encode_AFS_StoreStatus call from_kuid or from_kgid as
      we are computing the on the wire encoding.
      
      Initialize uids with GLOBAL_ROOT_UID instead of 0.
      Initialize gids with GLOBAL_ROOT_GID instead of 0.
      
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      a0a5386a
  4. 12 2月, 2013 1 次提交
    • E
      afs: Remove unused structure afs_store_status · 66fdb93f
      Eric W. Biederman 提交于
      While looking for kuid_t and kgid_t conversions I found this
      structure that has never been used since it was added to the
      kernel in 2007.  The obvious for this structure to be used
      is in xdr_encode_AFS_StoreStatus and that function uses a
      small handful of local variables instead.
      
      So remove the unnecessary structure to prevent confusion.
      
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      66fdb93f
  5. 17 7月, 2007 1 次提交
  6. 11 5月, 2007 1 次提交
  7. 27 4月, 2007 4 次提交
  8. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4