From: Michael Vrable Date: Thu, 7 Jan 2010 00:29:16 +0000 (-0800) Subject: Implement fsstat. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=9d922eff12f6288a15f17948f625ae3c66238695;p=bluesky.git Implement fsstat. We don't return values that are very useful since there is no real size of the filesystem to report, but do implement the procedure. --- diff --git a/nfs3/nfs3.c b/nfs3/nfs3.c index 70273ff..9fccd00 100644 --- a/nfs3/nfs3.c +++ b/nfs3/nfs3.c @@ -870,7 +870,24 @@ nfsproc3_fsstat_3_svc(nfs_fh3 *argp, struct svc_req *rqstp) { 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; }