1. 03 3月, 2012 5 次提交
  2. 02 3月, 2012 1 次提交
  3. 19 2月, 2012 1 次提交
  4. 15 2月, 2012 2 次提交
  5. 07 2月, 2012 1 次提交
  6. 01 2月, 2012 4 次提交
  7. 07 1月, 2012 4 次提交
  8. 05 1月, 2012 1 次提交
    • J
      nfs: fix regression in handling of context= option in NFSv4 · 8a0d551a
      Jeff Layton 提交于
      Setting the security context of a NFSv4 mount via the context= mount
      option is currently broken. The NFSv4 codepath allocates a parsed
      options struct, and then parses the mount options to fill it. It
      eventually calls nfs4_remote_mount which calls security_init_mnt_opts.
      That clobbers the lsm_opts struct that was populated earlier. This bug
      also looks like it causes a small memory leak on each v4 mount where
      context= is used.
      
      Fix this by moving the initialization of the lsm_opts into
      nfs_alloc_parsed_mount_data. Also, add a destructor for
      nfs_parsed_mount_data to make it easier to free all of the allocations
      hanging off of it, and to ensure that the security_free_mnt_opts is
      called whenever security_init_mnt_opts is.
      
      I believe this regression was introduced quite some time ago, probably
      by commit c02d7adf.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      8a0d551a
  9. 04 1月, 2012 2 次提交
  10. 17 11月, 2011 2 次提交
  11. 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
  12. 27 9月, 2011 1 次提交
  13. 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
  14. 20 7月, 2011 1 次提交
  15. 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
  16. 28 4月, 2011 1 次提交
  17. 14 4月, 2011 1 次提交
  18. 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
  19. 17 3月, 2011 5 次提交
  20. 12 3月, 2011 2 次提交
  21. 13 1月, 2011 1 次提交
  22. 05 1月, 2011 1 次提交