X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=nfs3%2Fnfs3.c;h=693175be4b754cfb71b46671895ae8ac5e263948;hb=c3245fe423dd5c3a68b4c1e90ba253e7fae3473e;hp=70273ffd322e50de14e93856bf822785db09fed0;hpb=53162a864578bcfbc2c35cbc59b9395d7108a2fe;p=bluesky.git diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index 70273ff..693175b 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -140,13 +140,13 @@ void encode_pre_wcc(struct wcc_data *wcc, BlueSkyInode *inode) } void * -nfsproc3_null_3_svc(void *argp, struct svc_req *rqstp) +nfsproc3_null_3_svc(void *argp, RPCRequest *req) { return null_result; } getattr3res * -nfsproc3_getattr_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) +nfsproc3_getattr_3_svc(nfs_fh3 *argp, RPCRequest *req) { static getattr3res result; @@ -162,7 +162,7 @@ nfsproc3_getattr_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) } wccstat3 * -nfsproc3_setattr_3_svc(setattr3args *argp, struct svc_req *rqstp) +nfsproc3_setattr_3_svc(setattr3args *argp, RPCRequest *req) { static wccstat3 result; @@ -195,7 +195,7 @@ nfsproc3_setattr_3_svc(setattr3args *argp, struct svc_req *rqstp) } lookup3res * -nfsproc3_lookup_3_svc(diropargs3 *argp, struct svc_req *rqstp) +nfsproc3_lookup_3_svc(diropargs3 *argp, RPCRequest *req) { static lookup3res result; @@ -243,7 +243,7 @@ nfsproc3_lookup_3_svc(diropargs3 *argp, struct svc_req *rqstp) } access3res * -nfsproc3_access_3_svc(access3args *argp, struct svc_req *rqstp) +nfsproc3_access_3_svc(access3args *argp, RPCRequest *req) { static access3res result; @@ -263,7 +263,7 @@ nfsproc3_access_3_svc(access3args *argp, struct svc_req *rqstp) } readlink3res * -nfsproc3_readlink_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) +nfsproc3_readlink_3_svc(nfs_fh3 *argp, RPCRequest *req) { static readlink3res result; memset(&result, 0, sizeof(result)); @@ -288,7 +288,7 @@ nfsproc3_readlink_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) } read3res * -nfsproc3_read_3_svc(read3args *argp, struct svc_req *rqstp) +nfsproc3_read_3_svc(read3args *argp, RPCRequest *req) { static read3res result; static char buf[32768]; @@ -325,7 +325,7 @@ nfsproc3_read_3_svc(read3args *argp, struct svc_req *rqstp) } write3res * -nfsproc3_write_3_svc(write3args *argp, struct svc_req *rqstp) +nfsproc3_write_3_svc(write3args *argp, RPCRequest *req) { static write3res result; struct wcc_data wcc; @@ -367,7 +367,7 @@ nfsproc3_write_3_svc(write3args *argp, struct svc_req *rqstp) } diropres3 * -nfsproc3_create_3_svc(create3args *argp, struct svc_req *rqstp) +nfsproc3_create_3_svc(create3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -428,7 +428,7 @@ nfsproc3_create_3_svc(create3args *argp, struct svc_req *rqstp) } diropres3 * -nfsproc3_mkdir_3_svc(mkdir3args *argp, struct svc_req *rqstp) +nfsproc3_mkdir_3_svc(mkdir3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -489,7 +489,7 @@ nfsproc3_mkdir_3_svc(mkdir3args *argp, struct svc_req *rqstp) } diropres3 * -nfsproc3_symlink_3_svc(symlink3args *argp, struct svc_req *rqstp) +nfsproc3_symlink_3_svc(symlink3args *argp, RPCRequest *req) { static diropres3 result; struct wcc_data wcc; @@ -550,7 +550,7 @@ nfsproc3_symlink_3_svc(symlink3args *argp, struct svc_req *rqstp) } diropres3 * -nfsproc3_mknod_3_svc(mknod3args *argp, struct svc_req *rqstp) +nfsproc3_mknod_3_svc(mknod3args *argp, RPCRequest *req) { static diropres3 result; @@ -560,7 +560,7 @@ nfsproc3_mknod_3_svc(mknod3args *argp, struct svc_req *rqstp) } wccstat3 * -nfsproc3_remove_3_svc(diropargs3 *argp, struct svc_req *rqstp) +nfsproc3_remove_3_svc(diropargs3 *argp, RPCRequest *req) { static wccstat3 result; @@ -596,7 +596,7 @@ nfsproc3_remove_3_svc(diropargs3 *argp, struct svc_req *rqstp) } wccstat3 * -nfsproc3_rmdir_3_svc(diropargs3 *argp, struct svc_req *rqstp) +nfsproc3_rmdir_3_svc(diropargs3 *argp, RPCRequest *req) { static wccstat3 result; @@ -650,7 +650,7 @@ nfsproc3_rmdir_3_svc(diropargs3 *argp, struct svc_req *rqstp) } rename3res * -nfsproc3_rename_3_svc(rename3args *argp, struct svc_req *rqstp) +nfsproc3_rename_3_svc(rename3args *argp, RPCRequest *req) { static rename3res result; wcc_data *wcc1 = &result.rename3res_u.res.fromdir_wcc; @@ -689,7 +689,7 @@ nfsproc3_rename_3_svc(rename3args *argp, struct svc_req *rqstp) } link3res * -nfsproc3_link_3_svc(link3args *argp, struct svc_req *rqstp) +nfsproc3_link_3_svc(link3args *argp, RPCRequest *req) { static link3res result; struct wcc_data wcc; @@ -749,7 +749,7 @@ gint bluesky_dirent_compare(gconstpointer a, gconstpointer b, #define MAX_READDIR_DIRENTS 64 readdir3res * -nfsproc3_readdir_3_svc(readdir3args *argp, struct svc_req *rqstp) +nfsproc3_readdir_3_svc(readdir3args *argp, RPCRequest *req) { static readdir3res result; @@ -795,7 +795,7 @@ nfsproc3_readdir_3_svc(readdir3args *argp, struct svc_req *rqstp) } readdirplus3res * -nfsproc3_readdirplus_3_svc(readdirplus3args *argp, struct svc_req *rqstp) +nfsproc3_readdirplus_3_svc(readdirplus3args *argp, RPCRequest *req) { /* XDR-encoded sizes: * post_op_attr: 88 bytes @@ -866,17 +866,34 @@ nfsproc3_readdirplus_3_svc(readdirplus3args *argp, struct svc_req *rqstp) } fsstat3res * -nfsproc3_fsstat_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) +nfsproc3_fsstat_3_svc(nfs_fh3 *argp, RPCRequest *req) { static fsstat3res result; - result.status = NFS3ERR_NOTSUPP; + BlueSkyInode *inode = lookup_fh(argp); + if (inode == NULL) { + result.status = NFS3ERR_STALE; + result.fsstat3res_u.resfail.present = FALSE; + return &result; + } + + result.status = NFS3_OK; + result.fsstat3res_u.resok.obj_attributes.present = TRUE; + encode_fattr3(&result.fsstat3res_u.resok.obj_attributes.post_op_attr_u.attributes, inode); + + result.fsstat3res_u.resok.tbytes = (1 << 30); + result.fsstat3res_u.resok.fbytes = (1 << 30); + result.fsstat3res_u.resok.abytes = (1 << 30); + result.fsstat3res_u.resok.tfiles = 0; + result.fsstat3res_u.resok.ffiles = 0; + result.fsstat3res_u.resok.afiles = 0; + result.fsstat3res_u.resok.invarsec = 0; return &result; } fsinfo3res * -nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) +nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, RPCRequest *req) { static fsinfo3res result; @@ -901,7 +918,7 @@ nfsproc3_fsinfo_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) } pathconf3res * -nfsproc3_pathconf_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) +nfsproc3_pathconf_3_svc(nfs_fh3 *argp, RPCRequest *req) { static pathconf3res result; @@ -920,7 +937,7 @@ nfsproc3_pathconf_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) } commit3res * -nfsproc3_commit_3_svc(commit3args *argp, struct svc_req *rqstp) +nfsproc3_commit_3_svc(commit3args *argp, RPCRequest *req) { static commit3res result;