NFS: Fix a commit bug
The new commit code fails to copy the verifier into the wb_verf field of _all_ the nfs_page structures; it only copies it into the first entry. The consequence is that most requests end up failing to match in nfs_commit_release. Fix is to copy the verifier into the req->wb_verf field in nfs_write_completion. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Fred Isaman <iisaman@netapp.com>
This commit is contained in:
@@ -710,12 +710,12 @@ static void nfs_direct_write_completion(struct nfs_pgio_header *hdr)
|
||||
if (dreq->flags == NFS_ODIRECT_RESCHED_WRITES)
|
||||
bit = NFS_IOHDR_NEED_RESCHED;
|
||||
else if (dreq->flags == 0) {
|
||||
memcpy(&dreq->verf, &req->wb_verf,
|
||||
memcpy(&dreq->verf, hdr->verf,
|
||||
sizeof(dreq->verf));
|
||||
bit = NFS_IOHDR_NEED_COMMIT;
|
||||
dreq->flags = NFS_ODIRECT_DO_COMMIT;
|
||||
} else if (dreq->flags == NFS_ODIRECT_DO_COMMIT) {
|
||||
if (memcmp(&dreq->verf, &req->wb_verf, sizeof(dreq->verf))) {
|
||||
if (memcmp(&dreq->verf, hdr->verf, sizeof(dreq->verf))) {
|
||||
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
|
||||
bit = NFS_IOHDR_NEED_RESCHED;
|
||||
} else
|
||||
|
Reference in New Issue
Block a user