10 Oct, 2007

2 commits


20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 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: Paul Mundt

    Paul Mundt
     

11 Jul, 2007

3 commits


31 May, 2007

1 commit

  • The current code is leaking a reference to dreq->kref when the calls to
    nfs_direct_read_schedule() and nfs_direct_write_schedule() return an
    error.
    This patch moves the call to kref_put() from nfs_direct_wait() back into
    nfs_direct_read() and nfs_direct_write() (which are the functions that
    actually took the reference in the first place) fixing the leak.

    Thanks to Denis V. Lunev for spotting the bug and proposing the original
    fix.

    Acked-by: Denis V. Lunev
    Acked-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

24 May, 2007

2 commits

  • We only need to dirty the pages that were actually read in.

    Also convert nfs_direct_dirty_pages() to call set_page_dirty() instead of
    set_page_dirty_lock(). A call to lock_page() is unacceptable in an rpciod
    callback function.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • This patch fixes a couple of signage issues that were causing an Oops
    when running the LTP diotest4 test. get_user_pages() returns a signed
    error, hence we need to be careful when comparing with the unsigned
    number of pages from data->npages.

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

    Chuck Lever
     

09 May, 2007

1 commit


01 May, 2007

1 commit


15 Apr, 2007

1 commit

  • Do not flag an error if the COMMIT call fails and we decide to resend the
    writes. Let the resend flag the error if it fails.

    If a write has failed, then nfs_direct_write_result should not attempt to
    send a commit. It should just exit asap and return the error to the user.

    Signed-off-by: Trond Myklebust
    Cc: Chuck Lever
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     

04 Feb, 2007

1 commit

  • The tk_pid field is an unsigned short. The proper print format specifier for
    that type is %5u, not %4d.

    Also clean up some miscellaneous print formatting nits.

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

    Chuck Lever
     

09 Dec, 2006

1 commit


08 Dec, 2006

3 commits


06 Dec, 2006

1 commit


21 Oct, 2006

2 commits

  • 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
     
  • If the RPC call tanked, we should not be checking the return value
    of data->res.verf->committed, since it is unlikely to even be
    initialised.

    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

  • * Rougly half of callers already do it by not checking return value
    * Code in drivers/acpi/osl.c does the following to be sure:

    (void)kmem_cache_destroy(cache);

    * Those who check it printk something, however, slab_error already printed
    the name of failed cache.
    * XFS BUGs on failed kmem_cache_destroy which is not the decision
    low-level filesystem driver should make. Converted to ignore.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

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 Jul, 2006

1 commit


01 Jul, 2006

1 commit


29 Jun, 2006

1 commit

  • This reverts ccf01ef7aa9c6c293a1c64c27331a2ce227916ec commit.

    No idea how git managed this one: when I asked it to merge the odirect
    topic branch it actually generated a patch which reverted the change.

    Reverting the 'merge' will once again reveal Chuck's recent NFS/O_DIRECT
    work to the world.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

28 Jun, 2006

1 commit

  • Builds on ARM report link problems with common configurations like
    statically linked NFS (for nfsroot). The symptom is that __init
    section code references __exit section code; that won't work since
    the exit sections are discarded (since they can never be called).

    The best fix for these particular cases would be an "__init_or_exit"
    section annotation.

    Signed-off-by: David Brownell
    Acked-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    David Brownell
     

25 Jun, 2006

