diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2013-09-10 19:13:47 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-09-11 12:32:33 -0700 |
commit | 015f1fd479b42b79aac46a5b8d9980c770a32d9e (patch) | |
tree | 5d4dc2a833b5e53c9b16ebf542734785b839f864 | |
parent | 7d9bc0d21408c31651a65a6ec0e67c3b8acd0fde (diff) |
rpc/rpc-lib: rpcsvc should reply when rpc_err is set
Problem:
When requests are received on a connection before setvolume
is done, creating frame from the requests fail because there is
no association of the transport with the conn(i.e. xl_private).
xl_private is set only on set_volume. In such cases error response
is not sent from server xlator to that request because of which
operations on mount point are hanging.
Fix:
Set actor return value to RPCSVC_ACTOR_ERROR so that response is sent
even in these cases.
Change-Id: I74d7bc6849fde6c734008d67c1f4bc9d9f7a84f9
BUG: 1006367
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5892
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 355 |
1 files changed, 179 insertions, 176 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index f0a896131f9..a7995b4c3d4 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -26,6 +26,11 @@ #include "xdr-nfs3.h" +#define SERVER_REQ_SET_ERROR(req, ret) \ + do { \ + rpcsvc_request_seterr (req, GARBAGE_ARGS); \ + ret = RPCSVC_ACTOR_ERROR; \ + } while (0) /* Callback function section */ int @@ -3083,14 +3088,13 @@ server3_3_stat (rpcsvc_request_t *req) ret = xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_stat_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { - // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_STAT; @@ -3098,7 +3102,7 @@ server3_3_stat (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3119,7 +3123,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3141,14 +3145,14 @@ server3_3_setattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_setattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_SETATTR; @@ -3156,7 +3160,7 @@ server3_3_setattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3177,7 +3181,7 @@ server3_3_setattr (rpcsvc_request_t *req) out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); free (args.xdata.xdata_val); @@ -3201,14 +3205,13 @@ server3_3_fsetattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fsetattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { - // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FSETATTR; @@ -3216,7 +3219,7 @@ server3_3_fsetattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3239,7 +3242,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3260,14 +3263,14 @@ server3_3_fallocate(rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fallocate_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FALLOCATE; @@ -3275,7 +3278,7 @@ server3_3_fallocate(rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3299,7 +3302,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3321,14 +3324,14 @@ server3_3_discard(rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_discard_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_DISCARD; @@ -3336,7 +3339,7 @@ server3_3_discard(rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3359,7 +3362,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3381,14 +3384,14 @@ server3_3_readlink (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_readlink_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_READLINK; @@ -3396,7 +3399,7 @@ server3_3_readlink (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3418,7 +3421,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3442,14 +3445,14 @@ server3_3_create (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_create_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_CREATE; @@ -3457,7 +3460,7 @@ server3_3_create (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3489,7 +3492,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3510,14 +3513,14 @@ server3_3_open (rpcsvc_request_t *req) ret = xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_open_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_OPEN; @@ -3525,7 +3528,7 @@ server3_3_open (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3544,7 +3547,7 @@ server3_3_open (rpcsvc_request_t *req) resolve_and_resume (frame, server_open_resume); out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); free (args.xdata.xdata_val); @@ -3567,14 +3570,14 @@ server3_3_readv (rpcsvc_request_t *req) ret = xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_read_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_READ; @@ -3582,7 +3585,7 @@ server3_3_readv (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3607,7 +3610,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3631,14 +3634,14 @@ server3_3_writev (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_write_req); if (len < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_WRITE; @@ -3646,7 +3649,7 @@ server3_3_writev (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3690,7 +3693,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3765,7 +3768,7 @@ server3_3_release (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_release_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3797,13 +3800,13 @@ server3_3_releasedir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_release_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } client = req->trans->xl_private; if (!client) { - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3834,14 +3837,14 @@ server3_3_fsync (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fsync_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FSYNC; @@ -3849,7 +3852,7 @@ server3_3_fsync (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3870,7 +3873,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3893,14 +3896,14 @@ server3_3_flush (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_flush_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FLUSH; @@ -3908,7 +3911,7 @@ server3_3_flush (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3928,7 +3931,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -3951,14 +3954,14 @@ server3_3_ftruncate (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_ftruncate_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FTRUNCATE; @@ -3966,7 +3969,7 @@ server3_3_ftruncate (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -3987,7 +3990,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4009,14 +4012,14 @@ server3_3_fstat (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fstat_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FSTAT; @@ -4024,7 +4027,7 @@ server3_3_fstat (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4044,7 +4047,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4066,14 +4069,14 @@ server3_3_truncate (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_truncate_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_TRUNCATE; @@ -4081,7 +4084,7 @@ server3_3_truncate (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4101,7 +4104,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4126,14 +4129,14 @@ server3_3_unlink (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_unlink_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_UNLINK; @@ -4141,7 +4144,7 @@ server3_3_unlink (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4163,7 +4166,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4188,14 +4191,14 @@ server3_3_setxattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_setxattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_SETXATTR; @@ -4203,7 +4206,7 @@ server3_3_setxattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4236,7 +4239,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); if (dict) dict_unref (dict); @@ -4264,14 +4267,14 @@ server3_3_fsetxattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fsetxattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FSETXATTR; @@ -4279,7 +4282,7 @@ server3_3_fsetxattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4310,7 +4313,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); if (dict) dict_unref (dict); @@ -4338,14 +4341,14 @@ server3_3_fxattrop (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fxattrop_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FXATTROP; @@ -4353,7 +4356,7 @@ server3_3_fxattrop (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4385,7 +4388,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); if (dict) dict_unref (dict); @@ -4414,14 +4417,14 @@ server3_3_xattrop (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_xattrop_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_XATTROP; @@ -4429,7 +4432,7 @@ server3_3_xattrop (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4459,7 +4462,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); if (dict) dict_unref (dict); @@ -4486,14 +4489,14 @@ server3_3_getxattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_getxattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_GETXATTR; @@ -4501,7 +4504,7 @@ server3_3_getxattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4526,7 +4529,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4549,14 +4552,14 @@ server3_3_fgetxattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fgetxattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FGETXATTR; @@ -4564,7 +4567,7 @@ server3_3_fgetxattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4587,7 +4590,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4612,14 +4615,14 @@ server3_3_removexattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_removexattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_REMOVEXATTR; @@ -4627,7 +4630,7 @@ server3_3_removexattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4647,7 +4650,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4670,14 +4673,14 @@ server3_3_fremovexattr (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fremovexattr_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FREMOVEXATTR; @@ -4685,7 +4688,7 @@ server3_3_fremovexattr (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4706,7 +4709,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4730,14 +4733,14 @@ server3_3_opendir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_opendir_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_OPENDIR; @@ -4745,7 +4748,7 @@ server3_3_opendir (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4764,7 +4767,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4787,14 +4790,14 @@ server3_3_readdirp (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_readdirp_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_READDIRP; @@ -4802,7 +4805,7 @@ server3_3_readdirp (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4834,7 +4837,7 @@ server3_3_readdirp (rpcsvc_request_t *req) resolve_and_resume (frame, server_readdirp_resume); out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); free (args.dict.dict_val); @@ -4858,14 +4861,14 @@ server3_3_readdir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_readdir_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_READDIR; @@ -4873,7 +4876,7 @@ server3_3_readdir (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4905,7 +4908,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4926,14 +4929,14 @@ server3_3_fsyncdir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fsyncdir_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FSYNCDIR; @@ -4941,7 +4944,7 @@ server3_3_fsyncdir (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -4962,7 +4965,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -4987,14 +4990,14 @@ server3_3_mknod (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_mknod_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_MKNOD; @@ -5002,7 +5005,7 @@ server3_3_mknod (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5025,7 +5028,7 @@ server3_3_mknod (rpcsvc_request_t *req) out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); /* memory allocated by libc, don't use GF_FREE */ free (args.xdata.xdata_val); @@ -5053,14 +5056,14 @@ server3_3_mkdir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_mkdir_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_MKDIR; @@ -5068,7 +5071,7 @@ server3_3_mkdir (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5091,7 +5094,7 @@ server3_3_mkdir (rpcsvc_request_t *req) out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); free (args.xdata.xdata_val); @@ -5117,14 +5120,14 @@ server3_3_rmdir (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_rmdir_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_RMDIR; @@ -5132,7 +5135,7 @@ server3_3_rmdir (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5154,7 +5157,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5180,14 +5183,14 @@ server3_3_inodelk (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_inodelk_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_INODELK; @@ -5195,7 +5198,7 @@ server3_3_inodelk (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5246,7 +5249,7 @@ out: free (args.flock.lk_owner.lk_owner_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5268,14 +5271,14 @@ server3_3_finodelk (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_finodelk_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FINODELK; @@ -5283,7 +5286,7 @@ server3_3_finodelk (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5335,7 +5338,7 @@ out: free (args.flock.lk_owner.lk_owner_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5360,14 +5363,14 @@ server3_3_entrylk (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_entrylk_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_ENTRYLK; @@ -5375,7 +5378,7 @@ server3_3_entrylk (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5401,7 +5404,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5425,14 +5428,14 @@ server3_3_fentrylk (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_fentrylk_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_FENTRYLK; @@ -5440,7 +5443,7 @@ server3_3_fentrylk (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5466,7 +5469,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5487,14 +5490,14 @@ server3_3_access (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_access_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_ACCESS; @@ -5502,7 +5505,7 @@ server3_3_access (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5522,7 +5525,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5548,14 +5551,14 @@ server3_3_symlink (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_symlink_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_SYMLINK; @@ -5563,7 +5566,7 @@ server3_3_symlink (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5584,7 +5587,7 @@ server3_3_symlink (rpcsvc_request_t *req) out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); /* memory allocated by libc, don't use GF_FREE */ free (args.xdata.xdata_val); @@ -5611,14 +5614,14 @@ server3_3_link (rpcsvc_request_t *req) ret = xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_link_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_LINK; @@ -5626,7 +5629,7 @@ server3_3_link (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5649,7 +5652,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5674,14 +5677,14 @@ server3_3_rename (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_rename_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_RENAME; @@ -5689,7 +5692,7 @@ server3_3_rename (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5713,7 +5716,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5733,14 +5736,14 @@ server3_3_lk (rpcsvc_request_t *req) ret = xdr_to_generic (req->msg[0], &args, (xdrproc_t)xdr_gfs3_lk_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_LK; @@ -5748,7 +5751,7 @@ server3_3_lk (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5818,7 +5821,7 @@ out: free (args.flock.lk_owner.lk_owner_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5840,14 +5843,14 @@ server3_3_rchecksum (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_rchecksum_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_RCHECKSUM; @@ -5855,7 +5858,7 @@ server3_3_rchecksum (rpcsvc_request_t *req) state = CALL_STATE(frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5876,7 +5879,7 @@ out: free (args.xdata.xdata_val); if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } @@ -5913,14 +5916,14 @@ server3_3_lookup (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_lookup_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto err; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto err; } frame->root->op = GF_FOP_LOOKUP; @@ -5932,7 +5935,7 @@ server3_3_lookup (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -5980,14 +5983,14 @@ server3_3_statfs (rpcsvc_request_t *req) (xdrproc_t)xdr_gfs3_statfs_req); if (ret < 0) { //failed to decode msg; - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame = get_frame_from_request (req); if (!frame) { // something wrong, mostly insufficient memory - req->rpc_err = GARBAGE_ARGS; /* TODO */ + SERVER_REQ_SET_ERROR (req, ret); goto out; } frame->root->op = GF_FOP_STATFS; @@ -5995,7 +5998,7 @@ server3_3_statfs (rpcsvc_request_t *req) state = CALL_STATE (frame); if (!state->client->bound_xl) { /* auth failure, request on subvolume without setvolume */ - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); goto out; } @@ -6012,7 +6015,7 @@ server3_3_statfs (rpcsvc_request_t *req) resolve_and_resume (frame, server_statfs_resume); out: if (op_errno) - req->rpc_err = GARBAGE_ARGS; + SERVER_REQ_SET_ERROR (req, ret); return ret; } |