upcall: added upcall_cleanup() to interface

added call to upcall_cleanup() after both upcall_marshall() and upcall_cancel()
individual upcall operations define their nfs41_upcall_op structs locally, instead of putting tons of function prototypes in upcall.c
made the upcall_marshall() function optional; most marshall functions are noops

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-27 09:22:20 -04:00 committed by unknown
parent 7e7f73766d
commit ae4c67c21e
12 changed files with 189 additions and 166 deletions

View file

@ -57,7 +57,8 @@ int nfs41_cached_getattr(
return status;
}
int parse_getattr(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
/* NFS41_FILE_QUERY */
static int parse_getattr(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
{
int status;
getattr_upcall_args *args = &upcall->args.getattr;
@ -78,7 +79,7 @@ out:
return status;
}
int handle_getattr(nfs41_upcall *upcall)
static int handle_getattr(nfs41_upcall *upcall)
{
int status;
getattr_upcall_args *args = &upcall->args.getattr;
@ -122,7 +123,7 @@ out:
return status;
}
int marshall_getattr(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
static int marshall_getattr(unsigned char *buffer, uint32_t *length, nfs41_upcall *upcall)
{
int status;
getattr_upcall_args *args = &upcall->args.getattr;
@ -158,3 +159,10 @@ int marshall_getattr(unsigned char *buffer, uint32_t *length, nfs41_upcall *upca
out:
return status;
}
const nfs41_upcall_op nfs41_op_getattr = {
parse_getattr,
handle_getattr,
marshall_getattr
};