1. 21 5月, 2013 1 次提交
    • A
      NFSv4.1 Fix a pNFS session draining deadlock · 774d5f14
      Andy Adamson 提交于
      On a CB_RECALL the callback service thread flushes the inode using
      filemap_flush prior to scheduling the state manager thread to return the
      delegation. When pNFS is used and I/O has not yet gone to the data server
      servicing the inode, a LAYOUTGET can preceed the I/O. Unlike the async
      filemap_flush call, the LAYOUTGET must proceed to completion.
      
      If the state manager starts to recover data while the inode flush is sending
      the LAYOUTGET, a deadlock occurs as the callback service thread holds the
      single callback session slot until the flushing is done which blocks the state
      manager thread, and the state manager thread has set the session draining bit
      which puts the inode flush LAYOUTGET RPC to sleep on the forechannel slot
      table waitq.
      
      Separate the draining of the back channel from the draining of the fore channel
      by moving the NFS4_SESSION_DRAINING bit from session scope into the fore
      and back slot tables.  Drain the back channel first allowing the LAYOUTGET
      call to proceed (and fail) so the callback service thread frees the callback
      slot. Then proceed with draining the forechannel.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      774d5f14
  2. 09 5月, 2013 1 次提交
    • A
      NFS4.1 Fix data server connection race · c23266d5
      Andy Adamson 提交于
      Unlike meta data server mounts which support multiple mount points to
      the same server via struct nfs_server, data servers support a single connection.
      
      Concurrent calls to setup the data server connection can race where the first
      call allocates the nfs_client struct, and before the cache struct nfs_client
      pointer can be set, a second call also tries to setup the connection, finds the
      already allocated nfs_client, bumps the reference count, re-initializes the
      session,etc. This results in a hanging data server session after umount.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c23266d5
  3. 07 5月, 2013 4 次提交
    • A
      make blkdev_put() return void · 4385bab1
      Al Viro 提交于
      same story as with the previous patches - note that return
      value of blkdev_close() is lost, since there's nowhere the
      caller (__fput()) could return it to.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4385bab1
    • W
      NFSv3: match sec= flavor against server list · d497ab97
      Weston Andros Adamson 提交于
      Older linux clients match the 'sec=' mount option flavor against the server's
      flavor list (if available) and return EPERM if the specified flavor or AUTH_NULL
      (which "matches" any flavor) is not found.
      
      Recent changes skip this step and allow the vfs mount even though no operations
      will succeed, creating a 'dud' mount.
      
      This patch reverts back to the old behavior of matching specified flavors
      against the server list and also returns EPERM when no sec= is specified and
      none of the flavors returned by the server are supported by the client.
      
      Example of behavior change:
      
      the server's /etc/exports:
      
      /export/krb5      *(sec=krb5,rw,no_root_squash)
      
      old client behavior:
      
      $ uname -a
      Linux one.apikia.fake 3.8.8-202.fc18.x86_64 #1 SMP Wed Apr 17 23:25:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
      $ sudo mount -v -o sec=sys,vers=3 zero:/export/krb5 /mnt
      mount.nfs: timeout set for Sun May  5 17:32:04 2013
      mount.nfs: trying text-based options 'sec=sys,vers=3,addr=192.168.100.10'
      mount.nfs: prog 100003, trying vers=3, prot=6
      mount.nfs: trying 192.168.100.10 prog 100003 vers 3 prot TCP port 2049
      mount.nfs: prog 100005, trying vers=3, prot=17
      mount.nfs: trying 192.168.100.10 prog 100005 vers 3 prot UDP port 20048
      mount.nfs: mount(2): Permission denied
      mount.nfs: access denied by server while mounting zero:/export/krb5
      
      recently changed behavior:
      
      $ uname -a
      Linux one.apikia.fake 3.9.0-testing+ #2 SMP Fri May 3 20:29:32 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
      $ sudo mount -v -o sec=sys,vers=3 zero:/export/krb5 /mnt
      mount.nfs: timeout set for Sun May  5 17:37:17 2013
      mount.nfs: trying text-based options 'sec=sys,vers=3,addr=192.168.100.10'
      mount.nfs: prog 100003, trying vers=3, prot=6
      mount.nfs: trying 192.168.100.10 prog 100003 vers 3 prot TCP port 2049
      mount.nfs: prog 100005, trying vers=3, prot=17
      mount.nfs: trying 192.168.100.10 prog 100005 vers 3 prot UDP port 20048
      $ ls /mnt
      ls: cannot open directory /mnt: Permission denied
      $ sudo ls /mnt
      ls: cannot open directory /mnt: Permission denied
      $ sudo df /mnt
      df: ‘/mnt’: Permission denied
      df: no file systems processed
      $ sudo umount /mnt
      $
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d497ab97
    • T
      NFSv4.1: Ensure that we free the lock stateid on the server · c8b2d0bf
      Trond Myklebust 提交于
      This ensures that the server doesn't need to keep huge numbers of
      lock stateids waiting around for the final CLOSE.
      See section 8.2.4 in RFC5661.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c8b2d0bf
    • T
      NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call · 7c1d5fae
      Trond Myklebust 提交于
      The main reason for doing this is will be to allow for an asynchronous
      RPC mode that we can use for freeing lock stateids as per section
      8.2.4 of RFC5661.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7c1d5fae
  4. 04 5月, 2013 1 次提交
  5. 29 4月, 2013 2 次提交
  6. 24 4月, 2013 3 次提交
  7. 23 4月, 2013 1 次提交
    • C
      NFS: Retry SETCLIENTID with AUTH_SYS instead of AUTH_NONE · 79d852bf
      Chuck Lever 提交于
      Recently I changed the SETCLIENTID code to use AUTH_GSS(krb5i), and
      then retry with AUTH_NONE if that didn't work.  This was to enable
      Kerberos NFS mounts to work without forcing Linux NFS clients to
      have a keytab on hand.
      
      Rick Macklem reports that the FreeBSD server accepts AUTH_NONE only
      for NULL operations (thus certainly not for SETCLIENTID).  Falling
      back to AUTH_NONE means our proposed 3.10 NFS client will not
      interoperate with FreeBSD servers over NFSv4 unless Kerberos is
      fully configured on both ends.
      
      If the Linux client falls back to using AUTH_SYS instead for
      SETCLIENTID, all should work fine as long as the NFS server is
      configured to allow AUTH_SYS for SETCLIENTID.
      
      This may still prevent access to Kerberos-only FreeBSD servers by
      Linux clients with no keytab.  Rick is of the opinion that the
      security settings the server applies to its pseudo-fs should also
      apply to the SETCLIENTID operation.
      
      Linux and Solaris NFS servers do not place that limitation on
      SETCLIENTID.  The security settings for the server's pseudo-fs are
      determined automatically as the union of security flavors allowed on
      real exports, as recommended by RFC 3530bis; and the flavors allowed
      for SETCLIENTID are all flavors supported by the respective server
      implementation.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      79d852bf
  8. 22 4月, 2013 1 次提交
  9. 20 4月, 2013 3 次提交
  10. 17 4月, 2013 1 次提交
  11. 15 4月, 2013 1 次提交
  12. 13 4月, 2013 1 次提交
  13. 12 4月, 2013 1 次提交
  14. 11 4月, 2013 3 次提交
  15. 10 4月, 2013 1 次提交
  16. 09 4月, 2013 3 次提交
  17. 06 4月, 2013 12 次提交