1. 21 3月, 2006 8 次提交
  2. 11 1月, 2006 1 次提交
    • C
      [PATCH] per-mountpoint noatime/nodiratime · fc33a7bb
      Christoph Hellwig 提交于
      Turn noatime and nodiratime into per-mount instead of per-sb flags.
      
      After all the preparations this is a rather trivial patch.  The mount code
      needs to treat the two options as per-mount instead of per-superblock, and
      touch_atime needs to be changed to check the new MNT_ flags in addition to
      the MS_ flags that are kept for filesystems that are always
      noatime/nodiratime but not user settable anymore.  Besides that core code
      only nfs needed an update because it's leaving atime updates to the server
      and thus sets the S_NOATIME flag on every inode, but needs to know whether
      it's a real noatime mount for an getattr optimization.
      
      While we're at it I've killed the IS_NOATIME/IS_NODIRATIME macros that were
      only used by touch_atime.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fc33a7bb
  3. 09 1月, 2006 1 次提交
    • O
      [PATCH] Fix and add EXPORT_SYMBOL(filemap_write_and_wait) · 28fd1298
      OGAWA Hirofumi 提交于
      This patch add EXPORT_SYMBOL(filemap_write_and_wait) and use it.
      
      See mm/filemap.c:
      
      And changes the filemap_write_and_wait() and filemap_write_and_wait_range().
      
      Current filemap_write_and_wait() doesn't wait if filemap_fdatawrite()
      returns error.  However, even if filemap_fdatawrite() returned an
      error, it may have submitted the partially data pages to the device.
      (e.g. in the case of -ENOSPC)
      
      <quotation>
      Andrew Morton writes,
      
      If filemap_fdatawrite() returns an error, this might be due to some
      I/O problem: dead disk, unplugged cable, etc.  Given the generally
      crappy quality of the kernel's handling of such exceptions, there's a
      good chance that the filemap_fdatawait() will get stuck in D state
      forever.
      </quotation>
      
      So, this patch doesn't wait if filemap_fdatawrite() returns the -EIO.
      
      Trond, could you please review the nfs part?  Especially I'm not sure,
      nfs must use the "filemap_fdatawrite(inode->i_mapping) == 0", or not.
      Acked-by: NTrond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      28fd1298
  4. 07 1月, 2006 10 次提交
  5. 20 12月, 2005 1 次提交
  6. 04 12月, 2005 2 次提交
    • T
      NFS: Fix a few further cache consistency regressions · 24aa1fe6
      Trond Myklebust 提交于
       Steve Dickson writes:
       Doing the following:
       1. On server:
       $ mkdir ~/t
       $ echo Hello > ~/t/tmp
      
       2. On client, wait for a string to appear in this file:
       $ until grep -q foo t/tmp ; do echo -n . ; sleep 1 ; done
      
       3. On server, create a *new* file with the same name containing that
       string:
       $ mv ~/t/tmp ~/t/tmp.old; echo foo > ~/t/tmp
      
       will show how the client will never (and I mean never ;-) ) see
       the updated file.
      
       The problem is that we do not update nfsi->cache_change_attribute when the
       file changes on the server (we only update it when our client makes the
       changes). This again means that functions like nfs_check_verifier() will
       fail to register when the parent directory has changed and should trigger
       a dentry lookup revalidation.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      24aa1fe6
    • S
      NFS: Fix cache consistency regression · 223db122
      Steve Dickson 提交于
       Make sure cache_change_attribute is initialized to jiffies
       so when the mtime changes on directory, the directory
       will be refreshed.
      
       Signed-off by: Steve Dickson <steved@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      223db122
  7. 26 11月, 2005 1 次提交
    • T
      NFS: Fix a spinlock recursion inside nfs_update_inode() · b37b03b7
      Trond Myklebust 提交于
       In cases where the server has gone insane, nfs_update_inode() may end
       up calling nfs_invalidate_inode(), which again calls stuff that takes
       the inode->i_lock that we're already holding.
      
       In addition, given the sort of things we have in NFS these days that
       need to be cleaned up on inode release, I'm not sure we should ever
       be calling make_bad_inode().
      
       Fix up spinlock recursion, and limit nfs_invalidate_inode() to clearing
       the caches, and marking the inode as being stale.
      
       Thanks to Steve Dickson <SteveD@redhat.com> for spotting this.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b37b03b7
  8. 07 11月, 2005 1 次提交
  9. 05 11月, 2005 1 次提交
    • T
      NFSv4: Fix problem with OPEN_DOWNGRADE · d530838b
      Trond Myklebust 提交于
       RFC 3530 states that for OPEN_DOWNGRADE "The share_access and share_deny
       bits specified must be exactly equal to the union of the share_access and
       share_deny bits specified for some subset of the OPENs in effect for
       current openowner on the current file.
      
       Setattr is currently violating the NFSv4 rules for OPEN_DOWNGRADE in that
       it may cause a downgrade from OPEN4_SHARE_ACCESS_BOTH to
       OPEN4_SHARE_ACCESS_WRITE despite the fact that there exists no open file
       with O_WRONLY access mode.
      
       Fix the problem by replacing nfs4_find_state() with a modified version of
       nfs_find_open_context().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      d530838b
  10. 31 10月, 2005 1 次提交
  11. 28 10月, 2005 4 次提交
  12. 19 10月, 2005 2 次提交
  13. 18 10月, 2005 2 次提交
  14. 24 9月, 2005 3 次提交
  15. 10 9月, 2005 1 次提交
  16. 19 8月, 2005 1 次提交
    • C
      [PATCH] NFS: Introduce the use of inode->i_lock to protect fields in nfsi · dc59250c
      Chuck Lever 提交于
      Down the road we want to eliminate the use of the global kernel lock entirely
      from the NFS client.  To do this, we need to protect the fields in the
      nfs_inode structure adequately.  Start by serializing updates to the
      "cache_validity" field.
      
      Note this change addresses an SMP hang found by njw@osdl.org, where processes
      deadlock because nfs_end_data_update and nfs_revalidate_mapping update the
      "cache_validity" field without proper serialization.
      
      Test plan:
       Millions of fsx ops on SMP clients.  Run Nick Wilson's breaknfs program on
       large SMP clients.
      Signed-off-by: NChuck Lever <cel@netapp.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dc59250c