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);
&& 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);
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);