diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-21 22:02:00 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-22 02:08:17 +0100 |
commit | b31268ac793fd300da66b9c28bbf0a200339ab96 (patch) | |
tree | 910978e11c5e6d94fb5be82f38cbc6d3ef65c020 /fs/nfs/pagelist.c | |
parent | RPC: killing RPC tasks races fixed (diff) | |
download | linux-b31268ac793fd300da66b9c28bbf0a200339ab96.tar.xz linux-b31268ac793fd300da66b9c28bbf0a200339ab96.zip |
FS: Use stable writes when not doing a bulk flush
If we're only doing a single write, and there are no other unstable
writes being queued up, we might want to just flip to using a stable
write RPC call.
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 23e794410669..fd85618149a1 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -223,6 +223,7 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc, desc->pg_count = 0; desc->pg_bsize = bsize; desc->pg_base = 0; + desc->pg_moreio = 0; desc->pg_inode = inode; desc->pg_doio = doio; desc->pg_ioflags = io_flags; @@ -335,9 +336,11 @@ int nfs_pageio_add_request(struct nfs_pageio_descriptor *desc, struct nfs_page *req) { while (!nfs_pageio_do_add_request(desc, req)) { + desc->pg_moreio = 1; nfs_pageio_doio(desc); if (desc->pg_error < 0) return 0; + desc->pg_moreio = 0; } return 1; } |