1. 07 Oct, 2008 8 commits
    • Trond Myklebust's avatar
      NFS: Fix nfs_post_op_update_inode_force_wcc() · d65f557f
      Trond Myklebust authored
      If we believe that the attributes are old (see nfs_refresh_inode()), then
      we shouldn't force an update.
      Also ensure that we hold the inode->i_lock across attribute checks and the
      call to nfs_refresh_inode_locked() to ensure that we don't race with other
      attribute updates.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      d65f557f
    • Trond Myklebust's avatar
      NFS: Fix the NFS attribute update · a10ad176
      Trond Myklebust authored
      Currently nfs_refresh_inode() will only update the inode metadata if it
      sees that the RPC call that returned the nfs_fattr was started
      after the last update of the inode. This means that if we have parallel
      RPC calls to the same inode (when sending WRITE calls, for instance), we
      may often miss updates.
      
      This patch attempts to recover those missed updates by also accepting
      them if the ctime in the nfs_fattr is more recent than the inode's
      cached ctime.
      It also recovers the case where the file size has increased, but the
      ctime has not been updated due to limited ctime resolution.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      a10ad176
    • Trond Myklebust's avatar
      NFS: Clean up nfs_refresh_inode() and nfs_post_op_update_inode() · 870a5be8
      Trond Myklebust authored
      Try to avoid taking and dropping the inode->i_lock more than once. Do so by
      moving the code in nfs_refresh_inode() that needs to be done under the
      spinlock into a function nfs_refresh_inode_locked(), and then having both
      nfs_refresh_inode() and nfs_post_op_update_inode() call it directly.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      870a5be8
    • Trond Myklebust's avatar
      NFS: Add mount options for controlling the lookup cache · 7973c1f1
      Trond Myklebust authored
      Add the following NFS-specific mount options to the parser.
      
          -o lookupcache=all          /* Default: cache positive & negative
                                         dentries */
          -o lookupcache=pos[itive]   /* Don't cache negative dentries */
          -o lookupcache=none         /* Strict revalidation of all dentries */
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      7973c1f1
    • Trond Myklebust's avatar
      NFS: Don't apply NFS_MOUNT_FLAGMASK to text-based mounts · ff3525a5
      Trond Myklebust authored
      The point of introducing text-based mounts was to allow us to add
      functionality without having to worry about legacy binary mount formats.
      The mask should be there in order to ensure that binary formats don't start
      enabling features that they cannot support. There is no justification for
      applying it to the text mount path.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      ff3525a5
    • Trond Myklebust's avatar
      NFS: Add options for finer control of the lookup cache · 4eec952e
      Trond Myklebust authored
      Add the flag NFS_MOUNT_LOOKUP_CACHE_NONEG to turn off the caching of
      negative dentries. In reality what we do is to force
      nfs_lookup_revalidate() to always discard negative dentries.
      
      Add the flag NFS_MOUNT_LOOKUP_CACHE_NONE for enforcing stricter
      revalidation of dentries. It forces the revalidate code to always do a
      lookup instead of just checking the cached mtime of the parent directory.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      4eec952e
    • Trond Myklebust's avatar
      NFS: Clean up nfs_sb_active/nfs_sb_deactive · 1daef0a8
      Trond Myklebust authored
      Instead of causing umount requests to block on server->active_wq while the
      asynchronous sillyrename deletes are executing, we can use the sb->s_active
      counter to obtain a reference to the super_block, and then release that
      reference in nfs_async_unlink_release().
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      1daef0a8
    • Trond Myklebust's avatar
      NFS: Fix nfs_file_llseek() · d5e66348
      Trond Myklebust authored
      After the BKL removal patches were applied to the rest of the NFS code, the
      BKL protection in nfs_file_llseek() is no longer sufficient to ensure that
      inode->i_size is read safely in generic_file_llseek_unlocked().
      
      In order to fix the situation, we either have to replace the naked read of
      inode->i_size in generic_file_llseek_unlocked() with i_size_read(), or the
      whole thing needs to be executed under the inode->i_lock;
      In order to avoid disrupting other filesystems, avoid touching
      generic_file_llseek_unlocked() for now...
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      d5e66348
  2. 06 Oct, 2008 13 commits
  3. 05 Oct, 2008 19 commits