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/call-stub.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'libglusterfs/src/call-stub.h') diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h index 4a8db9c5f..07bc92c31 100644 --- a/libglusterfs/src/call-stub.h +++ b/libglusterfs/src/call-stub.h @@ -568,6 +568,20 @@ typedef struct { uint8_t *dir_checksum; } checksum_cbk; + /* rchecksum */ + struct { + fop_rchecksum_t fn; + fd_t *fd; + off_t offset; + int32_t len; + } rchecksum; + struct { + fop_rchecksum_cbk_t fn; + int32_t op_ret, op_errno; + uint32_t weak_checksum; + uint8_t *strong_checksum; + } rchecksum_cbk; + /* xattrop */ struct { fop_xattrop_t fn; @@ -1154,6 +1168,20 @@ fop_checksum_cbk_stub (call_frame_t *frame, 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, + int32_t len); + +call_stub_t * +fop_rchecksum_cbk_stub (call_frame_t *frame, + fop_rchecksum_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + uint32_t weak_checksum, + uint8_t *strong_checksum); + call_stub_t * fop_xattrop_stub (call_frame_t *frame, fop_xattrop_t fn, -- cgit