An error occurred fetching the project authors.
  1. 03 Apr, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] remove dparent_lock · 723c6e83
      Andrew Morton authored
      The big SMP machines are seeing quite some contention in dnotify_parent()
      (via vfs_write).  This function is hammering the global dparent_lock.
      
      However we don't actually need a global dparent_lock for pinning down
      dentry->d_parent.  We can use dentry->d_lock for this.  That is already being
      held across d_move.
      
      This patch speeds up SDET on the 16-way by 5% and wipes dnotify_parent() off
      the profiles.
      
      It also uninlines dnofity_parent().
      
      It also uses spin_lock(), which is faster than read_lock().
      
      I'm not sure that we need to take both the source and target dentry's d_lock
      in d_move.
      
      The patch also does lots of s/__inline__/inline/ in dcache.h
      723c6e83
    • Andrew Morton's avatar
      [PATCH] exp_parent locking fixes · ec1d26ec
      Andrew Morton authored
      From: Neil Brown and myself.
      
      Don't do dput() inside read_lock().  It can sleep.
      ec1d26ec
  2. 01 Apr, 2003 1 commit
  3. 27 Mar, 2003 1 commit
    • Neil Brown's avatar
      [PATCH] kNFSd: Be more careful with readlock in exp_parent · c2dfcb95
      Neil Brown authored
      We currently hold a read_lock of dparent_lock
      while calling exp_get_by_name on several ancestors
      of a given dentry.  However exp_get_by_name can
      malloc(GFP_KERNEL), so that isn't a good idea.
      
      Now we only claim the lock while actually
      stepping up the parent chain.
      
      This addresses bug 29 @ bugme.osdl.org
      c2dfcb95
  4. 14 Mar, 2003 3 commits
  5. 25 Feb, 2003 1 commit
  6. 17 Feb, 2003 1 commit
  7. 12 Feb, 2003 1 commit
  8. 05 Jan, 2003 1 commit
  9. 25 Nov, 2002 1 commit
  10. 17 Nov, 2002 1 commit
    • Andi Kleen's avatar
      [PATCH] nanosecond stat timefields · 5d62665d
      Andi Kleen authored
      stat64 has been changed to return jiffies granuality as nsec in previously
      unused fields. This allows make to make better decisions on when
      to recompile a file. Follows losely the Solaris API.
      
      CURRENT_TIME has been redefined to return struct timespec.  The users
      who don't use it in a inode/attr context have been changed to use a new
      get_seconds() function.  CURRENT_TIME is implemented by an out-of-line
      function.
      
      There is a small performance penalty in this patch.  The previous
      filemap code had an optimization to flush atime only once a second.
      This is currently gone, which will increase flushes a bit.  I believe
      the correct solution if it should be a problem is to have per super
      block fields that give an arbitary atime flush granuality - so that you
      can set it to be only flushed once a hour if you prefer that.  I will
      work on that later in separate patches if the need should arise.
      
      struct inode and the attr struct has been changed to store struct
      timespec instead of time_t for [cma]time.  Not all file systems support
      this granuality, but some like XFS,NFSv3,CIFS,JFS do.  The others will
      currently truncate the nsec part on flushing to disk.  There was some
      discussion on this rounding on l-k previously.  I went for simple
      truncation because there is not much evidence IMHO that the more
      complicated roundings have any advantages.  In practice application will
      be rather unlikely to notice the rounding anyways - they can only see a
      difference when an inode is flush from memory and reloaded in less than
      a second, which is rather unlikely.
      5d62665d
  11. 16 Nov, 2002 1 commit
  12. 30 Oct, 2002 1 commit
  13. 16 Oct, 2002 3 commits
  14. 12 Oct, 2002 1 commit
    • Richard Henderson's avatar
      Fix warnings of the form · 2a022093
      Richard Henderson authored
        warning: long int format, different type arg (arg 5)
      by casting ino_t arguments to unsigned long for printf formats.
      In some instances, change %ld to %lu.
      2a022093
  15. 11 Oct, 2002 7 commits
    • Neil Brown's avatar
      [PATCH] kNFSd: upcall/update for export tables · 5f8c40c2
      Neil Brown authored
      Add _request and _parse methods for nfsd.fh and
      nfsd.exports tables.
      
      nfsd.fh maps a filehandle-fragment to a path for a client,
      and nfsd.exports maps a path to export options for a client.
      5f8c40c2
    • Neil Brown's avatar
      [PATCH] kNFSd: Provide support for request deferral and revisit. · ea221223
      Neil Brown authored
      cache.c gets code to allow a 'request' to be referred pending
      an update of a cache item, and revisited when the item is
      updates.
      
      svcsock.c gets code to store the relevant part of a request on deferral, and
      to re-queue it when the cache item that caused the deferral is
      filled in.
      ea221223
    • Neil Brown's avatar
      [PATCH] kNFSd: Convert export-table to use new cache code · 85d18365
      Neil Brown authored
      This introduces two caches, svc_export_cache (nfsd.exports) and
      svc_expkey_cache (nfsd.fh).
      nfsd.exports maps client+directory  ->  export options.
      nfsd.fh maps client + filehandle-fragment -> directory.
      
      A major part of this change is that export entries are now reference counted,
      so we have to be careful  to keep those counts correct.
      85d18365
    • Neil Brown's avatar
    • Neil Brown's avatar
    • Neil Brown's avatar
      [PATCH] kNFSd: Use new cache infrastructure for auth_unix specific lookups. · 624361e4
      Neil Brown authored
      This patch introduces two caches using the new infrastucture, and the
      concept of a 'domain'.
      
      A 'domain' refers to a collection of clients that all have the same
      view of the nfs server, and all have the same access rights (modulo
      different users on the clients).  For AUTH_UNIX (and AUTH_NULL), the
      domain is determined from the IP address.  For other authentication
      styles, the domain might be determined directly from the credentials.
      
      Each auth flavour knows how to allocate and free it's domain-specific
      infomation.
      
      auth_domain_cache maps a name to a domain which is owned by
      an auth flavour.
      
      ip_map_cache is a cache specific to AUTH_UNIX which maps
      IP address to domain.
      
      With this patch, svcauth_unix.c is created to store all
      auth_unix related code.
      
      The IP address lookup code is removed from nfsd/exports.c
      
      sunrpc module initilisation is moved out of stats.c into sunrpc_syms
      which seemed to be the most central .c file.  It now registers these
      two caches.
      
      Now that the caches are being used, nfsd needs to call cache_clean
      periodically.
      624361e4
    • Neil Brown's avatar
      [PATCH] kNFSd: New routine exp_pseudoroot() to find 'root' filehandle for nfsv4 · bbe0c3d9
      Neil Brown authored
      NFSv4 has a concept of a 'root' filehandle (from which all other can
      be found via LOOKUP, so no need for mountd).
      
      This patch defines exp_pseudoroot(), which is used to set the filehandle
      for the root of the pseudofs. The root is defined to be the export
      point with fsid == 0.
      bbe0c3d9
  16. 12 Sep, 2002 14 commits
    • Neil Brown's avatar
      [PATCH] kNFSd 16: Remove per-client list of exports. · 0713b154
      Neil Brown authored
      This is used:
        to iterate all exports when making /proc/fs/nfs/exports
        to find all exports of a client to unexport them.
      
      The first can just as easily be done by iterating the export_table
      hash table.
      
      The second is very rarely called and can be done by iterating the
      hash table looking for exports for the given client.
      0713b154
    • Neil Brown's avatar
      [PATCH] kNFSd 15: Unite per-client export key hash tables. · 79313e40
      Neil Brown authored
      Instead of a separate hash table per client we now
      have one hash table which includes the client in the key.
      79313e40
    • Neil Brown's avatar
      [PATCH] kNFSd 14: Filehandle lookup makes use of new export table structure. · 981d3487
      Neil Brown authored
      Filehandle lookup currently breaks out the interesting pieces of
      a filehandle and passes them to exp_get or exp_get_fsid, which put the
      pieces back into a filehandle fragment.
      
      We define a new interface "exp_find" which does a lookup based on
      a filehandle fragment to avoid this double handling.
      
      In the process, common code in exp_get_key and exp_get_fsid_key is united
      into exp_find_key.
      
      Also, filehandle composition now uses the mk_fsid_v? inline functions.
      981d3487
    • Neil Brown's avatar
      [PATCH] kNFSd 13: Separate out the multiple keys in the export hash table. · 6d0f7b03
      Neil Brown authored
      Currently each entry in the export table had two hash chains
      going through it, one for hash-by-dev/ino,  One for hash-by-fsid.
      This is contrary to the goal of a simple hash table structure.
      
      The two hash-tables per client are replace by one which stores 'exp_key's
      which contain the key (as a file handle fragment) and a pointer to the
      real export entry.
      
      The export entries are then all stored in a single hash table indexed
      by client+vfsmount+dentry;
      6d0f7b03
    • Neil Brown's avatar
      [PATCH] kNFSd 12: Change exp_parent to talk directory tree, not hash table. · 37dbeea3
      Neil Brown authored
      Currently get_parent (needed to find the exportpoint
      above a given dentry) walks the hash table of export points
      checking each with is_subdir.  Now it walks up the d_parent
      link checking each for membership in the hashtable.
      
      nfsd_lookup currently does that walk too (when crossing
      a mountpoint backwards) so the code gets unified.
      
      This approach makes more sense as we move towards a cache
      for export information that can be filled on demand.
      It also assumes less about the hash table (which will change).
      37dbeea3
    • Neil Brown's avatar
      [PATCH] kNFSd 11: Remove problematic "security" checks when NFS exporting. · 04146816
      Neil Brown authored
      The nfs server currently doesn't allow you to export both a
      directory and an ancestor of that directory on the same filesystem.
      
      This check is more of a problem than a solution and can be
      done in user-space if needed, so it is removed.
      
      The potential for a security problem is because the files
      below the lower directory could be accessed as though it were under
      either of the export points, and so the access control that is
      applied might not be what is expected (by the nieve admin).
      
      e.g.  export /a as readwrite and /a/b as readonly.  Then a/b/c
      can be accessed readwrite as it is in /a which might not be the
      intend.  Altering the user to this can be done in userspace though.
      
      The current restriction also stops exporting / as readonly and
      /tmp as read-write which some people want to do.  Providing
      /tmp is also exported subtree_check (the default) there is no
      security issue here.
      04146816
    • Neil Brown's avatar
      [PATCH] kNFSd 10: Discard ex_dev and ex_ino from svc_export · 9bb4ebc6
      Neil Brown authored
      They can be deduced from ex_dentry
      9bb4ebc6
    • Neil Brown's avatar
      [PATCH] kNFSd 9: Discard cl_addr · d42f5634
      Neil Brown authored
      We currently store the address list with each
      client and use it only to print out comments
      on /proc/fs/nfs/exports
      While these can be helpful, they are not critical and
      could be added back later after we restructure the exports
      table.
      d42f5634
    • Neil Brown's avatar
      [PATCH] kNFSd 8: Don't store path in exports table. · 5488bb08
      Neil Brown authored
      Instead, use d_path to find path from dentry/vfsmnt.
      This requires allocating a buffer at exp_open time,
      and releasing it when closing.
      5488bb08
    • Neil Brown's avatar
      [PATCH] kNFSd 7: Discard cl_idlen · 9c75479d
      Neil Brown authored
      It is never used
      9c75479d
    • Neil Brown's avatar
      [PATCH] kNFSd 6: Expose anon uid and gid in /proc/fs/nfs/exports · 979836d4
      Neil Brown authored
      Don't print if default, which should be "-2", but is currently 65534..
      We really need a 32bit uid interface for 2.6.
      979836d4
    • Neil Brown's avatar
      [PATCH] kNFSd 5: Get rid of ex_parent from svc_export · 3eea06ce
      Neil Brown authored
      I was never entirely sure what it was for, but it
      is not used now, only set, so it can go.
      3eea06ce
    • Neil Brown's avatar
      [PATCH] kNFSd 4: Discard svc_uidmap structure · 8a5d34f3
      Neil Brown authored
      It is un-used and never will be.  uid mapping will be done a
      different way (if at all).
      8a5d34f3
    • Neil Brown's avatar
      [PATCH] kNFSd 3: Increase separation between lockd and nfsd. · 151ddf2e
      Neil Brown authored
      lockd currently asks nfsd for a 'client handle' for each
      request.
      
      This is used as a key for finding (or creating) a 'nlm_host'
      structure, so that there is only one of these per client...almost.
      There can currently be up to 4 nlm_hosts for a given client,
      depending on protocol (udp/tcp) or version (v1 or v4).
      
      But this isn't handled very well.
      
      So the question is: is there any advantage in having only on
      nlm_host per real host, or have we simply have one for each IP
      address that makes requests, whether they are separate hosts or not.
      
      The nlm_host structure is used:
       1/ to hold a lockd rpc client for talking to the
          remote lockd.  Having multiple lockd clients cannot hurt
          except possibly to waste a little space.
       2/ to identify resources to free when we receive notification
          from statd that a client has restarted.
          As statd gets a hostname and looks up all IP addresses,
          and then sends a notification for each IP for which it has
          a registration, there is no need to minimise the number
          of nlm_host structures (each of which register for monitoring).
       3/ to identify resources to free when a client sends a
          "free_all" request.  If a client uses multiple IP addresses to
          create locks, and then sends free_all from just one IP address
          we will loose here.
          However it is not clear that a client would ever want to send
          a free_all request, and the linux client doesn't seem to, so
          there is unlikely to be any loss here.
      
      This patch does not ask nfsd for a client identifier, but rather
      finds an nlm_host based on IP, version, protocol (udp/tcp) and
      whether we are acting as NFS server or client.
      
      All of this information is then placed in the cookie that is
      passed to statd and returned by statd when the client restarts.
      Previously only the IP address was passing the cookie, so possibly
      not all nlm_host structures would have been found.
      
      Because of these changes, lockd does not need to know
      anything about the nfsd export table, so the interface to
      nfsd is much more narrow.
      
      Another consequence is that when nfsd is told to delete a client,
      it cannot tell lockd to forget all the locks for that client.
      However it is not clear that lockd should ever forget any locks
      unless it is told to shutdown (or simulate a shutdown), and in
      anycase, the current nfsd admin tools never tell nfsd to delete
      a client anyway.
      151ddf2e