summaryrefslogtreecommitdiffstats
path: root/xlators/storage
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 /xlators/storage
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 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 2aba365e62b..7c0d165ac99 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -4104,79 +4104,6 @@ posix_readdirp (call_frame_t *frame, xlator_t *this,
return 0;
}
-
-int32_t
-posix_checksum (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t flag)
-{
- char * real_path = NULL;
- DIR * dir = NULL;
- struct dirent * dirent = NULL;
- uint8_t file_checksum[NAME_MAX] = {0,};
- uint8_t dir_checksum[NAME_MAX] = {0,};
- int32_t op_ret = -1;
- int32_t op_errno = 0;
- int i = 0;
- int length = 0;
-
- struct iatt buf = {0,};
- char tmp_real_path[ZR_PATH_MAX] = {0,};
- int ret = -1;
-
- MAKE_REAL_PATH (real_path, this, loc->path);
-
- dir = opendir (real_path);
-
- if (!dir){
- op_errno = errno;
- gf_log (this->name, GF_LOG_ERROR,
- "opendir() failed on `%s': %s",
- real_path, strerror (op_errno));
- goto out;
- }
-
- while ((dirent = readdir (dir))) {
- errno = 0;
- if (!dirent) {
- if (errno != 0) {
- op_errno = errno;
- gf_log (this->name, GF_LOG_ERROR,
- "readdir() failed on dir=%p: %s",
- dir, strerror (errno));
- goto out;
- }
- break;
- }
-
- length = strlen (dirent->d_name);
-
- strcpy (tmp_real_path, real_path);
- strcat (tmp_real_path, "/");
- strcat (tmp_real_path, dirent->d_name);
- ret = posix_lstat_with_gen (this, tmp_real_path, &buf);
-
- if (ret == -1)
- continue;
-
- if (IA_ISDIR (buf.ia_type)) {
- for (i = 0; i < length; i++)
- dir_checksum[i] ^= dirent->d_name[i];
- } else {
- for (i = 0; i < length; i++)
- file_checksum[i] ^= dirent->d_name[i];
- }
- }
- closedir (dir);
-
- op_ret = 0;
-
- out:
- STACK_UNWIND_STRICT (checksum, frame, op_ret, op_errno,
- file_checksum, dir_checksum);
-
- return 0;
-}
-
int32_t
posix_priv (xlator_t *this)
{
@@ -4629,7 +4556,6 @@ struct xlator_fops fops = {
.finodelk = posix_finodelk,
.entrylk = posix_entrylk,
.fentrylk = posix_fentrylk,
- .checksum = posix_checksum,
.rchecksum = posix_rchecksum,
.xattrop = posix_xattrop,
.fxattrop = posix_fxattrop,