NFS: fix subtle change in COMMIT behavior
Recent work in the pgio layer made it possible for there to be more than one request per page. This caused a subtle change in commit behavior, because write.c:nfs_commit_unstable_pages compares the number of *pages* waiting for writeback against the number of requests on a commit list to choose when to send a COMMIT in a non-blocking flush. This is probably hard to hit in normal operation - you have to be using rsize/wsize < PAGE_SIZE, or pnfs with lots of boundaries that are not page aligned to have a noticeable change in behavior. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:

committed by
Trond Myklebust

parent
6a74c0c940
commit
cb1410c71e
@@ -163,7 +163,7 @@ struct nfs_inode {
|
||||
*/
|
||||
__be32 cookieverf[2];
|
||||
|
||||
unsigned long npages;
|
||||
unsigned long nrequests;
|
||||
struct nfs_mds_commit_info commit_info;
|
||||
|
||||
/* Open contexts for shared mmap writes */
|
||||
@@ -520,7 +520,7 @@ extern void nfs_commit_free(struct nfs_commit_data *data);
|
||||
static inline int
|
||||
nfs_have_writebacks(struct inode *inode)
|
||||
{
|
||||
return NFS_I(inode)->npages != 0;
|
||||
return NFS_I(inode)->nrequests != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user