X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=nfs3%2Fnfs3.c;h=918da6345ff8702628ecc0e69dcb931155ea504f;hb=4318180e61133422bb3ba0187821e556686da581;hp=7662a2c3094b38e9ccaed61648e50e05a6292bfb;hpb=0e22463e61ea70d8143769b28e908668f6a01e3f;p=bluesky.git diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index 7662a2c..918da63 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -428,9 +428,15 @@ void nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) encode_fattr3(&wcc.after.post_op_attr_u.attributes, inode); result.write3res_u.resok.file_wcc = wcc; result.write3res_u.resok.count = argp->count; - result.write3res_u.resok.committed = FILE_SYNC; + result.write3res_u.resok.committed = UNSTABLE; + memcpy(result.write3res_u.resok.verf, + nfsd_instance_verf_cookie, NFS3_WRITEVERFSIZE); + + if (argp->stable != UNSTABLE) { + bluesky_inode_do_sync(inode); + result.write3res_u.resok.committed = FILE_SYNC; + } - bluesky_inode_do_sync(inode); g_mutex_unlock(inode->lock); async_rpc_send_reply(req, &result); @@ -1006,9 +1012,7 @@ void nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) && dircount + attrcount <= argp->maxcount) { BlueSkyDirent *d = g_sequence_get(i); - BlueSkyInode *inode = bluesky_get_inode(fs, d->inum); - if (inode != NULL) - bluesky_inode_unref(inode); + bluesky_inode_prefetch(fs, d->inum); dircount += 24 + ((strlen(d->name) + 3) & ~3); attrcount += 88 + 8 + 8; i = g_sequence_iter_next(i); @@ -1163,6 +1167,8 @@ void nfsproc3_commit_3_svc(commit3args *argp, RPCRequest *req) result.commit3res_u.resok.file_wcc.after.present = TRUE; encode_fattr3(&result.commit3res_u.resok.file_wcc.after.post_op_attr_u.attributes, inode); + memcpy(result.commit3res_u.resok.verf, + nfsd_instance_verf_cookie, NFS3_WRITEVERFSIZE); g_mutex_unlock(inode->lock);