7 commits

  • Trond Myklebust
     
  • Re-arrange the logic in the NFS direct I/O path so that nfs_read/write_data
    structs are allocated just before they are scheduled, rather than
    allocating them all at once before we start scheduling requests.

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

    Chuck Lever
     
  • Neil Brown observed that the kmalloc() in nfs_get_user_pages() is more
    likely to fail if the I/O is large enough to require the allocation of more
    than a single page to keep track of all the pinned pages in the user's
    buffer.

    Instead of tracking one large page array per dreq/iocb, track pages per
    nfs_read/write_data, just like the cached I/O path does. An array for
    pages is already allocated for us by nfs_readdata_alloc() (and the write
    and commit equivalents).

    This is also required for adding support for vectored I/O to the NFS direct
    I/O path.

    The original reason to pin the user buffer and allocate all the NFS data
    structures before trying to schedule I/O was to ensure all needed resources
    are allocated on the client before starting to send requests. This reduces
    the chance that resource exhaustion on the client will cause a short read
    or write.

    On the other hand, for an application making very large application I/O
    requests, this means that it will be nearly impossible for the application
    to make forward progress on a resource-limited client.

    Thus, moving the buffer pinning functionality into the I/O scheduling
    loops should be good for scalability. The next patch will do the same for
    NFS data structure allocation.

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

    Chuck Lever
     
  • Clean-up and fix a minor bug: the logic was dirtying page cache pages on
    both read and write operations.

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

    Chuck Lever
     
  • Make the user_addr, user_count, and pos parameters explicit to the
    scheduler routines, and remove the fields from nfs_direct_req. The
    iovec API will be passing in a series of these, not just one set.

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

    Chuck Lever
     
  • An NFSv3/v4 client must reschedule on-the-wire writes if the writes are
    UNSTABLE, and the server reboots before the client can complete a
    subsequent COMMIT request.

    To support direct asynchronous scatter-gather writes, the write
    rescheduler in fs/nfs/direct.c must not depend on the I/O parameters
    in the controlling nfs_direct_req structure. iovecs can be somewhat
    arbitrarily complex, so there could be an unbounded amount of information
    to save for a rarely encountered requirement.

    Refactor the direct write rescheduler so it uses information from each
    nfs_write_data structure to reschedule writes, instead of caching that
    information in the controlling nfs_direct_req structure.

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

    Chuck Lever
     
  • Factor out the logic that increments and decrements the outstanding I/O
    count. This will be a commonly used bit of code in upcoming patches.
    Also make this an atomic_t again, since it will be very often manipulated
    outside dreq->spin lock.

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

    Chuck Lever
     

09 Jun, 2006

1 commit

  • As fs/nfs/inode.c is rather large, heterogenous and unwieldy, the attached
    patch splits it up into a number of files:

    (*) fs/nfs/inode.c

    Strictly inode specific functions.

    (*) fs/nfs/super.c

    Superblock management functions for NFS and NFS4, normal access, clones
    and referrals. The NFS4 superblock functions _could_ move out into a
    separate conditionally compiled file, but it's probably not worth it as
    there're so many common bits.

    (*) fs/nfs/namespace.c

    Some namespace-specific functions have been moved here.

    (*) fs/nfs/nfs4namespace.c

    NFS4-specific namespace functions (this could be merged into the previous
    file). This file is conditionally compiled.

    (*) fs/nfs/internal.h

    Inter-file declarations, plus a few simple utility functions moved from
    fs/nfs/inode.c.

    Additionally, all the in-.c-file externs have been moved here, and those
    files they were moved from now includes this file.

    For the most part, the functions have not been changed, only some multiplexor
    functions have changed significantly.

    I've also:

    (*) Added some extra banner comments above some functions.

    (*) Rearranged the function order within the files to be more logical and
    better grouped (IMO), though someone may prefer a different order.

    (*) Reduced the number of #ifdefs in .c files.

    (*) Added missing __init and __exit directives.

    Signed-Off-By: David Howells

    David Howells
     

20 Apr, 2006

1 commit


26 Mar, 2006

1 commit

  • * git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits)
    SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies
    SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc
    LOCKD: Make nlmsvc_traverse_shares return void
    LOCKD: nlmsvc_traverse_blocks return is unused
    SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers.
    NFSv4: Dont list system.nfs4_acl for filesystems that don't support it.
    SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum
    SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release()
    SUNRPC: Fix memory barriers for req->rq_received
    NFS: Fix a race in nfs_sync_inode()
    NFS: Clean up nfs_flush_list()
    NFS: Fix a race with PG_private and nfs_release_page()
    NFSv4: Ensure the callback daemon flushes signals
    SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs
    NFS, NLM: Allow blocking locks to respect signals
    NFS: Make nfs_fhget() return appropriate error values
    NFSv4: Fix an oops in nfs4_fill_super
    lockd: blocks should hold a reference to the nlm_file
    NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
    NFSv4: Send the delegation stateid for SETATTR calls
    ...

    Linus Torvalds
     

