check write verifiers on COMMIT

we were previously only verifying that the server didn't reboot between WRITEs.  COMMIT returns a verifier that needs to be checked as well

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-09-14 11:49:34 -04:00 committed by unknown
parent d646e5c58c
commit f435606a16
8 changed files with 49 additions and 19 deletions

View file

@ -127,6 +127,17 @@ bool_t verify_write(
return 0;
}
bool_t verify_commit(
IN nfs41_write_verf *verf)
{
if (memcmp(verf->expected, verf->verf, NFS4_VERIFIER_SIZE) == 0) {
dprintf(3, "verify_commit: verifier matches expected\n");
return 1;
}
dprintf(2, "verify_commit: verifier changed; writes have been lost!\n");
return 0;
}
ULONG nfs_file_info_to_attributes(
IN const nfs41_file_info *info)
{