summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-07-06 07:12:11 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-06 05:58:56 -0700
commit90717586363520bbb68e2ec4a7aa12272effa64e (patch)
treec1c249b418d4dc27f25a8538e78710ddf88152e7 /libglusterfs
parent4e14d858bc51f99d89880364249344e1b957f400 (diff)
removed 'fop->checksum' from codebase as its not required anymore
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 734 (keep only the working/usable code in build tree to focus more on development) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=734
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/call-stub.c102
-rw-r--r--libglusterfs/src/call-stub.h27
-rw-r--r--libglusterfs/src/defaults.c35
-rw-r--r--libglusterfs/src/globals.c1
-rw-r--r--libglusterfs/src/glusterfs.h1
-rw-r--r--libglusterfs/src/latency.c2
-rw-r--r--libglusterfs/src/xlator.c1
-rw-r--r--libglusterfs/src/xlator.h14
8 files changed, 0 insertions, 183 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index f0d04eb95d7..233a1616250 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -1829,59 +1829,6 @@ fop_readdirp_stub (call_frame_t *frame,
}
call_stub_t *
-fop_checksum_stub (call_frame_t *frame,
- fop_checksum_t fn,
- loc_t *loc,
- int32_t flags)
-{
- call_stub_t *stub = NULL;
-
- GF_VALIDATE_OR_GOTO ("call-stub", frame, out);
- GF_VALIDATE_OR_GOTO ("call-stub", loc, out);
-
- stub = stub_new (frame, 1, GF_FOP_CHECKSUM);
- GF_VALIDATE_OR_GOTO ("call-stub", stub, out);
-
- stub->args.checksum.fn = fn;
- loc_copy (&stub->args.checksum.loc, loc);
- stub->args.checksum.flags = flags;
-out:
- return stub;
-}
-
-
-call_stub_t *
-fop_checksum_cbk_stub (call_frame_t *frame,
- fop_checksum_cbk_t fn,
- int32_t op_ret,
- int32_t op_errno,
- uint8_t *file_checksum,
- uint8_t *dir_checksum)
-{
- call_stub_t *stub = NULL;
-
- GF_VALIDATE_OR_GOTO ("call-stub", frame, out);
-
- stub = stub_new (frame, 0, GF_FOP_CHECKSUM);
- GF_VALIDATE_OR_GOTO ("call-stub", stub, out);
-
- stub->args.checksum_cbk.fn = fn;
- stub->args.checksum_cbk.op_ret = op_ret;
- stub->args.checksum_cbk.op_errno = op_errno;
- if (op_ret >= 0)
- {
- stub->args.checksum_cbk.file_checksum =
- memdup (file_checksum, NAME_MAX);
-
- stub->args.checksum_cbk.dir_checksum =
- memdup (dir_checksum, NAME_MAX);
- }
-out:
- return stub;
-}
-
-
-call_stub_t *
fop_rchecksum_stub (call_frame_t *frame,
fop_rchecksum_t fn,
fd_t *fd, off_t offset,
@@ -2475,15 +2422,6 @@ call_resume_wind (call_stub_t *stub)
break;
}
- case GF_FOP_CHECKSUM:
- {
- stub->args.checksum.fn (stub->frame,
- stub->frame->this,
- &stub->args.checksum.loc,
- stub->args.checksum.flags);
- break;
- }
-
case GF_FOP_RCHECKSUM:
{
stub->args.rchecksum.fn (stub->frame,
@@ -3205,31 +3143,6 @@ call_resume_unwind (call_stub_t *stub)
break;
}
- case GF_FOP_CHECKSUM:
- {
- if (!stub->args.checksum_cbk.fn)
- STACK_UNWIND (stub->frame,
- stub->args.checksum_cbk.op_ret,
- stub->args.checksum_cbk.op_errno,
- stub->args.checksum_cbk.file_checksum,
- stub->args.checksum_cbk.dir_checksum);
- else
- stub->args.checksum_cbk.fn (stub->frame,
- stub->frame->cookie,
- stub->frame->this,
- stub->args.checksum_cbk.op_ret,
- stub->args.checksum_cbk.op_errno,
- stub->args.checksum_cbk.file_checksum,
- stub->args.checksum_cbk.dir_checksum);
- if (stub->args.checksum_cbk.op_ret >= 0)
- {
- GF_FREE (stub->args.checksum_cbk.file_checksum);
- GF_FREE (stub->args.checksum_cbk.dir_checksum);
- }
-
- break;
- }
-
case GF_FOP_RCHECKSUM:
{
if (!stub->args.rchecksum_cbk.fn)
@@ -3630,12 +3543,6 @@ call_stub_destroy_wind (call_stub_t *stub)
break;
}
- case GF_FOP_CHECKSUM:
- {
- loc_wipe (&stub->args.checksum.loc);
- break;
- }
-
case GF_FOP_RCHECKSUM:
{
if (stub->args.rchecksum.fd)
@@ -3854,15 +3761,6 @@ call_stub_destroy_unwind (call_stub_t *stub)
}
break;
- case GF_FOP_CHECKSUM:
- {
- if (stub->args.checksum_cbk.op_ret >= 0) {
- GF_FREE (stub->args.checksum_cbk.file_checksum);
- GF_FREE (stub->args.checksum_cbk.dir_checksum);
- }
- }
- break;
-
case GF_FOP_RCHECKSUM:
{
if (stub->args.rchecksum_cbk.op_ret >= 0) {
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index afc5b13e9a2..bc621ec83a5 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -503,19 +503,6 @@ typedef struct {
gf_dirent_t entries;
} readdirp_cbk;
- /* checksum */
- struct {
- fop_checksum_t fn;
- loc_t loc;
- int32_t flags;
- } checksum;
- struct {
- fop_checksum_cbk_t fn;
- int32_t op_ret, op_errno;
- uint8_t *file_checksum;
- uint8_t *dir_checksum;
- } checksum_cbk;
-
/* rchecksum */
struct {
fop_rchecksum_t fn;
@@ -1059,20 +1046,6 @@ fop_readdir_cbk_stub (call_frame_t *frame,
gf_dirent_t *entries);
call_stub_t *
-fop_checksum_stub (call_frame_t *frame,
- fop_checksum_t fn,
- loc_t *loc,
- int32_t flags);
-
-call_stub_t *
-fop_checksum_cbk_stub (call_frame_t *frame,
- fop_checksum_cbk_t fn,
- int32_t op_ret,
- int32_t op_errno,
- uint8_t *file_checksum,
- uint8_t *dir_checksum);
-
-call_stub_t *
fop_rchecksum_stub (call_frame_t *frame,
fop_rchecksum_t fn,
fd_t *fd, off_t offset,
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 77364918f8b..f5431d471df 100644
--- a/libglusterfs/src/defaults.c
+++ b/libglusterfs/src/defaults.c
@@ -1129,41 +1129,6 @@ default_getspec (call_frame_t *frame,
return 0;
}
-
-static int32_t
-default_checksum_cbk (call_frame_t *frame,
- void *cookie,
- xlator_t *this,
- int32_t op_ret,
- int32_t op_errno,
- uint8_t *file_checksum,
- uint8_t *dir_checksum)
-{
- STACK_UNWIND (frame,
- op_ret,
- op_errno,
- file_checksum,
- dir_checksum);
- return 0;
-}
-
-
-int32_t
-default_checksum (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc,
- int32_t flag)
-{
- STACK_WIND (frame,
- default_checksum_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->checksum,
- loc,
- flag);
- return 0;
-}
-
-
static int32_t
default_rchecksum_cbk (call_frame_t *frame,
void *cookie,
diff --git a/libglusterfs/src/globals.c b/libglusterfs/src/globals.c
index d480f089fcb..c0040db1448 100644
--- a/libglusterfs/src/globals.c
+++ b/libglusterfs/src/globals.c
@@ -72,7 +72,6 @@ gf_op_list_init()
gf_fop_list[GF_FOP_FINODELK] = "FINODELK";
gf_fop_list[GF_FOP_ENTRYLK] = "ENTRYLK";
gf_fop_list[GF_FOP_FENTRYLK] = "FENTRYLK";
- gf_fop_list[GF_FOP_CHECKSUM] = "CHECKSUM";
gf_fop_list[GF_FOP_XATTROP] = "XATTROP";
gf_fop_list[GF_FOP_FXATTROP] = "FXATTROP";
gf_fop_list[GF_FOP_FSETXATTR] = "FSETXATTR";
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index b6db51489c1..48bb0ff4df6 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -113,7 +113,6 @@ typedef enum {
GF_FOP_FINODELK,
GF_FOP_ENTRYLK,
GF_FOP_FENTRYLK,
- GF_FOP_CHECKSUM,
GF_FOP_XATTROP,
GF_FOP_FXATTROP,
GF_FOP_FGETXATTR,
diff --git a/libglusterfs/src/latency.c b/libglusterfs/src/latency.c
index 71f9824209f..d8f405148a3 100644
--- a/libglusterfs/src/latency.c
+++ b/libglusterfs/src/latency.c
@@ -99,8 +99,6 @@ gf_set_fop_from_fn_pointer (call_frame_t *frame, struct xlator_fops *fops, void
fop = GF_FOP_ENTRYLK;
else if (fops->fentrylk == fn)
fop = GF_FOP_FENTRYLK;
- else if (fops->checksum == fn)
- fop = GF_FOP_CHECKSUM;
else if (fops->xattrop == fn)
fop = GF_FOP_XATTROP;
else if (fops->fxattrop == fn)
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 94a53211a4c..c2f585d03a0 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -85,7 +85,6 @@ fill_defaults (xlator_t *xl)
SET_DEFAULT_FOP (entrylk);
SET_DEFAULT_FOP (fentrylk);
SET_DEFAULT_FOP (lookup);
- SET_DEFAULT_FOP (checksum);
SET_DEFAULT_FOP (rchecksum);
SET_DEFAULT_FOP (xattrop);
SET_DEFAULT_FOP (fxattrop);
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 38ef4bf8524..e373cc42400 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -91,14 +91,6 @@ typedef int32_t (*fop_getspec_cbk_t) (call_frame_t *frame,
int32_t op_errno,
char *spec_data);
-typedef int32_t (*fop_checksum_cbk_t) (call_frame_t *frame,
- void *cookie,
- xlator_t *this,
- int32_t op_ret,
- int32_t op_errno,
- uint8_t *file_checksum,
- uint8_t *dir_checksum);
-
typedef int32_t (*fop_rchecksum_cbk_t) (call_frame_t *frame,
void *cookie,
xlator_t *this,
@@ -112,10 +104,6 @@ typedef int32_t (*fop_getspec_t) (call_frame_t *frame,
xlator_t *this,
const char *key,
int32_t flag);
-typedef int32_t (*fop_checksum_t) (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc,
- int32_t flag);
typedef int32_t (*fop_rchecksum_t) (call_frame_t *frame,
xlator_t *this,
@@ -681,7 +669,6 @@ struct xlator_fops {
fop_finodelk_t finodelk;
fop_entrylk_t entrylk;
fop_fentrylk_t fentrylk;
- fop_checksum_t checksum;
fop_rchecksum_t rchecksum;
fop_xattrop_t xattrop;
fop_fxattrop_t fxattrop;
@@ -725,7 +712,6 @@ struct xlator_fops {
fop_finodelk_cbk_t finodelk_cbk;
fop_entrylk_cbk_t entrylk_cbk;
fop_fentrylk_cbk_t fentrylk_cbk;
- fop_checksum_cbk_t checksum_cbk;
fop_rchecksum_cbk_t rchecksum_cbk;
fop_xattrop_cbk_t xattrop_cbk;
fop_fxattrop_cbk_t fxattrop_cbk;