1. 03 Dec, 2009 4 commits
    • Chuck Lever's avatar
      NFS: Revert default r/wsize behavior · dd47f96c
      Chuck Lever authored
      
      When the "rsize=" or "wsize=" mount options are not specified,
      text-based mounts have slightly different behavior than legacy binary
      mounts.  Text-based mounts use the smaller of the server's maximum
      and the client's maximum, but binary mounts use the smaller of the
      server's _preferred_ size and the client's maximum.
      
      This difference is actually pretty subtle.  Most servers advertise
      the same value as their maximum and their preferred transfer size, so
      the end result is the same in most cases.
      
      The reason for this difference is that for text-based mounts, if
      r/wsize are not specified, they are set to the largest value supported
      by the client.  For legacy mounts, the values are set to zero if these
      options are not specified.
      
      nfs_server_set_fsinfo() can negotiate the transfer size defaults
      correctly in any case.  There's no need to specify any particular
      value as default in the text-based option parsing logic.
      
      Note that nfs4 doesn't use nfs_server_set_fsinfo(), but the mount.nfs4
      command does set rsize and wsize to 0 if the user didn't specify these
      options.  So, make the same change for text-based NFSv4 mounts.
      
      Thanks to James Pearson <james-p@moving-picture.com> for reporting and
      diagnosing the problem.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      dd47f96c
    • Chuck Lever's avatar
      NFS: Display compressed (shorthand) IPv6 in /proc/mounts · d250e190
      Chuck Lever authored
      
      Recent changes to snprintf() introduced the %pI6c formatter, which can
      display an IPv6 address with standard shorthanding.  Use this new
      formatter when displaying IPv6 server addresses in /proc/mounts.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      d250e190
    • Jeff Layton's avatar
      NFS: convert proto= option to use netids rather than a protoname · ee671b01
      Jeff Layton authored
      
      Solaris uses netids as values for the proto= option, so that when
      someone specifies "tcp6" they get traffic over TCP + IPv6. Until
      recently, this has never really been an issue for Linux since it didn't
      support NFS over IPv6. The netid and the protocol name were generally
      always the same (modulo any strange configuration in /etc/netconfig).
      
      The solaris manpage documents their proto= option as:
      
          proto= _netid_ | rdma
      
      This patch is intended to bring Linux closer to how the Solaris proto=
      option works, by declaring a static netid mapping in the kernel and
      converting the proto= and mountproto= options to follow it and display
      the proper values in /proc/mounts.
      
      Much of this functionality will need to be provided by a userspace
      mount.nfs patch. Chuck Lever has a patch to change mount.nfs in
      the same way. In principle, we could do *all* of this in userspace but
      that would mean that the options in /proc/mounts may not match the
      options used by userspace.
      
      The alternative to the static mapping here is to add a mechanism to
      upcall to userspace for netid's. I'm not opposed to that option, but
      it'll probably mean more overhead (and quite a bit more code). Rather
      than shoot for that at first, I figured it was probably better to
      start simply.
      
      Comments welcome.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      ee671b01
    • Trond Myklebust's avatar
      NFS: BKL removal from the mount code... · 96f287b0
      Trond Myklebust authored
      
      None of the code in nfs_umount_begin() or nfs_remount() has any BKL
      dependency.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      96f287b0
  2. 21 Oct, 2009 1 commit
  3. 12 Oct, 2009 1 commit
  4. 08 Oct, 2009 1 commit
    • Trond Myklebust's avatar
      NFSv4: Kill nfs4_renewd_prepare_shutdown() · 3050141b
      Trond Myklebust authored
      
      The NFSv4 renew daemon is shared between all active super blocks that refer
      to a particular NFS server, so it is wrong to be shutting it down in
      nfs4_kill_super every time a super block is destroyed.
      
      This patch therefore kills nfs4_renewd_prepare_shutdown altogether, and
      leaves it up to nfs4_shutdown_client() to also shut down the renew daemon
      by means of the existing call to nfs4_kill_renewd().
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      3050141b
  5. 06 Oct, 2009 3 commits
  6. 24 Sep, 2009 1 commit
  7. 23 Sep, 2009 3 commits
  8. 21 Sep, 2009 1 commit
  9. 16 Sep, 2009 1 commit
  10. 08 Sep, 2009 5 commits
  11. 24 Aug, 2009 1 commit
    • Chuck Lever's avatar
      NFS: Handle a zero-length auth flavor list · 5eecfde6
      Chuck Lever authored
      
      Some releases of Linux rpc.mountd (nfs-utils 1.1.4 and later) return an
      empty auth flavor list if no sec= was specified for the export.  This is
      notably broken server behavior.
      
      The new auth flavor list checking added in a recent commit rejects this
      case.  The OpenSolaris client does too.
      
      The broken mountd implementation is already widely deployed.  To avoid
      a behavioral regression, the kernel's mount client skips flavor checking
      (ie reverts to the pre-2.6.32 behavior) if mountd returns an empty
      flavor list.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      5eecfde6
  12. 09 Aug, 2009 5 commits
  13. 23 Jun, 2009 2 commits
  14. 18 Jun, 2009 4 commits
    • Chuck Lever's avatar
      NFS: More "sloppy" parsing problems · a5a16bae
      Chuck Lever authored
      Specifying "port=-5" with the kernel's current mount option parser
      generates "unrecognized mount option".  If "sloppy" is set, this
      causes the mount to succeed and use the default values; the desired
      behavior is that, since this is a valid option with an invalid value,
      the mount should fail, even with "sloppy."
      
      To properly handle "sloppy" parsing, we need to distinguish between
      correct options with invalid values, and incorrect options.  We will
      need to parse integer values by hand, therefore, and not rely on
      match_token().
      
      For instance, these must all fail with "invalid value":
      
      	port=12345678
      	port=-5
      	port=samuel
      
      and not with "unrecognized option," as they do currently.
      
      Thus, for the sake of match_token() we need to treat the values for
      these options as strings, and do the conversion to integers using
      strict_strtol().
      
      This is basically the same solution we used for the earlier "retry="
      fix (commit ecbb3845
      
      ), except in this case the kernel actually has to
      parse the value, rather than ignore it.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      a5a16bae
    • Chuck Lever's avatar
      NFS: Invalid mount option values should always fail, even with "sloppy" · d23c45fd
      Chuck Lever authored
      
      Ian Kent reports:
      
      "I've noticed a couple of other regressions with the options vers
      and proto option of mount.nfs(8).
      
      The commands:
      
      mount -t nfs -o vers=<invalid version> <server>:/<path> /<mountpoint>
      mount -t nfs -o proto=<invalid proto> <server>:/<path> /<mountpoint>
      
      both immediately fail.
      
      But if the "-s" option is also used they both succeed with the
      mount falling back to defaults (by the look of it).
      
      In the past these failed even when the sloppy option was given, as
      I think they should. I believe the sloppy option is meant to allow
      the mount command to still function for mount options (for example
      in shared autofs maps) that exist on other Unix implementations but
      aren't present in the Linux mount.nfs(8). So, an invalid value
      specified for a known mount option is different to an unknown mount
      option and should fail appropriately."
      
      See RH bugzilla 486266.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      d23c45fd
    • Chuck Lever's avatar
      NFS: Update MNT and MNT3 reply decoding functions · 8e02f6b9
      Chuck Lever authored
      
      Solder xdr_stream-based XDR decoding functions into the in-kernel mountd
      client that are more careful about checking data types and watching for
      buffer overflows.  The new MNT3 decoder includes support for auth-flavor
      list decoding.
      
      The "_sz" macro for MNT3 replies was missing the size of the file handle.
      I've added this back, and included the size of the auth flavor array.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      8e02f6b9
    • Chuck Lever's avatar
      NFS: Do not display the setting of the "intr" mount option · c381ad2c
      Chuck Lever authored
      
      The "intr" mount option has been deprecated for a while, but
      /proc/mounts continues to display "nointr" whether "intr" or "nointr"
      has been specified for a mount point.
      
      Since these options do not have any effect, simply do not display
      them.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      c381ad2c
  15. 17 Jun, 2009 4 commits
  16. 12 Jun, 2009 1 commit
  17. 09 May, 2009 2 commits