1. 10 10月, 2007 10 次提交
    • T
      NFS: Don't force a dcache revalidation if nfs_wcc_update_inode succeeds · 17cadc95
      Trond Myklebust 提交于
      The reason is that if the weak cache consistency update was successful,
      then we know that our client must be the only one that changed the
      directory, and we've already updated the dcache to reflect the change.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      17cadc95
    • T
      NFS: nfs_wcc_update_inode: directory caches are always invalidated · e323ea46
      Trond Myklebust 提交于
      We must ensure that the readdir data is always invalidated whether or not
      the weak cache consistency data update succeeds.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e323ea46
    • T
      NFS: Fix dcache revalidation bugs · 6ecc5e8f
      Trond Myklebust 提交于
      We don't need to force a dentry lookup just because we're making changes to
      the directory.
      
      Don't update nfsi->cache_change_attribute in nfs_end_data_update: that
      overrides the NFSv3/v4 weak consistency checking that tells us our update
      was the only one, and that tells us the dcache is still valid.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6ecc5e8f
    • T
      NFS: fix nfs_verify_change_attribute · 7957c141
      Trond Myklebust 提交于
      We always want to check that the verifier and directory
      cache_change_attribute match. This also allows us to remove the 'wraparound
      hack' for the cache_change_attribute. If we're only checking for equality,
      then we don't care about wraparound issues.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7957c141
    • T
      NFS: nfs_post_op_update_inode() should call nfs_refresh_inode() · 68e8a70d
      Trond Myklebust 提交于
      Ensure that we don't clobber the results from a more recent getattr call...
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      68e8a70d
    • T
      NFS: Fix over-conservative attribute invalidation in nfs_update_inode() · f2115dc9
      Trond Myklebust 提交于
      We should always be declaring the attribute cache as valid after having
      updated it.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f2115dc9
    • T
    • F
      Re: [NFS] [PATCH] Attribute timeout handling and wrapping u32 jiffies · c7e15961
      Fabio Olive Leite 提交于
      I would like to discuss the idea that the current checks for attribute
      timeout using time_after are inadequate for 32bit architectures, since
      time_after works correctly only when the two timestamps being compared
      are within 2^31 jiffies of each other. The signed overflow caused by
      comparing values more than 2^31 jiffies apart will flip the result,
      causing incorrect assumptions of validity.
      
      2^31 jiffies is a fairly large period of time (~25 days) when compared
      to the lifetime of most kernel data structures, but for long lived NFS
      mounts that can sit idle for months (think that for some reason autofs
      cannot be used), it is easy to compare inode attribute timestamps with
      very disparate or even bogus values (as in when jiffies have wrapped
      many times, where the comparison doesn't even make sense).
      
      Currently the code tests for attribute timeout by simply adding the
      desired amount of jiffies to the stored timestamp and comparing that
      with the current timestamp of obtained attribute data with time_after.
      This is incorrect, as it returns true for the desired timeout period
      and another full 2^31 range of jiffies.
      
      In testing with artificial jumps (several small jumps, not one big
      crank) of the jiffies I was able to reproduce a problem found in a
      server with very long lived NFS mounts, where attributes would not be
      refreshed even after touching files and directories in the server:
      
      Initial uptime:
      03:42:01 up 6 min, 0 users, load average: 0.01, 0.12, 0.07
      
      NFS volume is mounted and time is advanced:
      03:38:09 up 25 days, 2 min, 0 users, load average: 1.22, 1.05, 1.08
      
      # ls -l /local/A/foo/bar /nfs/A/foo/bar
      -rw-r--r--  1 root root 0 Dec 17 03:38 /local/A/foo/bar
      -rw-r--r--  1 root root 0 Nov 22 00:36 /nfs/A/foo/bar
      
      # touch /local/A/foo/bar
      
      # ls -l /local/A/foo/bar /nfs/A/foo/bar
      -rw-r--r--  1 root root 0 Dec 17 03:47 /local/A/foo/bar
      -rw-r--r--  1 root root 0 Nov 22 00:36 /nfs/A/foo/bar
      
      We can see the local mtime is updated, but the NFS mount still shows
      the old value. The patch below makes it work:
      
      Initial setup...
      07:11:02 up 25 days, 1 min,  0 users,  load average: 0.15, 0.03, 0.04
      
      # ls -l /local/A/foo/bar /nfs/A/foo/bar
      -rw-r--r--  1 root root 0 Jan 11 07:11 /local/A/foo/bar
      -rw-r--r--  1 root root 0 Jan 11 07:11 /nfs/A/foo/bar
      
      # touch /local/A/foo/bar
      
      # ls -l /local/A/foo/bar /nfs/A/foo/bar
      -rw-r--r--  1 root root 0 Jan 11 07:14 /local/A/foo/bar
      -rw-r--r--  1 root root 0 Jan 11 07:14 /nfs/A/foo/bar
      Signed-off-by: NFabio Olive Leite <fleite@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c7e15961
    • P
      64 bit ino support for NFS client · 4e769b93
      Peter Staubach 提交于
      Hi.
      
      Attached is a patch to modify the NFS client code to support
      64 bit ino's, as appropriate for the system and the NFS
      protocol version.
      
      The code basically just expand the NFS interfaces for routines
      which handle ino's from using ino_t to u64 and then uses the
      fileid in the nfs_inode instead of i_ino in the inode.  The
      code paths that were updated are in the getattr method and
      the readdir methods.
      
      This should be no real change on 64 bit platforms.  Since
      the ino_t is an unsigned long, it would already be 64 bits
      wide.
      
          Thanx...
      
                 ps
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4e769b93
    • T
      NFS: Clean up NFS writeback flush code · ed90ef51
      Trond Myklebust 提交于
      The only user of nfs_sync_mapping_range() is nfs_getattr(), which uses it
      to flush out the entire inode without sending a commit. We therefore
      replace nfs_sync_mapping_range with a more appropriate helper.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ed90ef51
  2. 08 8月, 2007 1 次提交
    • T
      NFS: Fix put_nfs_open_context · 5e11934d
      Trond Myklebust 提交于
      We need to grab the inode->i_lock atomically with the last reference put in
      order to remove the open context that is being freed from the
      nfsi->open_files list.
      
      Fix by converting the kref to a standard atomic counter and then using
      atomic_dec_and_lock()...
      
      Thanks to Arnd Bergmann for pointing out the problem.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5e11934d
  3. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  4. 11 7月, 2007 7 次提交
  5. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  6. 17 5月, 2007 1 次提交
    • C
      Remove SLAB_CTOR_CONSTRUCTOR · a35afb83
      Christoph Lameter 提交于
      SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: David Chinner <dgc@sgi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a35afb83
  7. 10 5月, 2007 1 次提交
  8. 08 5月, 2007 1 次提交
    • C
      slab allocators: Remove SLAB_DEBUG_INITIAL flag · 50953fe9
      Christoph Lameter 提交于
      I have never seen a use of SLAB_DEBUG_INITIAL.  It is only supported by
      SLAB.
      
      I think its purpose was to have a callback after an object has been freed
      to verify that the state is the constructor state again?  The callback is
      performed before each freeing of an object.
      
      I would think that it is much easier to check the object state manually
      before the free.  That also places the check near the code object
      manipulation of the object.
      
      Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
      compiled with SLAB debugging on.  If there would be code in a constructor
      handling SLAB_DEBUG_INITIAL then it would have to be conditional on
      SLAB_DEBUG otherwise it would just be dead code.  But there is no such code
      in the kernel.  I think SLUB_DEBUG_INITIAL is too problematic to make real
      use of, difficult to understand and there are easier ways to accomplish the
      same effect (i.e.  add debug code before kfree).
      
      There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
      clear in fs inode caches.  Remove the pointless checks (they would even be
      pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.
      
      This is the last slab flag that SLUB did not support.  Remove the check for
      unimplemented flags from SLUB.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      50953fe9
  9. 15 4月, 2007 1 次提交
  10. 17 3月, 2007 1 次提交
  11. 13 2月, 2007 2 次提交
  12. 04 2月, 2007 1 次提交
  13. 25 1月, 2007 1 次提交
  14. 09 12月, 2006 1 次提交
  15. 08 12月, 2006 2 次提交
  16. 06 12月, 2006 1 次提交
  17. 21 10月, 2006 2 次提交
  18. 27 9月, 2006 3 次提交
  19. 23 9月, 2006 2 次提交