summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client.c29
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c85
-rw-r--r--xlators/protocol/legacy/client/src/client-protocol.c67
-rw-r--r--xlators/protocol/legacy/server/src/server-protocol.c80
-rw-r--r--xlators/protocol/lib/src/glusterfs-xdr.c33
-rw-r--r--xlators/protocol/lib/src/glusterfs-xdr.h27
-rw-r--r--xlators/protocol/lib/src/glusterfs3.x15
-rw-r--r--xlators/protocol/lib/src/msg-xdr.c28
-rw-r--r--xlators/protocol/lib/src/msg-xdr.h11
-rw-r--r--xlators/protocol/lib/src/protocol-common.h1
-rw-r--r--xlators/protocol/server/src/server.c73
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c97
12 files changed, 11 insertions, 535 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index bad814a8198..6ad5944007f 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -1169,34 +1169,6 @@ out:
int32_t
-client_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc,
- int32_t flag)
-{
- int ret = -1;
- clnt_conf_t *conf = NULL;
- rpc_clnt_procedure_t *proc = NULL;
- clnt_args_t args = {0,};
-
- conf = this->private;
- if (!conf->fops)
- goto out;
-
- args.loc = loc;
- args.flags = flag;
-
- proc = &conf->fops->proctable[GF_FOP_CHECKSUM];
- if (proc->fn)
- ret = proc->fn (frame, this, &args);
-out:
- if (ret)
- STACK_UNWIND_STRICT (checksum, frame, -1, ENOTCONN, NULL, NULL);
-
- return 0;
-}
-
-
-
-int32_t
client_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
int32_t len)
{
@@ -1741,7 +1713,6 @@ struct xlator_fops fops = {
.entrylk = client_entrylk,
.fentrylk = client_fentrylk,
.lookup = client_lookup,
- .checksum = client_checksum,
.rchecksum = client_rchecksum,
.xattrop = client_xattrop,
.fxattrop = client_fxattrop,
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index 5204ef032da..07145a097cd 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -1549,47 +1549,6 @@ out:
}
int
-client3_1_checksum_cbk (struct rpc_req *req, struct iovec *iov, int count,
- void *myframe)
-{
- call_frame_t *frame = NULL;
- gfs3_checksum_rsp rsp = {0,};
- int ret = 0;
-
- frame = myframe;
-
- if (-1 == req->rpc_status) {
- rsp.op_ret = -1;
- rsp.op_errno = ENOTCONN;
- goto out;
- }
-
- ret = xdr_to_checksum_rsp (*iov, &rsp);
- if (ret < 0) {
- gf_log ("", GF_LOG_ERROR, "error");
- rsp.op_ret = -1;
- rsp.op_errno = EINVAL;
- goto out;
- }
-
-out:
- STACK_UNWIND_STRICT (checksum, frame, rsp.op_ret,
- gf_error_to_errno (rsp.op_errno),
- (uint8_t *)rsp.fchecksum.fchecksum_val,
- (uint8_t *)rsp.dchecksum.dchecksum_val);
-
- /* This is allocated by the libc while decoding RPC msg */
- /* Hence no 'GF_FREE', but just 'free' */
- if (rsp.fchecksum.fchecksum_val) {
- free (rsp.fchecksum.fchecksum_val);
- }
- if (rsp.dchecksum.dchecksum_val) {
- free (rsp.dchecksum.dchecksum_val);
- }
- return 0;
-}
-
-int
client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count,
void *myframe)
{
@@ -4421,48 +4380,6 @@ unwind:
}
-
-
-int32_t
-client3_1_checksum (call_frame_t *frame, xlator_t *this,
- void *data)
-{
- clnt_conf_t *conf = NULL;
- clnt_args_t *args = NULL;
- gfs3_checksum_req req = {0,};
- int ret = 0;
- int op_errno = ESTALE;
-
- if (!frame || !this || !data)
- goto unwind;
-
- args = data;
-
- ret = inode_ctx_get2 (args->loc->inode, this, &req.ino, &req.gen);
- if (args->loc->inode->ino && ret < 0) {
- gf_log (this->name, GF_LOG_TRACE,
- "STAT %"PRId64" (%s): "
- "failed to get remote inode number",
- args->loc->inode->ino, args->loc->path);
- goto unwind;
- }
- req.path = (char *)args->loc->path;
- req.flag = args->flags;
- req.gfs_id = GFS3_OP_CHECKSUM;
-
- conf = this->private;
-
- client_submit_request (this, &req, frame, conf->fops, GFS3_OP_CHECKSUM,
- client3_1_checksum_cbk, NULL, xdr_from_checksum_req);
-
- return 0;
-unwind:
- STACK_UNWIND_STRICT (checksum, frame, -1, op_errno, NULL, NULL);
- return 0;
-}
-
-
-
int32_t
client3_1_rchecksum (call_frame_t *frame, xlator_t *this,
void *data)
@@ -4748,7 +4665,6 @@ rpc_clnt_procedure_t clnt3_1_fop_actors[GF_FOP_MAXVALUE] = {
[GF_FOP_FINODELK] = { "FINODELK", client3_1_finodelk },
[GF_FOP_ENTRYLK] = { "ENTRYLK", client3_1_entrylk },
[GF_FOP_FENTRYLK] = { "FENTRYLK", client3_1_fentrylk },
- [GF_FOP_CHECKSUM] = { "CHECKSUM", client3_1_checksum },
[GF_FOP_XATTROP] = { "XATTROP", client3_1_xattrop },
[GF_FOP_FXATTROP] = { "FXATTROP", client3_1_fxattrop },
[GF_FOP_FGETXATTR] = { "FGETXATTR", client3_1_fgetxattr },
@@ -4797,7 +4713,6 @@ char *clnt3_1_fop_names[GFS3_OP_MAXVALUE] = {
[GFS3_OP_FINODELK] = "FINODELK",
[GFS3_OP_ENTRYLK] = "ENTRYLK",
[GFS3_OP_FENTRYLK] = "FENTRYLK",
- [GFS3_OP_CHECKSUM] = "CHECKSUM",
[GFS3_OP_XATTROP] = "XATTROP",
[GFS3_OP_FXATTROP] = "FXATTROP",
[GFS3_OP_FGETXATTR] = "FGETXATTR",
diff --git a/xlators/protocol/legacy/client/src/client-protocol.c b/xlators/protocol/legacy/client/src/client-protocol.c
index 0dc5bee5d56..e8d5d8f0139 100644
--- a/xlators/protocol/legacy/client/src/client-protocol.c
+++ b/xlators/protocol/legacy/client/src/client-protocol.c
@@ -5217,71 +5217,6 @@ client_getspec_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
return 0;
}
-int
-client_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flag)
-{
- gf_hdr_common_t *hdr = NULL;
- gf_fop_checksum_req_t *req = NULL;
- size_t hdrlen = -1;
- int ret = -1;
- ino_t ino = 0;
- uint64_t gen = 0;
-
- hdrlen = gf_hdr_len (req, strlen (loc->path) + 1);
- hdr = gf_hdr_new (req, strlen (loc->path) + 1);
- req = gf_param (hdr);
-
- ret = inode_ctx_get2 (loc->inode, this, &ino, &gen);
- if (loc->inode->ino && ret < 0) {
- gf_log (this->name, GF_LOG_DEBUG,
- "CHECKSUM %"PRId64" (%s): "
- "failed to get remote inode number",
- loc->inode->ino, loc->path);
- STACK_UNWIND (frame, -1, EINVAL, NULL, NULL);
- return 0;
-
- }
-
- req->ino = hton64 (ino);
- req->gen = hton64 (gen);
- req->flag = hton32 (flag);
- strcpy (req->path, loc->path);
-
- ret = protocol_client_xfer (frame, this,
- CLIENT_CHANNEL (this, CHANNEL_BULK),
- GF_OP_TYPE_FOP_REQUEST, GF_PROTO_FOP_CHECKSUM,
- hdr, hdrlen, NULL, 0, NULL);
-
- return ret;
-}
-
-
-int
-client_checksum_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
- struct iobuf *iobuf)
-{
- gf_fop_checksum_rsp_t *rsp = NULL;
- int32_t op_ret = 0;
- int32_t op_errno = 0;
- int32_t gf_errno = 0;
- unsigned char *fchecksum = NULL;
- unsigned char *dchecksum = NULL;
-
- rsp = gf_param (hdr);
-
- op_ret = ntoh32 (hdr->rsp.op_ret);
- gf_errno = ntoh32 (hdr->rsp.op_errno);
- op_errno = gf_error_to_errno (gf_errno);
-
- if (op_ret >= 0) {
- fchecksum = rsp->fchecksum;
- dchecksum = rsp->dchecksum + NAME_MAX;
- }
-
- STACK_UNWIND (frame, op_ret, op_errno, fchecksum, dchecksum);
- return 0;
-}
-
int
client_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
@@ -6023,7 +5958,6 @@ static gf_op_t gf_fops[] = {
[GF_PROTO_FOP_FINODELK] = client_finodelk_cbk,
[GF_PROTO_FOP_ENTRYLK] = client_entrylk_cbk,
[GF_PROTO_FOP_FENTRYLK] = client_fentrylk_cbk,
- [GF_PROTO_FOP_CHECKSUM] = client_checksum_cbk,
[GF_PROTO_FOP_RCHECKSUM] = client_rchecksum_cbk,
[GF_PROTO_FOP_XATTROP] = client_xattrop_cbk,
[GF_PROTO_FOP_FXATTROP] = client_fxattrop_cbk,
@@ -6687,7 +6621,6 @@ struct xlator_fops fops = {
.entrylk = client_entrylk,
.fentrylk = client_fentrylk,
.lookup = client_lookup,
- .checksum = client_checksum,
.rchecksum = client_rchecksum,
.xattrop = client_xattrop,
.fxattrop = client_fxattrop,
diff --git a/xlators/protocol/legacy/server/src/server-protocol.c b/xlators/protocol/legacy/server/src/server-protocol.c
index da0303019a3..a6d30ca4a2e 100644
--- a/xlators/protocol/legacy/server/src/server-protocol.c
+++ b/xlators/protocol/legacy/server/src/server-protocol.c
@@ -5193,84 +5193,26 @@ fail:
}
-static int
-server_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- uint8_t *fchecksum, uint8_t *dchecksum)
-{
- gf_hdr_common_t *hdr = NULL;
- gf_fop_checksum_rsp_t *rsp = NULL;
- size_t hdrlen = 0;
- int32_t gf_errno = 0;
-
- hdrlen = gf_hdr_len (rsp, NAME_MAX + 1 + NAME_MAX + 1);
- hdr = gf_hdr_new (rsp, NAME_MAX + 1 + NAME_MAX + 1);
- rsp = gf_param (hdr);
-
- hdr->rsp.op_ret = hton32 (op_ret);
- gf_errno = gf_errno_to_error (op_errno);
- hdr->rsp.op_errno = hton32 (gf_errno);
-
- if (op_ret >= 0) {
- memcpy (rsp->fchecksum, fchecksum, NAME_MAX);
- rsp->fchecksum[NAME_MAX] = '\0';
- memcpy (rsp->dchecksum + NAME_MAX,
- dchecksum, NAME_MAX);
- rsp->dchecksum[NAME_MAX + NAME_MAX] = '\0';
- }
-
- protocol_server_reply (frame, GF_OP_TYPE_FOP_REPLY, GF_PROTO_FOP_CHECKSUM,
- hdr, hdrlen, NULL, 0, NULL);
-
- return 0;
-}
-
-static int
-server_checksum_resume (call_frame_t *frame, xlator_t *bound_xl)
-{
- server_state_t *state = NULL;
- int op_ret = 0;
- int op_errno = 0;
-
- state = CALL_STATE (frame);
-
- if (state->resolve.op_ret != 0) {
- op_ret = state->resolve.op_ret;
- op_errno = state->resolve.op_errno;
- goto err;
- }
-
- STACK_WIND (frame, server_checksum_cbk,
- BOUND_XL(frame),
- BOUND_XL(frame)->fops->checksum,
- &state->loc, state->flags);
-
- return 0;
-err:
- server_checksum_cbk (frame, NULL, frame->this, state->resolve.op_ret,
- state->resolve.op_errno, NULL, NULL);
-
- return 0;
-}
static int
server_checksum (call_frame_t *frame, xlator_t *bound_xl,
gf_hdr_common_t *hdr, size_t hdrlen,
struct iobuf *iobuf)
{
- gf_fop_checksum_req_t *req = NULL;
- server_state_t *state = NULL;
+ gf_hdr_common_t *rsp_hdr = NULL;
+ gf_mop_ping_rsp_t *rsp = NULL; /* Using for NULL */
+ size_t rsp_hdrlen = 0;
+ int32_t gf_errno = 0;
- req = gf_param (hdr);
- state = CALL_STATE (frame);
+ rsp_hdrlen = gf_hdr_len (rsp, 0);
+ rsp_hdr = gf_hdr_new (rsp, 0);
- state->resolve.type = RESOLVE_MAY;
- state->resolve.path = gf_strdup (req->path);
- state->resolve.gen = ntoh64 (req->gen);
- state->resolve.ino = ntoh64 (req->ino);
- state->flags = ntoh32 (req->flag);
+ gf_errno = gf_errno_to_error (ENOSYS);
+ hdr->rsp.op_errno = hton32 (gf_errno);
+ hdr->rsp.op_ret = -1;
- gf_resolve_and_resume (frame, server_checksum_resume);
+ protocol_server_reply (frame, GF_OP_TYPE_FOP_REPLY, GF_PROTO_FOP_CHECKSUM,
+ rsp_hdr, rsp_hdrlen, NULL, 0, NULL);
return 0;
}
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.c b/xlators/protocol/lib/src/glusterfs-xdr.c
index e8a254094f9..cbc4d7cef47 100644
--- a/xlators/protocol/lib/src/glusterfs-xdr.c
+++ b/xlators/protocol/lib/src/glusterfs-xdr.c
@@ -1365,39 +1365,6 @@ xdr_gfs3_fentrylk_req (XDR *xdrs, gfs3_fentrylk_req *objp)
return TRUE;
}
-bool_t
-xdr_gfs3_checksum_req (XDR *xdrs, gfs3_checksum_req *objp)
-{
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- if (!xdr_u_quad_t (xdrs, &objp->ino))
- return FALSE;
- if (!xdr_u_quad_t (xdrs, &objp->gen))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->flag))
- return FALSE;
- if (!xdr_string (xdrs, &objp->path, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gfs3_checksum_rsp (XDR *xdrs, gfs3_checksum_rsp *objp)
-{
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->fchecksum.fchecksum_val, (u_int *) &objp->fchecksum.fchecksum_len, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dchecksum.dchecksum_val, (u_int *) &objp->dchecksum.dchecksum_len, ~0))
- return FALSE;
- return TRUE;
-}
bool_t
xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp)
diff --git a/xlators/protocol/lib/src/glusterfs-xdr.h b/xlators/protocol/lib/src/glusterfs-xdr.h
index 72f131c746c..45ce3ff9bed 100644
--- a/xlators/protocol/lib/src/glusterfs-xdr.h
+++ b/xlators/protocol/lib/src/glusterfs-xdr.h
@@ -943,29 +943,6 @@ struct gfs3_fentrylk_req {
};
typedef struct gfs3_fentrylk_req gfs3_fentrylk_req;
-struct gfs3_checksum_req {
- u_quad_t gfs_id;
- u_quad_t ino;
- u_quad_t gen;
- u_int flag;
- char *path;
-};
-typedef struct gfs3_checksum_req gfs3_checksum_req;
-
-struct gfs3_checksum_rsp {
- u_quad_t gfs_id;
- int op_ret;
- int op_errno;
- struct {
- u_int fchecksum_len;
- char *fchecksum_val;
- } fchecksum;
- struct {
- u_int dchecksum_len;
- char *dchecksum_val;
- } dchecksum;
-};
-typedef struct gfs3_checksum_rsp gfs3_checksum_rsp;
struct gfs3_setattr_req {
u_quad_t gfs_id;
@@ -1217,8 +1194,6 @@ extern bool_t xdr_gfs3_fstat_req (XDR *, gfs3_fstat_req*);
extern bool_t xdr_gfs3_fstat_rsp (XDR *, gfs3_fstat_rsp*);
extern bool_t xdr_gfs3_entrylk_req (XDR *, gfs3_entrylk_req*);
extern bool_t xdr_gfs3_fentrylk_req (XDR *, gfs3_fentrylk_req*);
-extern bool_t xdr_gfs3_checksum_req (XDR *, gfs3_checksum_req*);
-extern bool_t xdr_gfs3_checksum_rsp (XDR *, gfs3_checksum_rsp*);
extern bool_t xdr_gfs3_setattr_req (XDR *, gfs3_setattr_req*);
extern bool_t xdr_gfs3_setattr_rsp (XDR *, gfs3_setattr_rsp*);
extern bool_t xdr_gfs3_fsetattr_req (XDR *, gfs3_fsetattr_req*);
@@ -1308,8 +1283,6 @@ extern bool_t xdr_gfs3_fstat_req ();
extern bool_t xdr_gfs3_fstat_rsp ();
extern bool_t xdr_gfs3_entrylk_req ();
extern bool_t xdr_gfs3_fentrylk_req ();
-extern bool_t xdr_gfs3_checksum_req ();
-extern bool_t xdr_gfs3_checksum_rsp ();
extern bool_t xdr_gfs3_setattr_req ();
extern bool_t xdr_gfs3_setattr_rsp ();
extern bool_t xdr_gfs3_fsetattr_req ();
diff --git a/xlators/protocol/lib/src/glusterfs3.x b/xlators/protocol/lib/src/glusterfs3.x
index c9510527c27..b2eb9556c02 100644
--- a/xlators/protocol/lib/src/glusterfs3.x
+++ b/xlators/protocol/lib/src/glusterfs3.x
@@ -634,21 +634,6 @@ struct gfs3_fstat_req {
};
-struct gfs3_checksum_req {
- unsigned hyper gfs_id;
- unsigned hyper ino;
- unsigned hyper gen;
- unsigned int flag;
- string path<>;
-};
- struct gfs3_checksum_rsp {
- unsigned hyper gfs_id;
- int op_ret;
- int op_errno;
- opaque fchecksum<>;
- opaque dchecksum<>;
-} ;
-
struct gfs3_setattr_req {
unsigned hyper gfs_id;
unsigned hyper ino;
diff --git a/xlators/protocol/lib/src/msg-xdr.c b/xlators/protocol/lib/src/msg-xdr.c
index 8cab3726c3d..3fe5ad5f65d 100644
--- a/xlators/protocol/lib/src/msg-xdr.c
+++ b/xlators/protocol/lib/src/msg-xdr.c
@@ -333,13 +333,6 @@ xdr_serialize_opendir_rsp (struct iovec outmsg, void *rsp)
}
ssize_t
-xdr_serialize_checksum_rsp (struct iovec outmsg, void *rsp)
-{
- return xdr_serialize_generic (outmsg, (void *)rsp,
- (xdrproc_t)xdr_gfs3_checksum_rsp);
-}
-
-ssize_t
xdr_serialize_ftruncate_rsp (struct iovec outmsg, void *rsp)
{
return xdr_serialize_generic (outmsg, (void *)rsp,
@@ -579,13 +572,6 @@ xdr_to_fstat_req (struct iovec inmsg, void *args)
return xdr_to_generic (inmsg, (void *)args,
(xdrproc_t)xdr_gfs3_fstat_req);
}
-
-ssize_t
-xdr_to_checksum_req (struct iovec inmsg, void *args)
-{
- return xdr_to_generic (inmsg, (void *)args,
- (xdrproc_t)xdr_gfs3_checksum_req);
-}
ssize_t
xdr_to_rchecksum_req (struct iovec inmsg, void *args)
{
@@ -953,13 +939,6 @@ xdr_from_statfs_req (struct iovec outmsg, void *req)
}
ssize_t
-xdr_from_checksum_req (struct iovec outmsg, void *req)
-{
- return xdr_serialize_generic (outmsg, (void *)req,
- (xdrproc_t)xdr_gfs3_checksum_req);
-
-}
-ssize_t
xdr_from_rchecksum_req (struct iovec outmsg, void *req)
{
return xdr_serialize_generic (outmsg, (void *)req,
@@ -1207,13 +1186,6 @@ xdr_to_statfs_rsp (struct iovec outmsg, void *rsp)
}
ssize_t
-xdr_to_checksum_rsp (struct iovec outmsg, void *rsp)
-{
- return xdr_to_generic (outmsg, (void *)rsp,
- (xdrproc_t)xdr_gfs3_checksum_rsp);
-
-}
-ssize_t
xdr_to_rchecksum_rsp (struct iovec outmsg, void *rsp)
{
return xdr_to_generic (outmsg, (void *)rsp,
diff --git a/xlators/protocol/lib/src/msg-xdr.h b/xlators/protocol/lib/src/msg-xdr.h
index 872d9401e48..59b6ca30112 100644
--- a/xlators/protocol/lib/src/msg-xdr.h
+++ b/xlators/protocol/lib/src/msg-xdr.h
@@ -93,9 +93,6 @@ ssize_t
xdr_serialize_ftruncate_rsp (struct iovec outmsg, void *rsp);
ssize_t
-xdr_serialize_checksum_rsp (struct iovec outmsg, void *rsp);
-
-ssize_t
xdr_serialize_statfs_rsp (struct iovec outmsg, void *rsp);
@@ -266,9 +263,6 @@ ssize_t
xdr_to_rmdir_req (struct iovec inmsg, void *args);
ssize_t
-xdr_to_checksum_req (struct iovec inmsg, void *args);
-
-ssize_t
xdr_to_rchecksum_req (struct iovec inmsg, void *args);
ssize_t
@@ -369,9 +363,6 @@ ssize_t
xdr_from_fxattrop_req (struct iovec outmsg, void *args);
ssize_t
-xdr_from_checksum_req (struct iovec outmsg, void *args);
-
-ssize_t
xdr_from_rchecksum_req (struct iovec outmsg, void *args);
ssize_t
@@ -515,8 +506,6 @@ ssize_t
xdr_to_fgetxattr_rsp (struct iovec inmsg, void *args);
ssize_t
-xdr_to_checksum_rsp (struct iovec inmsg, void *args);
-ssize_t
xdr_to_rchecksum_rsp (struct iovec inmsg, void *args);
ssize_t
diff --git a/xlators/protocol/lib/src/protocol-common.h b/xlators/protocol/lib/src/protocol-common.h
index 5378d90ba45..5590960a6d9 100644
--- a/xlators/protocol/lib/src/protocol-common.h
+++ b/xlators/protocol/lib/src/protocol-common.h
@@ -54,7 +54,6 @@ enum gf_fop_procnum {
GFS3_OP_FINODELK,
GFS3_OP_ENTRYLK,
GFS3_OP_FENTRYLK,
- GFS3_OP_CHECKSUM,
GFS3_OP_XATTROP,
GFS3_OP_FXATTROP,
GFS3_OP_FGETXATTR,
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 1210a807a9a..00247c1eef8 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -167,79 +167,6 @@ xdr_to_glusterfs_req (rpcsvc_request_t *req, void *arg, gfs_serialize_t sfunc)
return ret;
}
-
-#if 0
-/*
- * prototype of operations function for each of mop and
- * fop at server protocol level
- *
- * @frame: call frame pointer
- * @bound_xl: the xlator that this frame is bound to
- * @params: parameters dictionary
- *
- * to be used by protocol interpret, _not_ for exterenal reference
- */
-typedef int32_t (*gf_op_t) (call_frame_t *frame, xlator_t *bould_xl,
- gf_hdr_common_t *hdr, size_t hdrlen,
- struct iobuf *iobuf);
-
-
-static gf_op_t gf_fops[] = {
- [GF_FOP_STAT] = server_stat,
- [GF_FOP_READLINK] = server_readlink,
- [GF_FOP_MKNOD] = server_mknod,
- [GF_FOP_MKDIR] = server_mkdir,
- [GF_FOP_UNLINK] = server_unlink,
- [GF_FOP_RMDIR] = server_rmdir,
- [GF_FOP_SYMLINK] = server_symlink,
- [GF_FOP_RENAME] = server_rename,
- [GF_FOP_LINK] = server_link,
- [GF_FOP_TRUNCATE] = server_truncate,
- [GF_FOP_OPEN] = server_open,
- [GF_FOP_READ] = server_readv,
- [GF_FOP_WRITE] = server_writev,
- [GF_FOP_STATFS] = server_statfs,
- [GF_FOP_FLUSH] = server_flush,
- [GF_FOP_FSYNC] = server_fsync,
- [GF_FOP_SETXATTR] = server_setxattr,
- [GF_FOP_GETXATTR] = server_getxattr,
- [GF_FOP_FGETXATTR] = server_fgetxattr,
- [GF_FOP_FSETXATTR] = server_fsetxattr,
- [GF_FOP_REMOVEXATTR] = server_removexattr,
- [GF_FOP_OPENDIR] = server_opendir,
- [GF_FOP_FSYNCDIR] = server_fsyncdir,
- [GF_FOP_ACCESS] = server_access,
- [GF_FOP_CREATE] = server_create,
- [GF_FOP_FTRUNCATE] = server_ftruncate,
- [GF_FOP_FSTAT] = server_fstat,
- [GF_FOP_LK] = server_lk,
- [GF_FOP_LOOKUP] = server_lookup,
- [GF_FOP_READDIR] = server_readdir,
- [GF_FOP_READDIRP] = server_readdirp,
- [GF_FOP_INODELK] = server_inodelk,
- [GF_FOP_FINODELK] = server_finodelk,
- [GF_FOP_ENTRYLK] = server_entrylk,
- [GF_FOP_FENTRYLK] = server_fentrylk,
- [GF_FOP_CHECKSUM] = server_checksum,
- [GF_FOP_RCHECKSUM] = server_rchecksum,
- [GF_FOP_XATTROP] = server_xattrop,
- [GF_FOP_FXATTROP] = server_fxattrop,
- [GF_FOP_SETATTR] = server_setattr,
- [GF_FOP_FSETATTR] = server_fsetattr,
- [GF_FOP_SETDENTS] = server_setdents,
- [GF_FOP_GETDENTS] = server_getdents,
- [GF_FOP_LOCK_NOTIFY] = server_lock_notify,
- [GF_FOP_LOCK_FNOTIFY] = server_lock_fnotify,
-};
-
-static gf_op_t gf_cbks[] = {
- [GF_CBK_FORGET] = server_forget,
- [GF_CBK_RELEASE] = server_release,
- [GF_CBK_RELEASEDIR] = server_releasedir
-};
-
-#endif
-
int
server_fd (xlator_t *this)
{
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index 825e66c3c0b..1cf4e0ded33 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -1258,34 +1258,6 @@ server_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
int
-server_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- uint8_t *fchecksum, uint8_t *dchecksum)
-{
- gfs3_checksum_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
-
- req = frame->local;
-
- rsp.gfs_id = req->gfs_id;
- rsp.op_ret = op_ret;
- rsp.op_errno = gf_errno_to_error (op_errno);
-
- if (op_ret >= 0) {
- rsp.fchecksum.fchecksum_val = (char *)fchecksum;
- rsp.fchecksum.fchecksum_len = NAME_MAX;
- rsp.dchecksum.dchecksum_val = (char *)dchecksum;
- rsp.dchecksum.dchecksum_len = NAME_MAX;
- }
-
- server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
- xdr_serialize_checksum_rsp);
-
- return 0;
-}
-
-
-int
server_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
uint32_t weak_checksum, uint8_t *strong_checksum)
@@ -1777,32 +1749,6 @@ err:
}
int
-server_checksum_resume (call_frame_t *frame, xlator_t *bound_xl)
-{
- server_state_t *state = NULL;
- int op_ret = 0;
- int op_errno = 0;
-
- state = CALL_STATE (frame);
-
- if (state->resolve.op_ret != 0) {
- op_ret = state->resolve.op_ret;
- op_errno = state->resolve.op_errno;
- goto err;
- }
-
- STACK_WIND (frame, server_checksum_cbk, bound_xl,
- bound_xl->fops->checksum, &state->loc, state->flags);
-
- return 0;
-err:
- server_checksum_cbk (frame, NULL, frame->this, state->resolve.op_ret,
- state->resolve.op_errno, NULL, NULL);
-
- return 0;
-}
-
-int
server_lk_resume (call_frame_t *frame, xlator_t *bound_xl)
{
server_state_t *state = NULL;
@@ -4536,48 +4482,6 @@ out:
return 0;
}
-int
-server_checksum (rpcsvc_request_t *req)
-{
- server_state_t *state = NULL;
- server_connection_t *conn = NULL;
- call_frame_t *frame = NULL;
- gfs3_checksum_req args = {0,};
- char path[SERVER_PATH_MAX] = {0,};
-
- if (!req)
- return 0;
-
- conn = req->conn->trans->xl_private;
-
- args.path = path;
- if (!xdr_to_checksum_req (req->msg[0], &args)) {
- //failed to decode msg;
- req->rpc_err = GARBAGE_ARGS;
- goto out;
- }
-
- frame = get_frame_from_request (req);
- if (!frame) {
- // something wrong, mostly insufficient memory
- req->rpc_err = GARBAGE_ARGS; /* TODO */
- goto out;
- }
-
- state = CALL_STATE (frame);
-
- state->resolve.type = RESOLVE_MAY;
- state->resolve.path = gf_strdup (args.path);
- state->resolve.gen = args.gen;
- state->resolve.ino = args.ino;
- state->flags = args.flag;
-
- resolve_and_resume (frame, server_checksum_resume);
-out:
- return 0;
-}
-
-
int
server_rchecksum (rpcsvc_request_t *req)
@@ -4808,7 +4712,6 @@ rpcsvc_actor_t glusterfs3_1_fop_actors[] = {
[GFS3_OP_FINODELK] = { "FINODELK", GFS3_OP_FINODELK, server_finodelk, NULL, NULL },
[GFS3_OP_ENTRYLK] = { "ENTRYLK", GFS3_OP_ENTRYLK, server_entrylk, NULL, NULL },
[GFS3_OP_FENTRYLK] = { "FENTRYLK", GFS3_OP_FENTRYLK, server_fentrylk, NULL, NULL },
- [GFS3_OP_CHECKSUM] = { "CHECKSUM", GFS3_OP_CHECKSUM, server_checksum, NULL, NULL },
[GFS3_OP_XATTROP] = { "XATTROP", GFS3_OP_XATTROP, server_xattrop, NULL, NULL },
[GFS3_OP_FXATTROP] = { "FXATTROP", GFS3_OP_FXATTROP, server_fxattrop, NULL, NULL },
[GFS3_OP_FGETXATTR] = { "FGETXATTR", GFS3_OP_FGETXATTR, server_fgetxattr, NULL, NULL },