From: Michael Vrable Date: Wed, 13 Jan 2010 19:35:23 +0000 (-0800) Subject: Continuing rework for async RPC. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=604e560bdd2475c6e9df1eadd1bf2f85d0b07ef2;p=bluesky.git Continuing rework for async RPC. Now NFS server functions are responsible for sending a reply to the client instead of returning a result to the RPC dispatch routine. This will allows the server functions to handle memory cleanup (instead of requiring static data) and allows returns to be decoupled in time from when the request arrives. There is still some static data to clean up, but this moves us much closer to allowing multiple requests in progress at once. --- diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index 693175b..ce8c27e 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -139,14 +139,12 @@ void encode_pre_wcc(struct wcc_data *wcc, BlueSkyInode *inode) wcc->before.pre_op_attr_u.attributes.ctime.nseconds = (inode->ctime % 1000000) * 1000; } -void * -nfsproc3_null_3_svc(void *argp, RPCRequest *req) +void nfsproc3_null_3_svc(void *argp, RPCRequest *req) { - return null_result; + async_rpc_send_reply(req, null_result); } -getattr3res * -nfsproc3_getattr_3_svc(nfs_fh3 *argp, RPCRequest *req) +void nfsproc3_getattr_3_svc(nfs_fh3 *argp, RPCRequest *req) { static getattr3res result; @@ -158,11 +156,10 @@ nfsproc3_getattr_3_svc(nfs_fh3 *argp, RPCRequest *req) result.status = NFS3ERR_STALE; } - return &result; + async_rpc_send_reply(req, &result); } -wccstat3 * -nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) +void nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) { static wccstat3 result; @@ -171,7 +168,8 @@ nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) BlueSkyInode *inode = lookup_fh(&argp->object); if (inode == NULL) { result.status = NFS3ERR_STALE; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&result.wccstat3_u.wcc, inode); @@ -180,7 +178,8 @@ nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) result.status = NFS3ERR_NOT_SYNC; result.wccstat3_u.wcc.after.present = TRUE; encode_fattr3(&result.wccstat3_u.wcc.after.post_op_attr_u.attributes, inode); - return &result; + async_rpc_send_reply(req, &result); + return; } } @@ -191,11 +190,10 @@ nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) inode); result.status = NFS3_OK; - return &result; + async_rpc_send_reply(req, &result); } -lookup3res * -nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) +void nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) { static lookup3res result; @@ -203,7 +201,8 @@ nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.lookup3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } result.lookup3res_u.resfail.present = TRUE; @@ -213,19 +212,22 @@ nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) result.status = NFS3ERR_NAMETOOLONG; else result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } /* TODO: Special-case "." and "..". */ uint64_t inum = bluesky_directory_lookup(dir, argp->name); if (inum == 0) { result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } BlueSkyInode *inode = bluesky_get_inode(fs, inum); if (inode == NULL) { result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } result.status = NFS3_OK; @@ -239,11 +241,10 @@ nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) result.lookup3res_u.resok.object.data.data_len = 8; result.lookup3res_u.resok.object.data.data_val = (char *)&fh_bytes; - return &result; + async_rpc_send_reply(req, &result); } -access3res * -nfsproc3_access_3_svc(access3args *argp, RPCRequest *req) +void nfsproc3_access_3_svc(access3args *argp, RPCRequest *req) { static access3res result; @@ -251,7 +252,8 @@ nfsproc3_access_3_svc(access3args *argp, RPCRequest *req) if (inode == NULL) { result.status = NFS3ERR_STALE; result.access3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } result.status = NFS3_OK; @@ -259,11 +261,10 @@ nfsproc3_access_3_svc(access3args *argp, RPCRequest *req) encode_fattr3(&result.access3res_u.resok.obj_attributes.post_op_attr_u.attributes, inode); result.access3res_u.resok.access = argp->access; - return &result; + async_rpc_send_reply(req, &result); } -readlink3res * -nfsproc3_readlink_3_svc(nfs_fh3 *argp, RPCRequest *req) +void nfsproc3_readlink_3_svc(nfs_fh3 *argp, RPCRequest *req) { static readlink3res result; memset(&result, 0, sizeof(result)); @@ -284,11 +285,10 @@ nfsproc3_readlink_3_svc(nfs_fh3 *argp, RPCRequest *req) result.status = NFS3ERR_STALE; } - return &result; + async_rpc_send_reply(req, &result); } -read3res * -nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) +void nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) { static read3res result; static char buf[32768]; @@ -297,7 +297,8 @@ nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) if (inode == NULL) { result.status = NFS3ERR_STALE; result.read3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } int count = argp->count; @@ -321,11 +322,10 @@ nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) result.read3res_u.resok.data.data_val = buf; result.read3res_u.resok.data.data_len = count; - return &result; + async_rpc_send_reply(req, &result); } -write3res * -nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) +void nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) { static write3res result; struct wcc_data wcc; @@ -335,14 +335,16 @@ nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) if (inode == NULL) { result.status = NFS3ERR_STALE; result.write3res_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&wcc, inode); if (inode->type != BLUESKY_REGULAR) { result.status = NFS3ERR_INVAL; result.write3res_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } uint64_t lastbyte = argp->offset + argp->count; @@ -363,11 +365,10 @@ nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) result.write3res_u.resok.count = argp->count; result.write3res_u.resok.committed = FILE_SYNC; - return &result; + async_rpc_send_reply(req, &result); } -diropres3 * -nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) +void nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -377,14 +378,16 @@ nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&wcc, dir); if (dir->type != BLUESKY_DIRECTORY) { result.status = NFS3ERR_NOTDIR; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } if (!validate_filename(argp->where.name) @@ -393,7 +396,8 @@ nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) { result.status = NFS3ERR_EXIST; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } BlueSkyInode *file; @@ -424,11 +428,10 @@ nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_len = 8; result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_val = (char *)&fh_bytes; - return &result; + async_rpc_send_reply(req, &result); } -diropres3 * -nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) +void nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -438,14 +441,16 @@ nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&wcc, dir); if (dir->type != BLUESKY_DIRECTORY) { result.status = NFS3ERR_NOTDIR; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } if (!validate_filename(argp->where.name) @@ -454,7 +459,8 @@ nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) { result.status = NFS3ERR_EXIST; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } BlueSkyInode *file; @@ -485,11 +491,10 @@ nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_len = 8; result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_val = (char *)&fh_bytes; - return &result; + async_rpc_send_reply(req, &result); } -diropres3 * -nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) +void nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -499,14 +504,16 @@ nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&wcc, dir); if (dir->type != BLUESKY_DIRECTORY) { result.status = NFS3ERR_NOTDIR; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } if (!validate_filename(argp->where.name) @@ -515,7 +522,8 @@ nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) { result.status = NFS3ERR_EXIST; result.diropres3_u.resfail = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } BlueSkyInode *file; @@ -546,21 +554,19 @@ nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_len = 8; result.diropres3_u.resok.obj.post_op_fh3_u.handle.data.data_val = (char *)&fh_bytes; - return &result; + async_rpc_send_reply(req, &result); } -diropres3 * -nfsproc3_mknod_3_svc(mknod3args *argp, RPCRequest *req) +void nfsproc3_mknod_3_svc(mknod3args *argp, RPCRequest *req) { static diropres3 result; result.status = NFS3ERR_NOTSUPP; - return &result; + async_rpc_send_reply(req, &result); } -wccstat3 * -nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) +void nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) { static wccstat3 result; @@ -570,7 +576,8 @@ nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) BlueSkyInode *dir = lookup_fh(&argp->dir); if (dir == NULL) { result.status = NFS3ERR_STALE; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&result.wccstat3_u.wcc, dir); @@ -580,7 +587,8 @@ nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) || strcmp(argp->name, "..") == 0) { result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } /* TODO: Decrement link count, deallocate inode if needed. */ @@ -592,11 +600,10 @@ nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) encode_fattr3(&result.wccstat3_u.wcc.after.post_op_attr_u.attributes, dir); - return &result; + async_rpc_send_reply(req, &result); } -wccstat3 * -nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) +void nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) { static wccstat3 result; @@ -606,7 +613,8 @@ nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) BlueSkyInode *dir = lookup_fh(&argp->dir); if (dir == NULL) { result.status = NFS3ERR_STALE; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&result.wccstat3_u.wcc, dir); @@ -616,25 +624,29 @@ nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) || strcmp(argp->name, "..") == 0) { result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } uint64_t inum = bluesky_directory_lookup(dir, argp->name); BlueSkyInode *inode = bluesky_get_inode(fs, inum); if (inode == NULL) { result.status = NFS3ERR_NOENT; - return &result; + async_rpc_send_reply(req, &result); + return; } if (inode->type != BLUESKY_DIRECTORY) { result.status = NFS3ERR_NOTDIR; - return &result; + async_rpc_send_reply(req, &result); + return; } if (g_sequence_get_length(inode->dirents) > 0) { printf("Directory not empty: %d entries\n", g_sequence_get_length(inode->dirents)); result.status = NFS3ERR_NOTEMPTY; - return &result; + async_rpc_send_reply(req, &result); + return; } /* TODO: Decrement link count, deallocate inode if needed. */ @@ -646,11 +658,10 @@ nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) encode_fattr3(&result.wccstat3_u.wcc.after.post_op_attr_u.attributes, dir); - return &result; + async_rpc_send_reply(req, &result); } -rename3res * -nfsproc3_rename_3_svc(rename3args *argp, RPCRequest *req) +void nfsproc3_rename_3_svc(rename3args *argp, RPCRequest *req) { static rename3res result; wcc_data *wcc1 = &result.rename3res_u.res.fromdir_wcc; @@ -661,14 +672,16 @@ nfsproc3_rename_3_svc(rename3args *argp, RPCRequest *req) BlueSkyInode *dir1 = lookup_fh(&argp->from.dir); if (dir1 == NULL) { result.status = NFS3ERR_STALE; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(wcc1, dir1); BlueSkyInode *dir2 = lookup_fh(&argp->to.dir); if (dir2 == NULL) { result.status = NFS3ERR_STALE; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(wcc2, dir1); @@ -685,11 +698,10 @@ nfsproc3_rename_3_svc(rename3args *argp, RPCRequest *req) else result.status = NFS3ERR_PERM; - return &result; + async_rpc_send_reply(req, &result); } -link3res * -nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) +void nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) { static link3res result; struct wcc_data wcc; @@ -699,21 +711,24 @@ nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) if (inode == NULL) { result.status = NFS3ERR_STALE; result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } BlueSkyInode *dir = lookup_fh(&argp->link.dir); if (dir == NULL) { result.status = NFS3ERR_STALE; result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } encode_pre_wcc(&wcc, dir); if (dir->type != BLUESKY_DIRECTORY) { result.status = NFS3ERR_NOTDIR; result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } if (!validate_filename(argp->link.name) @@ -723,13 +738,15 @@ nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) { result.status = NFS3ERR_EXIST; result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } if (!bluesky_directory_insert(dir, argp->link.name, inode->inum)) { result.status = NFS3ERR_EXIST; result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); + return; } inode->nlink++; bluesky_inode_update_ctime(inode, 0); @@ -741,15 +758,14 @@ nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) encode_fattr3(&result.link3res_u.res.file_attributes.post_op_attr_u.attributes, inode); result.link3res_u.res.linkdir_wcc = wcc; - return &result; + async_rpc_send_reply(req, &result); } gint bluesky_dirent_compare(gconstpointer a, gconstpointer b, gpointer unused); #define MAX_READDIR_DIRENTS 64 -readdir3res * -nfsproc3_readdir_3_svc(readdir3args *argp, RPCRequest *req) +void nfsproc3_readdir_3_svc(readdir3args *argp, RPCRequest *req) { static readdir3res result; @@ -757,7 +773,8 @@ nfsproc3_readdir_3_svc(readdir3args *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.readdir3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } result.status = NFS3_OK; @@ -791,11 +808,10 @@ nfsproc3_readdir_3_svc(readdir3args *argp, RPCRequest *req) result.readdir3res_u.resok.reply.entries = NULL; result.readdir3res_u.resok.reply.eof = g_sequence_iter_is_end(i); - return &result; + async_rpc_send_reply(req, &result); } -readdirplus3res * -nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) +void nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) { /* XDR-encoded sizes: * post_op_attr: 88 bytes @@ -810,7 +826,8 @@ nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) if (dir == NULL) { result.status = NFS3ERR_STALE; result.readdirplus3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } result.status = NFS3_OK; @@ -862,11 +879,10 @@ nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) result.readdirplus3res_u.resok.reply.entries = NULL; result.readdirplus3res_u.resok.reply.eof = g_sequence_iter_is_end(i); - return &result; + async_rpc_send_reply(req, &result); } -fsstat3res * -nfsproc3_fsstat_3_svc(nfs_fh3 *argp, RPCRequest *req) +void nfsproc3_fsstat_3_svc(nfs_fh3 *argp, RPCRequest *req) { static fsstat3res result; @@ -874,7 +890,8 @@ nfsproc3_fsstat_3_svc(nfs_fh3 *argp, RPCRequest *req) if (inode == NULL) { result.status = NFS3ERR_STALE; result.fsstat3res_u.resfail.present = FALSE; - return &result; + async_rpc_send_reply(req, &result); + return; } result.status = NFS3_OK; @@ -889,11 +906,10 @@ nfsproc3_fsstat_3_svc(nfs_fh3 *argp, RPCRequest *req) result.fsstat3res_u.resok.afiles = 0; result.fsstat3res_u.resok.invarsec = 0; - return &result; + async_rpc_send_reply(req, &result); } -fsinfo3res * -nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, RPCRequest *req) +void nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, RPCRequest *req) { static fsinfo3res result; @@ -914,11 +930,10 @@ nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, RPCRequest *req) result.fsinfo3res_u.resok.properties = FSF3_LINK | FSF3_SYMLINK | FSF3_HOMOGENEOUS | FSF3_CANSETTIME; - return &result; + async_rpc_send_reply(req, &result); } -pathconf3res * -nfsproc3_pathconf_3_svc(nfs_fh3 *argp, RPCRequest *req) +void nfsproc3_pathconf_3_svc(nfs_fh3 *argp, RPCRequest *req) { static pathconf3res result; @@ -933,15 +948,14 @@ nfsproc3_pathconf_3_svc(nfs_fh3 *argp, RPCRequest *req) result.pathconf3res_u.resok.case_insensitive = FALSE; result.pathconf3res_u.resok.case_preserving = TRUE; - return &result; + async_rpc_send_reply(req, &result); } -commit3res * -nfsproc3_commit_3_svc(commit3args *argp, RPCRequest *req) +void nfsproc3_commit_3_svc(commit3args *argp, RPCRequest *req) { static commit3res result; result.status = NFS3ERR_NOTSUPP; - return &result; + async_rpc_send_reply(req, &result); } diff --git a/nfs3/nfs3_prot.h b/nfs3/nfs3_prot.h index 0f06618..42b46ba 100644 --- a/nfs3/nfs3_prot.h +++ b/nfs3/nfs3_prot.h @@ -689,49 +689,49 @@ extern void async_rpc_send_reply(RPCRequest *req, void *result); #define NFS_V3 3 #define NFSPROC3_NULL 0 -extern void * nfsproc3_null_3_svc(void *, RPCRequest *); +extern void nfsproc3_null_3_svc(void *, RPCRequest *); #define NFSPROC3_GETATTR 1 -extern getattr3res * nfsproc3_getattr_3_svc(nfs_fh3 *, RPCRequest *); +extern void nfsproc3_getattr_3_svc(nfs_fh3 *, RPCRequest *); #define NFSPROC3_SETATTR 2 -extern wccstat3 * nfsproc3_setattr_3_svc(setattr3args *, RPCRequest *); +extern void nfsproc3_setattr_3_svc(setattr3args *, RPCRequest *); #define NFSPROC3_LOOKUP 3 -extern lookup3res * nfsproc3_lookup_3_svc(diropargs3 *, RPCRequest *); +extern void nfsproc3_lookup_3_svc(diropargs3 *, RPCRequest *); #define NFSPROC3_ACCESS 4 -extern access3res * nfsproc3_access_3_svc(access3args *, RPCRequest *); +extern void nfsproc3_access_3_svc(access3args *, RPCRequest *); #define NFSPROC3_READLINK 5 -extern readlink3res * nfsproc3_readlink_3_svc(nfs_fh3 *, RPCRequest *); +extern void nfsproc3_readlink_3_svc(nfs_fh3 *, RPCRequest *); #define NFSPROC3_READ 6 -extern read3res * nfsproc3_read_3_svc(read3args *, RPCRequest *); +extern void nfsproc3_read_3_svc(read3args *, RPCRequest *); #define NFSPROC3_WRITE 7 -extern write3res * nfsproc3_write_3_svc(write3args *, RPCRequest *); +extern void nfsproc3_write_3_svc(write3args *, RPCRequest *); #define NFSPROC3_CREATE 8 -extern diropres3 * nfsproc3_create_3_svc(create3args *, RPCRequest *); +extern void nfsproc3_create_3_svc(create3args *, RPCRequest *); #define NFSPROC3_MKDIR 9 -extern diropres3 * nfsproc3_mkdir_3_svc(mkdir3args *, RPCRequest *); +extern void nfsproc3_mkdir_3_svc(mkdir3args *, RPCRequest *); #define NFSPROC3_SYMLINK 10 -extern diropres3 * nfsproc3_symlink_3_svc(symlink3args *, RPCRequest *); +extern void nfsproc3_symlink_3_svc(symlink3args *, RPCRequest *); #define NFSPROC3_MKNOD 11 -extern diropres3 * nfsproc3_mknod_3_svc(mknod3args *, RPCRequest *); +extern void nfsproc3_mknod_3_svc(mknod3args *, RPCRequest *); #define NFSPROC3_REMOVE 12 -extern wccstat3 * nfsproc3_remove_3_svc(diropargs3 *, RPCRequest *); +extern void nfsproc3_remove_3_svc(diropargs3 *, RPCRequest *); #define NFSPROC3_RMDIR 13 -extern wccstat3 * nfsproc3_rmdir_3_svc(diropargs3 *, RPCRequest *); +extern void nfsproc3_rmdir_3_svc(diropargs3 *, RPCRequest *); #define NFSPROC3_RENAME 14 -extern rename3res * nfsproc3_rename_3_svc(rename3args *, RPCRequest *); +extern void nfsproc3_rename_3_svc(rename3args *, RPCRequest *); #define NFSPROC3_LINK 15 -extern link3res * nfsproc3_link_3_svc(link3args *, RPCRequest *); +extern void nfsproc3_link_3_svc(link3args *, RPCRequest *); #define NFSPROC3_READDIR 16 -extern readdir3res * nfsproc3_readdir_3_svc(readdir3args *, RPCRequest *); +extern void nfsproc3_readdir_3_svc(readdir3args *, RPCRequest *); #define NFSPROC3_READDIRPLUS 17 -extern readdirplus3res * nfsproc3_readdirplus_3_svc(readdirplus3args *, RPCRequest *); +extern void nfsproc3_readdirplus_3_svc(readdirplus3args *, RPCRequest *); #define NFSPROC3_FSSTAT 18 -extern fsstat3res * nfsproc3_fsstat_3_svc(nfs_fh3 *, RPCRequest *); +extern void nfsproc3_fsstat_3_svc(nfs_fh3 *, RPCRequest *); #define NFSPROC3_FSINFO 19 -extern fsinfo3res * nfsproc3_fsinfo_3_svc(nfs_fh3 *, RPCRequest *); +extern void nfsproc3_fsinfo_3_svc(nfs_fh3 *, RPCRequest *); #define NFSPROC3_PATHCONF 20 -extern pathconf3res * nfsproc3_pathconf_3_svc(nfs_fh3 *, RPCRequest *); +extern void nfsproc3_pathconf_3_svc(nfs_fh3 *, RPCRequest *); #define NFSPROC3_COMMIT 21 -extern commit3res * nfsproc3_commit_3_svc(commit3args *, RPCRequest *); +extern void nfsproc3_commit_3_svc(commit3args *, RPCRequest *); /* the xdr functions */ diff --git a/nfs3/rpc.c b/nfs3/rpc.c index 8eeec30..deabbc1 100644 --- a/nfs3/rpc.c +++ b/nfs3/rpc.c @@ -386,9 +386,6 @@ nfs_program_3(RPCRequest *req) req->xdr_result = _xdr_result; result = (*local)((char *)req->args, req); - /* Encode result and send reply. */ - async_rpc_send_reply(req, result); - bluesky_flushd_invoke(fs); return;