1. 16 1月, 2011 1 次提交
  2. 13 1月, 2011 1 次提交
  3. 10 1月, 2011 1 次提交
  4. 07 1月, 2011 4 次提交
    • N
      fs: dcache per-inode inode alias locking · 873feea0
      Nick Piggin 提交于
      dcache_inode_lock can be replaced with per-inode locking. Use existing
      inode->i_lock for this. This is slightly non-trivial because we sometimes
      need to find the inode from the dentry, which requires d_inode to be
      stabilised (either with refcount or d_lock).
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      873feea0
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin 提交于
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • N
      fs: scale inode alias list · b23fb0a6
      Nick Piggin 提交于
      Add a new lock, dcache_inode_lock, to protect the inode's i_dentry list
      from concurrent modification. d_alias is also protected by d_lock.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b23fb0a6
  5. 08 12月, 2010 1 次提交
  6. 07 12月, 2010 1 次提交
  7. 03 12月, 2010 1 次提交
    • S
      cifs: add attribute cache timeout (actimeo) tunable · 6d20e840
      Suresh Jayaraman 提交于
      Currently, the attribute cache timeout for CIFS is hardcoded to 1 second. This
      means that the client might have to issue a QPATHINFO/QFILEINFO call every 1
      second to verify if something has changes, which seems too expensive. On the
      other hand, if the timeout is hardcoded to a higher value, workloads that
      expect strict cache coherency might see unexpected results.
      
      Making attribute cache timeout as a tunable will allow us to make a tradeoff
      between performance and cache metadata correctness depending on the
      application/workload needs.
      
      Add 'actimeo' tunable that can be used to tune the attribute cache timeout.
      The default timeout is set to 1 second. Also, display actimeo option value in
      /proc/mounts.
      
      It appears to me that 'actimeo' and the proposed (but not yet merged)
      'strictcache' option cannot coexist, so care must be taken that we reset the
      other option if one of them is set.
      
      Changes since last post:
         - fix option parsing and handle possible values correcly
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      6d20e840
  8. 30 11月, 2010 2 次提交
  9. 11 11月, 2010 1 次提交
  10. 09 11月, 2010 1 次提交
    • S
      cifs: fix a memleak in cifs_setattr_nounix() · 3565bd46
      Suresh Jayaraman 提交于
      Andrew Hendry reported a kmemleak warning in 2.6.37-rc1 while editing a
      text file with gedit over cifs.
      
      unreferenced object 0xffff88022ee08b40 (size 32):
        comm "gedit", pid 2524, jiffies 4300160388 (age 2633.655s)
        hex dump (first 32 bytes):
          5c 2e 67 6f 75 74 70 75 74 73 74 72 65 61 6d 2d  \.goutputstream-
          35 42 41 53 4c 56 00 de 09 00 00 00 2c 26 78 ee  5BASLV......,&x.
        backtrace:
          [<ffffffff81504a4d>] kmemleak_alloc+0x2d/0x60
          [<ffffffff81136e13>] __kmalloc+0xe3/0x1d0
          [<ffffffffa0313db0>] build_path_from_dentry+0xf0/0x230 [cifs]
          [<ffffffffa031ae1e>] cifs_setattr+0x9e/0x770 [cifs]
          [<ffffffff8115fe90>] notify_change+0x170/0x2e0
          [<ffffffff81145ceb>] sys_fchmod+0x10b/0x140
          [<ffffffff8100c172>] system_call_fastpath+0x16/0x1b
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      The commit 1025774c that removed inode_setattr() seems to have introduced this
      memleak by returning early without freeing 'full_path'.
      Reported-by: NAndrew Hendry <andrew.hendry@gmail.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3565bd46
  11. 25 10月, 2010 1 次提交
  12. 12 10月, 2010 1 次提交
  13. 08 10月, 2010 1 次提交
  14. 07 10月, 2010 3 次提交
  15. 30 9月, 2010 5 次提交
  16. 09 9月, 2010 1 次提交
  17. 27 8月, 2010 1 次提交
    • S
      Cannot allocate memory error on mount · f0138a79
      Suresh Jayaraman 提交于
      On 08/26/2010 01:56 AM, joe hefner wrote:
      > On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003ýa with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,ýusing userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
      
      > ýfs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
      > ýfs/cifs/cifssmb.c: Send error in QPathInfo = -13
      > ýCIFS VFS: cifs_read_super: get root inode failed
      
      Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
      friends fail only due to memory allocation error when the inode is NULL
      which is not the case if CIFSSMBQPathInfo() fails and returns an error.
      Fix this by propagating the actual error code back.
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f0138a79
  18. 10 8月, 2010 3 次提交
    • C
      cifs: truncate fallout · 1b947463
      Christoph Hellwig 提交于
      Remove the calls to inode_newsize_ok given that we already did it as
      part of inode_change_ok in the beginning of cifs_setattr_(no)unix.
      
      No need to call ->truncate if cifs doesn't have one, so remove the
      explicit call in cifs_vmtruncate, and replace the calls to vmtruncate
      with truncate_setsize which is vmtruncate minus inode_newsize_ok
      and the call to ->truncate.
      
      Rename cifs_vmtruncate to cifs_setsize to match the new calling conventions.
      
      Question 1:  why does cifs do the pagecache munging and i_size update twice
      	for each setattr call, once opencoded in cifs_vmtruncate, and once
      	using the VFS helpers?
      Question 2: what is supposed to be protected by i_lock in cifs_vmtruncate?
      	Do we need it around the call to inode_change_ok?
      
      [AV: fixed build breakage]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1b947463
    • C
      always call inode_change_ok early in ->setattr · db78b877
      Christoph Hellwig 提交于
      Make sure we call inode_change_ok before doing any changes in ->setattr,
      and make sure to call it even if our fs wants to ignore normal UNIX
      permissions, but use the ATTR_FORCE to skip those.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      db78b877
    • C
      remove inode_setattr · 1025774c
      Christoph Hellwig 提交于
      Replace inode_setattr with opencoded variants of it in all callers.  This
      moves the remaining call to vmtruncate into the filesystem methods where it
      can be replaced with the proper truncate sequence.
      
      In a few cases it was obvious that we would never end up calling vmtruncate
      so it was left out in the opencoded variant:
      
       spufs: explicitly checks for ATTR_SIZE earlier
       btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
       ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above
      
      In addition to that ncpfs called inode_setattr with handcrafted iattrs,
      which allowed to trim down the opencoded variant.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1025774c
  19. 06 8月, 2010 1 次提交
  20. 02 8月, 2010 5 次提交
  21. 12 6月, 2010 1 次提交
  22. 18 5月, 2010 3 次提交