17 Mar, 2007

1 commit

  • The current NFS client congestion logic is severly broken, it marks the
    backing device congested during each nfs_writepages() call but doesn't
    mirror this in nfs_writepage() which makes for deadlocks. Also it
    implements its own waitqueue.

    Replace this by a more regular congestion implementation that puts a cap on
    the number of active writeback pages and uses the bdi congestion waitqueue.

    Also always use an interruptible wait since it makes sense to be able to
    SIGKILL the process even for mounts without 'intr'.

    Signed-off-by: Peter Zijlstra
    Acked-by: Trond Myklebust
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

13 Feb, 2007

2 commits


04 Feb, 2007

1 commit

  • Trond, looks like the changes to include/linux/nfs_fs.h in 2.6.18
    that moved the #include's of sunrpc header files into the #ifdef __KERNEL__ block
    disabled nfs debugging for all nfs c file not including any sunrpc header.

    The following patch moves the definition down, right before its use
    for defining ifdebug.

    Signed-off-by: Benny Halevy
    (Moved definition further down into the __KERNEL__ section: Trond)
    Signed-off-by: Trond Myklebust

    Benny Halevy
     

25 Jan, 2007

1 commit


06 Dec, 2006

6 commits


03 Dec, 2006

1 commit


21 Oct, 2006

2 commits

  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • If invalidate_inode_pages2() fails, then it should in principle just be
    because the current process was signalled. In that case, we just want to
    ensure that the inode's page cache remains marked as invalid.

    Also add a helper to allow the O_DIRECT code to simply mark the page cache as
    invalid once it is finished writing, instead of calling
    invalidate_inode_pages2() itself.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

01 Oct, 2006

1 commit

  • This patch vectorizes aio_read() and aio_write() methods to prepare for
    collapsing all aio & vectored operations into one interface - which is
    aio_read()/aio_write().

    Signed-off-by: Badari Pulavarty
    Signed-off-by: Christoph Hellwig
    Cc: Michael Holzheu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     

27 Sep, 2006

1 commit


24 Sep, 2006

1 commit


23 Sep, 2006

5 commits

  • Remove some unused macros related to accessing an RPC peer address

    Test plan:
    Compile kernel with CONFIG_NFS option enabled.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Move the rpc_ops from the nfs_server struct to the nfs_client struct as they're
    common to all server records of a particular NFS protocol version.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     
  • Generalise the nfs_client structure by:

    (1) Moving nfs_client to a more general place (nfs_fs_sb.h).

    (2) Renaming its maintenance routines to be non-NFS4 specific.

    (3) Move those maintenance routines to a new non-NFS4 specific file (client.c)
    and move the declarations to internal.h.

    (4) Make nfs_find/get_client() take a full sockaddr_in to include the port
    number (will be required for NFS2/3).

    (5) Make nfs_find/get_client() take the NFS protocol version (again will be
    required to differentiate NFS2, 3 & 4 client records).

    Also:

    (6) Make nfs_client construction proceed akin to inodes, marking them as under
    construction and providing a function to indicate completion.

    (7) Make nfs_get_client() wait interruptibly if it finds a client that it can
    share, but that client is currently being constructed.

    (8) Make nfs4_create_client() use (6) and (7) instead of locking cl_sem.

    Signed-Off-By: David Howells
    Signed-off-by: Trond Myklebust

    David Howells
     
  • ...in order to allow the addition of a memory shrinker.

    Signed-off-by: Trond Myklebust

    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: Trond Myklebust

    Trond Myklebust
     

13 Sep, 2006

1 commit

  • We don't need any of this crap included from the user-visible part of nfs_fs.h
    -- remove it all.

    In fact, we probably don't need anything but NFS_SUPER_MAGIC to be defined; is
    there any need for anything else? And magic numbers should probably move to
    rather than being strewn across various fs-specific include
    files which exist in userspace for solely that purpose.

    With this patch, 'make header_check' works again at least on PowerPC.

    Signed-off-by: David Woodhouse
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