24 Mar, 2006

2 commits

  • Rewrap the overly long source code lines resulting from the previous
    patch's addition of the slab cache flag SLAB_MEM_SPREAD. This patch
    contains only formatting changes, and no function change.

    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     
  • Mark file system inode and similar slab caches subject to SLAB_MEM_SPREAD
    memory spreading.

    If a slab cache is marked SLAB_MEM_SPREAD, then anytime that a task that's
    in a cpuset with the 'memory_spread_slab' option enabled goes to allocate
    from such a slab cache, the allocations are spread evenly over all the
    memory nodes (task->mems_allowed) allowed to that task, instead of favoring
    allocation on the node local to the current cpu.

    The following inode and similar caches are marked SLAB_MEM_SPREAD:

    file cache
    ==== =====
    fs/adfs/super.c adfs_inode_cache
    fs/affs/super.c affs_inode_cache
    fs/befs/linuxvfs.c befs_inode_cache
    fs/bfs/inode.c bfs_inode_cache
    fs/block_dev.c bdev_cache
    fs/cifs/cifsfs.c cifs_inode_cache
    fs/coda/inode.c coda_inode_cache
    fs/dquot.c dquot
    fs/efs/super.c efs_inode_cache
    fs/ext2/super.c ext2_inode_cache
    fs/ext2/xattr.c (fs/mbcache.c) ext2_xattr
    fs/ext3/super.c ext3_inode_cache
    fs/ext3/xattr.c (fs/mbcache.c) ext3_xattr
    fs/fat/cache.c fat_cache
    fs/fat/inode.c fat_inode_cache
    fs/freevxfs/vxfs_super.c vxfs_inode
    fs/hpfs/super.c hpfs_inode_cache
    fs/isofs/inode.c isofs_inode_cache
    fs/jffs/inode-v23.c jffs_fm
    fs/jffs2/super.c jffs2_i
    fs/jfs/super.c jfs_ip
    fs/minix/inode.c minix_inode_cache
    fs/ncpfs/inode.c ncp_inode_cache
    fs/nfs/direct.c nfs_direct_cache
    fs/nfs/inode.c nfs_inode_cache
    fs/ntfs/super.c ntfs_big_inode_cache_name
    fs/ntfs/super.c ntfs_inode_cache
    fs/ocfs2/dlm/dlmfs.c dlmfs_inode_cache
    fs/ocfs2/super.c ocfs2_inode_cache
    fs/proc/inode.c proc_inode_cache
    fs/qnx4/inode.c qnx4_inode_cache
    fs/reiserfs/super.c reiser_inode_cache
    fs/romfs/inode.c romfs_inode_cache
    fs/smbfs/inode.c smb_inode_cache
    fs/sysv/inode.c sysv_inode_cache
    fs/udf/super.c udf_inode_cache
    fs/ufs/super.c ufs_inode_cache
    net/socket.c sock_inode_cache
    net/sunrpc/rpc_pipe.c rpc_inode_cache

    The choice of which slab caches to so mark was quite simple. I marked
    those already marked SLAB_RECLAIM_ACCOUNT, except for fs/xfs, dentry_cache,
    inode_cache, and buffer_head, which were marked in a previous patch. Even
    though SLAB_RECLAIM_ACCOUNT is for a different purpose, it marks the same
    potentially large file system i/o related slab caches as we need for memory
    spreading.

    Given that the rule now becomes "wherever you would have used a
    SLAB_RECLAIM_ACCOUNT slab cache flag before (usually the inode cache), use
    the SLAB_MEM_SPREAD flag too", this should be easy enough to maintain.
    Future file system writers will just copy one of the existing file system
    slab cache setups and tend to get it right without thinking.

    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     

21 Mar, 2006

1 commit