From 44df9877340afef7981696b8012b06cdeeed4550 Mon Sep 17 00:00:00 2001 From: Olga Kornievskaia Date: Tue, 28 Feb 2012 14:18:51 -0500 Subject: [PATCH] updating attrs in nonpnfs file_sync4 writes when we are doing non-pnfs and writing to a netapp filer, even though we write UNSTABLE it returns us FILE_SYNC4. since we were doing unstable writes we were not sending getattrs, and since the data servers we returning stable commits we didn't send commit. in doing so, we never update our attribute cache and had a wrong file size. --- daemon/readwrite.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/readwrite.c b/daemon/readwrite.c index d205a38..5ff208c 100644 --- a/daemon/readwrite.c +++ b/daemon/readwrite.c @@ -234,7 +234,14 @@ retry_write: if (retries--) goto retry_write; goto out_verify_failed; } - } + } else if (stable == UNSTABLE4) { + nfs41_file_info info; + bitmap4 attr_request; + init_getattr_request(&attr_request); + status = nfs41_getattr(session, file, &attr_request, &info); + if (status) + goto out; + } args->ctime = info.change; out: args->out_len = len;