X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;ds=sidebyside;f=nfs3%2Fnfs3.c;h=ec5c736a669e67c69f67a076ce5348168b2d68ad;hb=641411b0a7ce9afa309bea28c01320eda913b2d2;hp=b4791070606e73647b514bf12aa7255ace1aa99e;hpb=de946bbcea4c0bc0c92a858eae4d5c668e923c83;p=bluesky.git diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index b479107..ec5c736 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -328,6 +328,8 @@ void nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) memset(&result, 0, sizeof(result)); char buf[NFS_MAXSIZE]; + bluesky_flushd_invoke_conditional(fs); + BlueSkyInode *inode = lookup_fh(req, &argp->file); if (inode == NULL) { result.status = NFS3ERR_STALE; @@ -372,6 +374,8 @@ void nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) struct wcc_data wcc; memset(&wcc, 0, sizeof(wcc)); + bluesky_flushd_invoke_conditional(fs); + BlueSkyInode *inode = lookup_fh(req, &argp->file); if (inode == NULL) { result.status = NFS3ERR_STALE; @@ -380,6 +384,7 @@ void nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) return; } +#if 0 /* FIXME: Hack to throttle writes when there is too much dirty data still * to be written out. */ while (g_atomic_int_get(&fs->cache_dirty) > 4096 @@ -392,6 +397,7 @@ void nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) delay.tv_nsec = 0; nanosleep(&delay, NULL); } +#endif g_mutex_lock(inode->lock);