01 May, 2007
8 commits
-
Signed-off-by: Trond Myklebust
-
It has no business touching wbc->pages_skipped.
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
Currently we do write coalescing in a very inefficient manner: one pass in
generic_writepages() in order to lock the pages for writing, then one pass
in nfs_flush_mapping() and/or nfs_sync_mapping_wait() in order to gather
the locked pages for coalescing into RPC requests of size "wsize".In fact, it turns out there is actually a deadlock possible here since we
only start I/O on the second pass. If the user signals the process while
we're in nfs_sync_mapping_wait(), for instance, then we may exit before
starting I/O on all the requests that have been queued up.Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
It is redundant, and will interfere with the call to
balance_dirty_pages_ratelimited_nr in generic_file_write().Signed-off-by: Trond Myklebust
-
Be more careful about testing page->mapping.
Signed-off-by: Trond Myklebust
21 Apr, 2007
4 commits
-
Protect nfs_set_page_dirty() against races with nfs_inode_add_request.
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds -
Redirtying a request that is already marked for commit will screw up the
accounting for NR_UNSTABLE_NFS as well as nfs_i.ncommit.
Ensure that all requests on the commit queue are labelled with the
PG_NEED_COMMIT flag, and avoid moving them onto the dirty list inside
nfs_page_mark_flush().Also inline nfs_mark_request_dirty() into nfs_page_mark_flush() for
atomicity reasons. Avoid dropping the spinlock until we're done marking the
request in the radix tree and have added it to the ->dirty list.Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds -
Ensure that we don't release the PG_writeback lock until after the page has
either been redirtied, or queued on the nfs_inode 'commit' list.Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds -
Get rid of the inlined #ifdefs.
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds
16 Apr, 2007
1 commit
-
We must remove the request from whatever list it is currently on before we
can add it to the dirty list.Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds
15 Apr, 2007
1 commit
-
If the writebacks are cancelled via nfs_cancel_dirty_list, or due to the
memory allocation failing in nfs_flush_one/nfs_flush_multi, then we must
ensure that the PG_writeback flag is cleared.Also ensure that we actually own the PG_writeback flag whenever we
schedule a new writeback by making nfs_set_page_writeback() return the
value of test_set_page_writeback().
The PG_writeback page flag ends up replacing the functionality of the
PG_FLUSHING nfs_page flag, so we rip that out too.Signed-off-by: Trond Myklebust
Cc: Peter Zijlstra
Signed-off-by: Linus Torvalds
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
13 Feb, 2007
1 commit
-
ClearPageUptodate() will just cause races here. What we really want to do
is to invalidate the page cache.Signed-off-by: Trond Myklebust
04 Feb, 2007
5 commits
-
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 -
Signed-off-by: Trond Myklebust
-
Strip out the call to nfs_commit_inode(), and allow that to be done by
nfs_write_inode().Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
09 Dec, 2006
1 commit
-
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the nfs
client code.Signed-off-by: Josef "Jeff" Sipek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
3 commits
-
Replace all uses of kmem_cache_t with struct kmem_cache.
The patch was generated using the following script:
#!/bin/sh
#
# Replace one string by another in all the kernel sources.
#set -e
for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
quilt add $file
sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
mv /tmp/$$ $file
quilt refresh
doneThe script was run like this
sh replace kmem_cache_t "struct kmem_cache"
Signed-off-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
SLAB_NOFS is an alias of GFP_NOFS.
Signed-off-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Dec, 2006
15 commits
-
Signed-off-by: Trond Myklebust
-
There is now no reason to account for the dirty pages in the NFS code,
since the VM code will now do it for us via __set_page_dirty_nobuffers(),
and set_page_writeback().We still need to keep the accounting of stable writes, though.
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
This will ensure that we can call set_page_writeback() from within
nfs_writepage(), which is always called with the page lock set.Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
We will want to allow nfs_writepage() to distinguish between pages that
have been marked as dirty by the VM, and those that have been marked as
dirty by nfs_updatepage().
In the former case, the entire page will want to be written out, and so any
requests that were pending need to be flushed out first.Signed-off-by: Trond Myklebust
-
Maintaining two parallel ways of doing synchronous writes is rather
pointless. This patch gets rid of the legacy nfs_writepage_sync(), and
replaces it with the faster asynchronous writes.Signed-off-by: Trond Myklebust
-
Signed-off-by: Trond Myklebust
-
We always ensure that the nfs_open_context holds a reference to the dentry,
so the test in nfs_writepage() for whether or not the inode is referenced
is redundant.Signed-off-by: Trond Myklebust
-
Clean up a lot of ad-hoc page length calculations in fs/nfs/write.c
Signed-off-by: Trond Myklebust
-
This will allow fast lookup of the nfs_page from the struct page instead of
having to search the radix tree.Signed-off-by: Trond Myklebust
-
Allow callers to directly pass it a struct writeback_control.
Signed-off-by: Trond Myklebust
-
Pass down struct writeback control.
Signed-off-by: Trond Myklebust
-
Make it take a struct writepages argument, and rename to
nfs_flush_mapping().Signed-off-by: Trond Myklebust