summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-09-17 05:56:25 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-22 06:13:32 -0700
commitfaf97734112ebe11d8a411351d9f23b528b9d616 (patch)
treed8b898e842c1be3c3b760d41188f7a4b0078232b /libglusterfs/src/xlator.h
parent239d2cbdb0a4c32df9f21de8385e2c466b934178 (diff)
libglusterfs: Add RCHECKSUM fop.
rchecksum (fd, offset, len): Calculates both the weak and strong checksums for a block of {len} bytes at {offset} in {fd}. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 4adbec2e5d8..ff6768035fd 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -110,6 +110,14 @@ typedef int32_t (*fop_checksum_cbk_t) (call_frame_t *frame,
uint8_t *file_checksum,
uint8_t *dir_checksum);
+typedef int32_t (*fop_rchecksum_cbk_t) (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);
+
typedef int32_t (*mop_setvolume_t) (call_frame_t *frame,
xlator_t *this,
const char *volume);
@@ -132,6 +140,11 @@ typedef int32_t (*fop_checksum_t) (call_frame_t *frame,
loc_t *loc,
int32_t flag);
+typedef int32_t (*fop_rchecksum_t) (call_frame_t *frame,
+ xlator_t *this,
+ fd_t *fd, off_t offset,
+ int32_t len);
+
struct xlator_mops {
mop_stats_t stats;
mop_getspec_t getspec;
@@ -740,6 +753,7 @@ struct xlator_fops {
fop_setdents_t setdents;
fop_getdents_t getdents;
fop_checksum_t checksum;
+ fop_rchecksum_t rchecksum;
fop_xattrop_t xattrop;
fop_fxattrop_t fxattrop;
fop_lock_notify_t lock_notify;
@@ -788,6 +802,7 @@ struct xlator_fops {
fop_setdents_cbk_t setdents_cbk;
fop_getdents_cbk_t getdents_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;
fop_lock_notify_cbk_t lock_notify_cbk;