1. 25 9月, 2009 1 次提交
  2. 10 7月, 2009 1 次提交
  3. 02 7月, 2009 1 次提交
    • J
      cifs: add new cifs_iget function and convert unix codepath to use it · cc0bad75
      Jeff Layton 提交于
      cifs: add new cifs_iget function and convert unix codepath to use it
      
      In order to unify some codepaths, introduce a common cifs_fattr struct
      for storing inode attributes. The different codepaths (unix, legacy,
      normal, etc...) can fill out this struct with inode info. It can then be
      passed as an arg to a common set of routines to get and update inodes.
      
      Add a new cifs_iget function that uses iget5_locked to identify inodes.
      This will compare inodes based on the uniqueid value in a cifs_fattr
      struct.
      
      Rather than filling out an already-created inode, have
      cifs_get_inode_info_unix instead fill out cifs_fattr and hand that off
      to cifs_iget. cifs_iget can then properly look for hardlinked inodes.
      
      On the readdir side, add a new cifs_readdir_lookup function that spawns
      populated dentries. Redefine FILE_UNIX_INFO so that it's basically a
      FILE_UNIX_BASIC_INFO that has a few fields wrapped around it. This
      allows us to more easily use the same function for filling out the fattr
      as the non-readdir codepath.
      
      With this, we should then have proper hardlink detection and can
      eventually get rid of some nasty CIFS-specific hacks for handing them.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      cc0bad75
  4. 28 5月, 2009 2 次提交
  5. 02 5月, 2009 1 次提交
  6. 01 5月, 2009 2 次提交
    • S
      [CIFS] Remove sparse endian warnings · 0e0d2cf3
      Steve French 提交于
      Removes two sparse CHECK_ENDIAN warnings from Jeffs earlier patch,
      and removes the dead readlink code (after noting where in
      findfirst we will need to add something like that in the future
      to handle the newly discovered unexpected error on FindFirst of NTFS symlinks.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0e0d2cf3
    • J
      cifs: fix length handling in cifs_get_name_from_search_buf · 18295796
      Jeff Layton 提交于
      The earlier patch to move this code to use the new unicode helpers
      assumed that the filename strings would be null terminated. That's not
      always the case.
      
      Instead of passing "max_len" to the string converter, pass "min(len,
      max_len)", which makes it do the right thing while still keeping the
      parser confined to the response. Also fix up the prototypes of this
      function and the callers so that max_len is unsigned (like len is).
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      18295796
  7. 30 4月, 2009 1 次提交
  8. 21 4月, 2009 1 次提交
  9. 17 4月, 2009 2 次提交
    • J
      cifs: vary timeout on writes past EOF based on offset (try #5) · fbec9ab9
      Jeff Layton 提交于
      This is the fourth version of this patch:
      
      The first three generated a compiler warning asking for explicit curly
      braces.
      
      The first two didn't handle update the size correctly when writes that
      didn't start at the eof were done.
      
      The first patch also didn't update the size correctly when it explicitly
      set via truncate().
      
      This patch adds code to track the client's current understanding of the
      size of the file on the server separate from the i_size, and then to use
      this info to semi-intelligently set the timeout for writes past the EOF.
      
      This helps prevent timeouts when trying to write large, sparse files on
      windows servers.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      fbec9ab9
    • S
      [CIFS] Endian convert UniqueId when reporting inode numbers from server files · 85a6dac5
      Steve French 提交于
      Jeff made a good point that we should endian convert the UniqueId when we use
      it to set i_ino Even though this value is opaque to the client, when comparing
      the inode numbers of the same server file from two different clients (one
      big endian, one little endian) or when we compare a big endian client's view
      of i_ino with what the server thinks - we should get the same value
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      85a6dac5
  10. 21 2月, 2009 2 次提交
  11. 21 11月, 2008 1 次提交
    • S
      [CIFS] Do not attempt to close invalidated file handles · ddb4cbfc
      Steve French 提交于
      If a connection with open file handles has gone down
      and come back up and reconnected without reopening
      the file handle yet, do not attempt to send an SMB close
      request for this handle in cifs_close.  We were
      checking for the connection being invalid in cifs_close
      but since the connection may have been reconnected
      we also need to check whether the file handle
      was marked invalid (otherwise we could close the
      wrong file handle by accident).
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ddb4cbfc
  12. 21 10月, 2008 1 次提交
    • J
      [CIFS] fix saving of resume key before CIFSFindNext · a364bc0b
      Jeff Layton 提交于
      We recently fixed the cifs readdir code so that it saves the resume key
      before calling CIFSFindNext. Unfortunately, this assumes that we have
      just done a CIFSFindFirst (or FindNext) and have resume info to save.
      This isn't necessarily the case. Fix the code to save resume info if we
      had to reinitiate the search, and after a FindNext.
      
      This fixes connectathon basic test6 against NetApp filers.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a364bc0b
  13. 08 10月, 2008 1 次提交
    • S
      [CIFS] make sure we have the right resume info before calling CIFSFindNext · 0752f152
      Steve French 提交于
      When we do a seekdir() or equivalent, we usually end up doing a
      FindFirst call and then call FindNext until we get to the offset that we
      want. The problem is that when we call FindNext, the code usually
      doesn't have the proper info (mostly, the filename of the entry from the
      last search) to resume the search.
      
      Add a "last_entry" field to the cifs_search_info that points to the last
      entry in the search. We calculate this pointer by using the
      LastNameOffset field from the search parms that are returned. We then
      use that info to do a cifs_save_resume_key before we call CIFSFindNext.
      
      This patch allows CIFS to reliably pass the "telldir" connectathon test.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0752f152
  14. 24 7月, 2008 1 次提交
  15. 24 5月, 2008 2 次提交
  16. 14 5月, 2008 1 次提交
    • S
      [CIFS] don't explicitly do a FindClose on rewind when directory search has ended · 77c57ec8
      Steve French 提交于
      Do the following series of operations on a CIFS share:
      
          opendir(dir)
          readdir(dir)
          unlink(file in dir)
          rewinddir(dir)
          readdir(dir)
      
      If the readdir read all entries in the directory this will make CIFS throw an error like this:
      
           CIFS VFS: Send error in FindClose = -9
      
      CIFS requests "Close at end of search" of the server by setting this bit when issuing FindFirst or FindNext.  Therefore when all search entries are returned, the server may return "end of search" and close the search implicitly when this bit is set by the client on the request.  We check for this when a readdir is explicitly closed - but when the client notices that a directory has changed after the last operation, we attempt to close the directory before reopening by reissuing a second FindFirst. But, the directory may already been implicitly closed (due to end of search) because the first readdir finished. So we only want to issue a FindClose call in this case when we don't expect it to already be closed.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      77c57ec8
  17. 29 4月, 2008 1 次提交
  18. 13 2月, 2008 1 次提交
  19. 08 2月, 2008 1 次提交
  20. 09 11月, 2007 1 次提交
    • S
      [CIFS] Fix stale mode after readdir when cifsacl specified · a6f8de3d
      Steve French 提交于
      When mounted with cifsacl mount option, readdir can not
      instantiate the inode with the estimated mode based on the ACL
      for each file since we have not queried for the ACL for
      each of these files yet.  So set the refresh time to zero
      for these inodes so that the next stat will cause the client
      to go to the server for the ACL info so we can build the estimated
      mode (this means we also will issue an extra QueryPathInfo if
      the stat happens within 1 second, but this is trivial compared to
      the time required to open/getacl/close for each).
      
      ls -l is slower when cifsacl mount option is specified, but
      displays correct mode information.
      Signed-off-by: NShirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a6f8de3d
  21. 06 11月, 2007 1 次提交
  22. 13 10月, 2007 1 次提交
  23. 31 8月, 2007 1 次提交
  24. 19 7月, 2007 1 次提交
  25. 13 7月, 2007 1 次提交
  26. 08 7月, 2007 2 次提交
  27. 07 7月, 2007 1 次提交
  28. 09 5月, 2007 1 次提交
  29. 01 5月, 2007 1 次提交
    • S
      [CIFS] UID/GID override on CIFS mounts to Samba · 4523cc30
      Steve French 提交于
      When CIFS Unix Extensions are negotiated we get the Unix uid and gid
      owners of the file from the server (on the Unix Query Path Info
      levels), but if the server's uids don't match the client uid's users
      were having to disable the Unix Extensions (which turned off features
      they still wanted).   The changeset patch allows users to override uid
      and/or gid for file/directory owner with a default uid and/or gid
      specified at mount (as is often done when mounting from Linux cifs
      client to Windows server).  This changeset also displays the uid
      and gid used by default in /proc/mounts (if applicable).
      
      Also cleans up code by adding some of the missing spaces after
      "if" keywords per-kernel style guidelines (as suggested by Randy Dunlap
      when he reviewed the patch).
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4523cc30
  30. 25 4月, 2007 1 次提交
  31. 03 4月, 2007 1 次提交
  32. 10 3月, 2007 1 次提交
  33. 27 2月, 2007 1 次提交
  34. 17 2月, 2007 1 次提交