1. 04 1月, 2012 1 次提交
  2. 17 11月, 2011 2 次提交
  3. 19 10月, 2011 1 次提交
    • H
      nfs/super.c: local functions should be static · 45402c38
      H Hartley Sweeten 提交于
      commit ae50c0b5 "pnfs: client stats" added additional information to
      the output of /proc/self/mountstats. The new functions introduced are
      only used in this file and should be marked static.
      
      If CONFIG_NFS_V4_1 is not defined, empty stub functions are used.  If
      CONFIG_NFS_V4 is not defined these stub functions are not used at all.
      Adding static for the functions results in compile warnings:
      
      fs/nfs/super.c:743: warning: 'show_sessions' defined but not used
      fs/nfs/super.c:756: warning: 'show_pnfs' defined but not used
      
      Fix this by adding a #ifdef CONFIG_NFS_V4 guard around the two
      show_ functions.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      45402c38
  4. 27 9月, 2011 1 次提交
  5. 14 9月, 2011 1 次提交
    • S
      nfs: Do not allow multiple mounts on same mountpoint when using -o noac · fb2088cc
      Sachin Prabhu 提交于
      Do not allow multiple mounts on same mountpoint when using -o noac
      
      When you normally attempt to mount a share twice on the same mountpoint,
      a check in do_add_mount causes it to return an error
      
      # mount localhost:/nfsv3 /mnt
      # mount localhost:/nfsv3 /mnt
      mount.nfs: /mnt is already mounted or busy
      
      However when using the option 'noac', the user is able to mount the same
      share on the same mountpoint multiple times. This happens because a
      share mounted with the noac option is automatically assigned the 'sync'
      flag MS_SYNCHRONOUS in nfs_initialise_sb(). This flag is set after the
      check for already existing superblocks is done in sget(). The check for
      the mount flags in nfs_compare_mount_options() does not take into
      account the 'sync' flag applied later on in the code path. This means
      that when using 'noac', a new superblock structure is assigned for every
      new mount of the same share and multiple shares on the same mountpoint
      are allowed.
      
      ie.
      # mount -onoac localhost:/nfsv3 /mnt
      can be run multiple times.
      
      The patch checks for noac and assigns the sync flag before sget() is
      called to obtain an already existing superblock structure.
      Signed-off-by: NSachin Prabhu <sprabhu@redhat.com>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      fb2088cc
  6. 20 7月, 2011 1 次提交
  7. 30 5月, 2011 1 次提交
    • J
      pnfs: client stats · ae50c0b5
      J. Bruce Fields 提交于
      A pNFS client auto-negotiates a lot of features (minorversion level,
      pNFS layout type, etc.).  This is convenient, but makes certain kinds of
      failures hard for a user to detect.
      
      For example, if the client falls back on 4.0, or falls back to MDS IO
      because the user didn't connect to the right iscsi disks before
      mounting, the only symptoms may be reduced performance, which may not be
      noticed till long after the actual failure, and may be difficult for a
      user to diagnose.
      
      However, such "failures" may also be perfectly normal in some cases, so
      we don't want to spam the system logs with them.
      
      One approach would be to put some more information into
      /proc/self/mountstats.
      Signed-off-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [pnfs: add commit client stats]
      [fixup data types for "ret" variables in pnfs_try_to* inline funcs.]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [fix definition of show_pnfs for !CONFIG_PNFS]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [nfs41: Fix show_sessions in the not CONFIG_NFS_V4_1 case]
          There is a build error when CONFIG_NFS_V4 is set but
          CONFIG_NFS_V4_1 is *not* set. show_sessions() prototype
          was unbalanced between the two cases.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [pnfs: super.c remove CONFIG_PNFS]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      ae50c0b5
  8. 28 4月, 2011 1 次提交
  9. 14 4月, 2011 1 次提交
  10. 13 4月, 2011 1 次提交
    • J
      NFS: Remove dead code from nfs_fs_mount() · 160bc160
      Jesper Juhl 提交于
      In fs/nfs/super.c::nfs_fs_mount() we test for a NULL 'data':
      
      ...
       		if (data == NULL || mntfh == NULL)
       			goto out_free_fh;
      ...
      
      and then further down in the function we test 'data' again:
      
      ...
       			nfs_fscache_get_super_cookie(
       				s, data ? data->fscache_uniq : NULL, NULL);
      ...
      
      this second check is just dead code since there is no way 'data' could
      possibly be NULL here.
      We also rely on a non-NULL 'data' in more than one location between these
      two tests, further proving the point that the second test is bogus.
      
      This patch removes the dead code.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      160bc160
  11. 17 3月, 2011 5 次提交
  12. 12 3月, 2011 2 次提交
  13. 13 1月, 2011 1 次提交
  14. 05 1月, 2011 2 次提交
  15. 22 12月, 2010 1 次提交
    • S
      NFS: suppressing showing of default mount port value in /proc fixed · aa699473
      Stanislav Kinsbursky 提交于
      Update: added check for zero value as it was before (note: can't simply check
      mountd_port for positive value because it's typeof unsigned short)
      
      Default value for mount server port is set to NFS_UNSPEC_PORT (-1) and will not
      be changed during parsing mount options for mound data version 6. This default
      value will be showed for mountport in /proc/mounts always since current default
      check is for zero value. This small mistake leads to big problem, because
      during umount.nfs execution from old user-space utils (at least nfs-utils
      1.0.9) this value will be used as the server port to connect to. This request
      will be rejected (since port is 65535) and thus nfs mount point can't be
      unmounted.
      
      Note from Chuck Lever (chuck.lever@oracle.com): this is only possible if
      /etc/mtab is a link to /proc/mounts.  Not all systems have this configuration.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      aa699473
  16. 08 12月, 2010 1 次提交
    • M
      nfs: kernel should return EPROTONOSUPPORT when not support NFSv4 · 0de1b7e8
      Mi Jinlong 提交于
        When nfs client(kernel) don't support NFSv4, maybe user build
        kernel without NFSv4, there is a problem.
      
        Using command "mount SERVER-IP:/nfsv3 /mnt/" to mount NFSv3
        filesystem, mount should should success, but fail and get error:
      
          "mount.nfs: an incorrect mount option was specified"
      
        System call mount "nfs"(not "nfs4") with "vers=4",
        if CONFIG_NFS_V4 is not defined, the "vers=4" will be parsed
        as invalid argument and kernel return EINVAL to nfs-utils.
      
        About that, we really want get EPROTONOSUPPORT rather than
        EINVAL. This path make sure kernel parses argument success,
        and return EPROTONOSUPPORT at nfs_validate_mount_data().
      Signed-off-by: NMi Jinlong <mijinlong@cn.fujitsu.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      0de1b7e8
  17. 18 11月, 2010 1 次提交
  18. 16 11月, 2010 1 次提交
  19. 29 10月, 2010 1 次提交
  20. 24 9月, 2010 1 次提交
  21. 23 9月, 2010 1 次提交
    • S
      nfs: introduce mount option '-olocal_lock' to make locks local · 5eebde23
      Suresh Jayaraman 提交于
      NFS clients since 2.6.12 support flock locks by emulating fcntl byte-range
      locks. Due to this, some windows applications which seem to use both flock
      (share mode lock mapped as flock by Samba) and fcntl locks sequentially on
      the same file, can't lock as they falsely assume the file is already locked.
      The problem was reported on a setup with windows clients accessing excel files
      on a Samba exported share which is originally a NFS mount from a NetApp filer.
      
      Older NFS clients (< 2.6.12) did not see this problem as flock locks were
      considered local. To support legacy flock behavior, this patch adds a mount
      option "-olocal_lock=" which can take the following values:
      
         'none'  		- Neither flock locks nor POSIX locks are local
         'flock' 		- flock locks are local
         'posix' 		- fcntl/POSIX locks are local
         'all'		- Both flock locks and POSIX locks are local
      
      Testing:
      
         - This patch was tested by using -olocal_lock option with different values
           and the NLM calls were noted from the network packet captured.
      
           'none'  - NLM calls were seen during both flock() and fcntl(), flock lock
         	       was granted, fcntl was denied
           'flock' - no NLM calls for flock(), NLM call was seen for fcntl(),
         	       granted
           'posix' - NLM call was seen for flock() - granted, no NLM call for fcntl()
           'all'   - no NLM calls were seen during both flock() and fcntl()
      
         - No bugs were seen during NFSv4 locking/unlocking in general and NFSv4
           reboot recovery.
      
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5eebde23
  22. 13 9月, 2010 1 次提交
    • M
      statfs() gives ESTALE error · fbf3fdd2
      Menyhart Zoltan 提交于
      Hi,
      
      An NFS client executes a statfs("file", &buff) call.
      "file" exists / existed, the client has read / written it,
      but it has already closed it.
      
      user_path(pathname, &path) looks up "file" successfully in the
      directory-cache  and restarts the aging timer of the directory-entry.
      Even if "file" has already been removed from the server, because the
      lookupcache=positive option I use, keeps the entries valid for a while.
      
      nfs_statfs() returns ESTALE if "file" has already been removed from the
      server.
      
      If the user application repeats the statfs("file", &buff) call, we
      are stuck: "file" remains young forever in the directory-cache.
      Signed-off-by: NZoltan Menyhart  <Zoltan.Menyhart@bull.net>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@kernel.org
      fbf3fdd2
  23. 11 8月, 2010 1 次提交
  24. 10 8月, 2010 1 次提交
  25. 07 8月, 2010 1 次提交
  26. 23 6月, 2010 1 次提交
  27. 25 5月, 2010 1 次提交
  28. 15 5月, 2010 6 次提交