1. 23 9月, 2006 5 次提交
    • D
      NFS: Fix up split of fs/nfs/inode.c · 7d4e2747
      David Howells 提交于
      Fix ups for the splitting of the superblock stuff out of fs/nfs/inode.c,
      including:
      
       (*) Move the callback tcpport module param into callback.c.
      
       (*) Move the idmap cache timeout module param into idmap.c.
      
       (*) Changes to internal.h:
      
           (*) namespace-nfs4.c was renamed to nfs4namespace.c.
      
           (*) nfs_stat_to_errno() is in nfs2xdr.c, not nfs4xdr.c.
      
           (*) nfs4xdr.c is contingent on CONFIG_NFS_V4.
      
           (*) nfs4_path() is only uses if CONFIG_NFS_V4 is set.
      
      Plus also:
      
       (*) The sec_flavours[] table should really be const.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      7d4e2747
    • D
      NFS: Add dentry materialisation op · 770bfad8
      David Howells 提交于
      The attached patch adds a new directory cache management function that prepares
      a disconnected anonymous function to be connected into the dentry tree. The
      anonymous dentry is transferred the name and parentage from another dentry.
      
      The following changes were made in [try #2]:
      
       (*) d_materialise_dentry() now switches the parentage of the two nodes around
           correctly when one or other of them is self-referential.
      
      The following changes were made in [try #7]:
      
       (*) d_instantiate_unique() has had the interior part split out as function
           __d_instantiate_unique(). Callers of this latter function must be holding
           the appropriate locks.
      
       (*) _d_rehash() has been added as a wrapper around __d_rehash() to call it
           with the most obvious hash list (the one from the name). d_rehash() now
           calls _d_rehash().
      
       (*) d_materialise_dentry() is now __d_materialise_dentry() and is static.
      
       (*) d_materialise_unique() added to perform the combination of d_find_alias(),
           d_materialise_dentry() and d_add_unique() that the NFS client was doing
           twice, all within a single dcache_lock critical section. This reduces the
           number of times two different spinlocks were being accessed.
      
      The following further changes were made:
      
       (*) Add the dentries onto their parents d_subdirs lists.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      770bfad8
    • T
      NFS: Add an ACCESS cache memory shrinker · 979df72e
      Trond Myklebust 提交于
      A pinned inode may in theory end up filling memory with cached ACCESS
      calls. This patch ensures that the VM may shrink away the cache in these
      particular cases.
      The shrinker works by iterating through the list of inodes on the global
      nfs_access_lru_list, and removing the least recently used access
      cache entry until it is done (or until the entire cache is empty).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      979df72e
    • T
      NFS: Add a global LRU list for the ACCESS cache · cfcea3e8
      Trond Myklebust 提交于
      ...in order to allow the addition of a memory shrinker.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cfcea3e8
    • T
      NFS: Add a new ACCESS rpc call cache to the linux nfs client · 1c3c07e9
      Trond Myklebust 提交于
      The current access cache only allows one entry at a time to be cached for each
      inode. Add a per-inode red-black tree in order to allow more than one to
      be cached at a time.
      
      Should significantly cut down the time spent in path traversal for shared
      directories such as ${PATH}, /usr/share, etc.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1c3c07e9
  2. 22 9月, 2006 2 次提交
  3. 21 9月, 2006 14 次提交
  4. 19 9月, 2006 4 次提交
  5. 17 9月, 2006 4 次提交
  6. 16 9月, 2006 1 次提交
  7. 09 9月, 2006 2 次提交
    • T
      [PATCH] NFS: large non-page-aligned direct I/O clobbers memory · e9f7bee1
      Trond Myklebust 提交于
      The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can
      allow data->npages to be one larger than rpages.  This causes a page
      pointer to be written beyond the end of the pagevec in nfs_read_data (or
      nfs_write_data).
      
      Fix this by making nfs_(read|write)_alloc() calculate the size of the
      pagevec array, and initialise data->npages.
      
      Also get rid of the redundant argument to nfs_commit_alloc().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e9f7bee1
    • B
      [PATCH] ext3_getblk() should handle HOLE correctly · 3665d0e5
      Badari Pulavarty 提交于
      It has been reported that ext3_getblk() is not doing the right thing and
      triggering following WARN():
      
      BUG: warning at fs/ext3/inode.c:1016/ext3_getblk()
       <c01c5140> ext3_getblk+0x98/0x2a6  <c03b2806> md_wakeup_thread+0x26/0x2a
       <c01c536d> ext3_bread+0x1f/0x88  <c01cedf9> ext3_quota_read+0x136/0x1ae
       <c018b683> v1_read_dqblk+0x61/0xac  <c0188f32> dquot_acquire+0xf6/0x107
       <c01ceaba> ext3_acquire_dquot+0x46/0x68  <c01897d4> dqget+0x155/0x1e7
       <c018a97b> dquot_transfer+0x3e0/0x3e9  <c016fe52> dput+0x23/0x13e
       <c01c7986> ext3_setattr+0xc3/0x240  <c0120f66> current_fs_time+0x52/0x6a
       <c017320e> notify_change+0x2bd/0x30d  <c0159246> chown_common+0x9c/0xc5
       <c02a222c> strncpy_from_user+0x3b/0x68  <c0167fe6> do_path_lookup+0xdf/0x266
       <c016841b> __user_walk_fd+0x44/0x5a  <c01592b9> sys_chown+0x4a/0x55
       <c015a43c> vfs_write+0xe7/0x13c  <c01695d4> sys_mkdir+0x1f/0x23
       <c0102a97> syscall_call+0x7/0xb
      
      Looking at the code, it looks like it's not handle HOLE correctly.  It ends
      up returning -EIO.  Here is the patch to fix it.
      
      If we really want to be paranoid, we can allow return values 0 (HOLE), 1
      (we asked for one block) and return -EIO for more than 1 block.  But I
      really don't see a reason for doing it - all we need is the block# here.
      (doesn't matter how many blocks are mapped).
      
      ext3_get_blocks_handle() returns number of blocks it mapped.  It returns 0
      in case of HOLE.  ext3_getblk() should handle HOLE properly (currently its
      dumping warning stack and returning -EIO).
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Acked-by: NMingming Cao <cmm@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3665d0e5
  8. 07 9月, 2006 6 次提交
  9. 02 9月, 2006 1 次提交
  10. 30 8月, 2006 1 次提交