From faf97734112ebe11d8a411351d9f23b528b9d616 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Thu, 17 Sep 2009 05:56:25 +0000 Subject: 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 --- libglusterfs/src/xlator.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libglusterfs/src/xlator.h') 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; -- cgit