1. 28 4月, 2012 5 次提交
  2. 21 4月, 2012 1 次提交
  3. 15 3月, 2012 1 次提交
  4. 09 3月, 2012 1 次提交
  5. 06 3月, 2012 12 次提交
  6. 03 3月, 2012 5 次提交
    • C
      NFS: Reduce debugging noise from encode_compound_hdr · 54b50af0
      Chuck Lever 提交于
      Get rid of
      
        encode_compound: tag=
      
      when XDR debugging is enabled.  The current Linux client never sets
      compound tags.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      54b50af0
    • C
      NFS: Request fh_expire_type attribute in "server caps" operation · 264e6351
      Chuck Lever 提交于
      The fh_expire_type file attribute is a filesystem wide attribute that
      consists of flags that indicate what characteristics file handles
      on this FSID have.
      
      Our client doesn't support volatile file handles.  It should find
      out early (say, at mount time) whether the server is going to play
      shenanighans with file handles during a migration.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      264e6351
    • C
      NFS: Introduce NFS_ATTR_FATTR_V4_LOCATIONS · 81934ddb
      Chuck Lever 提交于
      The Linux NFS client must distinguish between referral events (which
      it currently supports) and migration events (which it does not yet
      support).
      
      In both types of events, an fs_locations array is returned.  But upper
      layers, not the XDR layer, should make the distinction between a
      referral and a migration.  There really isn't a way for an XDR decoder
      function to distinguish the two, in general.
      
      Slightly adjust the FATTR flags returned by decode_fs_locations()
      to set NFS_ATTR_FATTR_V4_LOCATIONS only if a non-empty locations
      array was returned from the server.  Then have logic in nfs4proc.c
      distinguish whether the locations array is for a referral or
      something else.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      81934ddb
    • C
      NFS: Simplify arguments of encode_renew() · bb4dae5e
      Chuck Lever 提交于
      Clean up: pass just the clientid4 to encode_renew().  This enables it
      to be used by callers who might not have an full nfs_client.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      bb4dae5e
    • C
      NFS: Clean up debugging in decode_pathname() · 02a2976c
      Chuck Lever 提交于
      I noticed recently that decode_attr_fs_locations() is not generating
      very pretty debugging output.  The pathname components each appear on
      a separate line of output, though that does not appear to be the
      intended display behavior.  The preferred way to generate continued
      lines of output on the console is to use pr_cont().
      
      Note that incoming pathname4 components contain a string that is not
      necessarily NUL-terminated.  I did actually see some trailing garbage
      on the console.  In addition to correcting the line continuation
      problem, add a string precision format specifier to ensure that each
      component string is displayed properly, and that vsnprintf() does
      not Oops.
      
      Someone pointed out that allowing incoming network data to possibly
      generate a console line of unbounded length may not be such a good
      idea.  Since this output will rarely be enabled, and there is a hard
      upper bound (NFS4_PATHNAME_MAXCOMPONENTS) in our implementation, this
      is probably not a major concern.
      
      It might be useful to additionally sanity-check the length of each
      incoming component, however.  RFC 3530bis15 does not suggest a maximum
      number of UTF-8 characters per component for either the pathname4 or
      component4 types.  However, we could invent one that is appropriate
      for our implementation.
      
      Another possibility is to scrap all of this and print these pathnames
      in upper layers after a reasonable amount of sanity checking in the
      XDR layer.  This would give us an opportunity to allocate a full
      buffer so that the whole pathname would be output via a single
      dprintk.
      
      Introduced by commit 7aaa0b3b: "NFSv4: convert fs-locations-components
      to conform to RFC3530," (June 9, 2006).
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      02a2976c
  7. 02 3月, 2012 2 次提交
  8. 07 2月, 2012 3 次提交
  9. 04 2月, 2012 1 次提交
    • T
      NFSv4: Fix an Oops in the NFSv4 getacl code · 331818f1
      Trond Myklebust 提交于
      Commit bf118a34 (NFSv4: include bitmap
      in nfsv4 get acl data) introduces the 'acl_scratch' page for the case
      where we may need to decode multi-page data. However it fails to take
      into account the fact that the variable may be NULL (for the case where
      we're not doing multi-page decode), and it also attaches it to the
      encoding xdr_stream rather than the decoding one.
      
      The immediate result is an Oops in nfs4_xdr_enc_getacl due to the
      call to page_address() with a NULL page pointer.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Andy Adamson <andros@netapp.com>
      Cc: stable@vger.kernel.org
      331818f1
  10. 01 2月, 2012 2 次提交
  11. 08 1月, 2012 1 次提交
    • T
      NFSv4: Save the owner/group name string when doing open · 6926afd1
      Trond Myklebust 提交于
      ...so that we can do the uid/gid mapping outside the asynchronous RPC
      context.
      This fixes a bug in the current NFSv4 atomic open code where the client
      isn't able to determine what the true uid/gid fields of the file are,
      (because the asynchronous nature of the OPEN call denies it the ability
      to do an upcall) and so fills them with default values, marking the
      inode as needing revalidation.
      Unfortunately, in some cases, the VFS will do some additional sanity
      checks on the file, and may override the server's decision to allow
      the open because it sees the wrong owner/group fields.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6926afd1
  12. 05 1月, 2012 1 次提交
    • A
      NFSv4: include bitmap in nfsv4 get acl data · bf118a34
      Andy Adamson 提交于
      The NFSv4 bitmap size is unbounded: a server can return an arbitrary
      sized bitmap in an FATTR4_WORD0_ACL request.  Replace using the
      nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
      with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data
      xdr length to the (cached) acl page data.
      
      This is a general solution to commit e5012d1f "NFSv4.1: update
      nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead
      when getting ACLs.
      
      Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr
      was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved.
      
      Cc: stable@kernel.org
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      bf118a34
  13. 31 10月, 2011 1 次提交
  14. 01 8月, 2011 4 次提交