09 Sep, 2006

1 commit

  • 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: Trond Myklebust
    Cc: Chuck Lever
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

04 Aug, 2006

1 commit

  • nfs_writedata_free() and nfs_readdata_free() can now become static.

    Signed-off-by: Adrian Bunk
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Trond Myklebust
    (cherry picked from 5e1ce40f0c3c8f67591aff17756930d7a18ceb1a commit)

    Adrian Bunk
     

01 Jul, 2006

1 commit


29 Jun, 2006

1 commit


25 Jun, 2006

1 commit

  • Fix various problems with nfs4 disabled. And various other things.

    In file included from fs/nfs/inode.c:50:
    fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration
    include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here
    fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list
    fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want
    fs/nfs/internal.h: In function 'nfs4_path':
    fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
    fs/nfs/inode.c: In function 'init_once':
    fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'open_states'
    fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'delegation'
    fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'delegation_state'
    fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'rwsem'
    distcc[26452] ERROR: compile fs/nfs/inode.c on g5/64 failed
    make[1]: *** [fs/nfs/inode.o] Error 1
    make: *** [fs/nfs/inode.o] Error 2
    make: *** Waiting for unfinished jobs....
    In file included from fs/nfs/nfs3xdr.c:26:
    fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration
    include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here
    fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list
    fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want
    fs/nfs/internal.h: In function 'nfs4_path':
    fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
    distcc[26486] ERROR: compile fs/nfs/nfs3xdr.c on g5/64 failed
    make[1]: *** [fs/nfs/nfs3xdr.o] Error 1
    make: *** [fs/nfs/nfs3xdr.o] Error 2
    In file included from fs/nfs/nfs3proc.c:24:
    fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration
    include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here
    fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list
    fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want
    fs/nfs/internal.h: In function 'nfs4_path':
    fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
    distcc[26469] ERROR: compile fs/nfs/nfs3proc.c on bix/32 failed
    make[1]: *** [fs/nfs/nfs3proc.o] Error 1
    make: *** [fs/nfs/nfs3proc.o] Error 2
    **FAILED**

    Cc: Alexey Dobriyan
    Cc: Andreas Gruenbacher
    Cc: Andy Adamson
    Cc: Chuck Lever
    Cc: David Howells
    Cc: J. Bruce Fields
    Cc: Manoj Naik
    Cc: Marc Eshel
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Trond Myklebust

    Andrew Morton
     

09 Jun, 2006

8 commits


29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

21 Mar, 2006

3 commits

  • Kudos to Neil Brown for spotting the problem:

    "in nfs_sync_inode, there is effectively the sequence:

    nfs_wait_on_requests
    nfs_flush_inode
    nfs_commit_inode

    This seems a bit racy to me as if the only requests are on the
    ->commit list, and nfs_commit_inode is called separately after
    nfs_wait_on_requests completes, and before nfs_commit_inode start
    (say: by nfs_write_inode) then none of these function will return
    >0, yet there will be some pending request that aren't waited for."

    The solution is to search for requests to wait upon, search for dirty
    requests, and search for uncommitted requests while holding the
    nfsi->req_lock

    The patch also cleans up nfs_sync_inode(), getting rid of the redundant
    FLUSH_WAIT flag. It turns out that we were always setting it.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Currently NFS O_DIRECT writes use FILE_SYNC so that a COMMIT is not
    necessary. This simplifies the internal logic, but this could be a
    difficult workload for some servers.

    Instead, let's send UNSTABLE writes, and after they all complete, send a
    COMMIT for the dirty range. After the COMMIT returns successfully, then do
    the wake_up or fire off aio_complete().

    Test plan:
    Async direct I/O tests against Solaris (or any server that requires
    committed unstable writes). Reboot server during test.

    Based on an earlier patch by Chuck Lever

    Signed-off-by: Trond Myklebust

    Trond Myklebust