1. 17 4月, 2009 3 次提交
    • 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
    • J
      cifs: flush data on any setattr · 0f4d634c
      Jeff Layton 提交于
      We already flush all the dirty pages for an inode before doing
      ATTR_SIZE and ATTR_MTIME changes. There's another problem though -- if
      we change the mode so that the file becomes read-only then we may not
      be able to write data to it after a reconnect.
      
      Fix this by just going back to flushing all the dirty data on any
      setattr call. There are probably some cases that can be optimized out,
      but I'm not sure they're worthwhile and we need to consider them more
      carefully to make sure that we don't cause regressions if we have
      to reconnect before writeback occurs.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0f4d634c
  2. 01 4月, 2009 1 次提交
  3. 12 3月, 2009 1 次提交
  4. 21 2月, 2009 4 次提交
  5. 29 1月, 2009 1 次提交
    • S
      [CIFS] revalidate parent inode when rmdir done within that directory · 42c24544
      Steve French 提交于
      When a search is pending of a parent directory, and a child directory
      within it is removed, we need to reset the parent directory's time
      so that we don't reuse the (now stale) search results.
      
      Thanks to Gunter Kukkukk for reporting this:
      
      > got the following failure notification on irc #samba:
      >
      > A user was updating from subversion 1.4 to 1.5, where the
      > repository is located on a samba share (independent of
      > unix extensions = Yes or No).
      > svn 1.4 did work, 1.5 does not.
      >
      > The user did a lot of stracing of subversion - and wrote a
      > testapplet to simulate the failing behaviour.
      > I've converted the C++ source to C and added some error cases.
      >
      > When using "./testdir" on a local file system, "result2"
      > is always (nil) as expected - cifs vfs behaves different here!
      >
      >   ./testdir /mnt/cifs/mounted/share
      >
      > returns a (failing) valid pointer.
      Acked-by: NDave Kleikamp <shaggy@us.ibm.com>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      42c24544
  6. 06 1月, 2009 1 次提交
    • A
      inode->i_op is never NULL · acfa4380
      Al Viro 提交于
      We used to have rather schizophrenic set of checks for NULL ->i_op even
      though it had been eliminated years ago.  You'd need to go out of your
      way to set it to NULL explicitly _and_ a bunch of code would die on
      such inodes anyway.  After killing two remaining places that still
      did that bogosity, all that crap can go away.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      acfa4380
  7. 26 12月, 2008 1 次提交
  8. 14 11月, 2008 1 次提交
  9. 04 11月, 2008 1 次提交
  10. 23 10月, 2008 1 次提交
  11. 21 10月, 2008 2 次提交
  12. 20 10月, 2008 2 次提交
  13. 17 10月, 2008 1 次提交
  14. 08 10月, 2008 1 次提交
    • S
      [CIFS] clean up error handling in cifs_unlink · 6050247d
      Steve French 提交于
      Currently, if a standard delete fails and we end up getting -EACCES
      we try to clear ATTR_READONLY and try the delete again. If that
      then fails with -ETXTBSY then we try a rename_pending_delete. We
      aren't handling other errors appropriately though.
      
      Another client could have deleted the file in the meantime and
      we get back -ENOENT, for instance. In that case we wouldn't do a
      d_drop. Instead of retrying in a separate call, simply goto the
      original call and use the error handling from that.
      
      Also, we weren't properly undoing any attribute changes that
      were done before returning an error back to the caller.
      
      CC: Jeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      6050247d
  15. 07 10月, 2008 1 次提交
  16. 25 9月, 2008 3 次提交
  17. 24 9月, 2008 3 次提交
    • S
      [CIFS] fix busy-file renames and refactor cifs_rename logic · ee2fd967
      Steve French 提交于
      Break out the code that does the actual renaming into a separate
      function and have cifs_rename call that. That function will attempt a
      path based rename first and then do a filehandle based one if it looks
      like the source is busy.
      
      The existing logic tried a path based rename first, but if we needed to
      remove the destination then it only attempted a filehandle based rename
      afterward. Not all servers support renaming by filehandle, so we need to
      always attempt path rename first and fall back to filehandle rename if
      it doesn't work.
      
      This also fixes renames of open files on windows servers (at least when
      the source and destination directories are the same).
      
      CC: Jeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ee2fd967
    • J
      cifs: add function to set file disposition · 6d22f098
      Jeff Layton 提交于
      cifs: add function to set file disposition
      
      The proper way to set the delete on close bit on an already existing
      file is to use SET_FILE_INFO with an infolevel of
      SMB_FILE_DISPOSITION_INFO. Add a function to do that and have the
      silly-rename code use it.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      6d22f098
    • J
      cifs: move rename and delete-on-close logic into helper function · a12a1ac7
      Jeff Layton 提交于
      cifs: move rename and delete-on-close logic into helper function
      
      When a file is still open on the server, we attempt to set the
      DELETE_ON_CLOSE bit and rename it to a new filename. When the
      last opener closes the file, the server should delete it.
      
      This patch moves this mechanism into a helper function and has
      the two places in cifs_unlink that do this procedure call it. It
      also fixes the open flags to be correct.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a12a1ac7
  18. 17 9月, 2008 2 次提交
  19. 19 8月, 2008 1 次提交
  20. 14 8月, 2008 1 次提交
    • S
      [CIFS] mount of IPC$ breaks with iget patch · ad661334
      Steve French 提交于
      In looking at network named pipe support on cifs, I noticed that
      Dave Howell's iget patch:
      
          iget: stop CIFS from using iget() and read_inode()
      
      broke mounts to IPC$ (the interprocess communication share), and don't
      handle the error case (when getting info on the root inode fails).
      
      Thanks to Gunter who noted a typo in a debug line in the original
      version of this patch.
      
      CC: David Howells <dhowells@redhat.com>
      CC: Gunter Kukkukk <linux@kukkukk.com>
      CC: Stable Kernel <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ad661334
  21. 07 8月, 2008 3 次提交
  22. 06 8月, 2008 5 次提交