From 866c64ba5e29a90b37fa051061a58300ae129a2c Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Fri, 13 Mar 2015 21:23:20 +0530 Subject: features/bit-rot: filesystem scrubber Scrubber performs signature verification for objects that were signed by signer. This is done by recalculating the signature (using the hash algorithm the object was signed with) and verifying it aginst the objects persisted signature. Since the object could be undergoing IO opretaion at the time of hash calculation, the signature may not match objects persisted signature. Bitrot stub provides additional information about the stalesness of an objects signature (determinted by it's versioning mechanism). This additional bit of information is used by scrubber to determine the staleness of the signature, and in such cases the object is skipped verification (although signature staleness is performed twice: once before initiation of hash calculation and another after it (an object could be modified after staleness checks). The implmentation is a part of the bitrot xlator (signer) which acts as a signer or scrubber based on a translator option. As of now the scrub process is ever running (but has some form of weak throttling mechanism during filesystem scan). Going forward, there needs to be some form of scrub scheduling and IO throttling (during hash calculation) tunables (via CLI). Change-Id: I665ce90208f6074b98c5a1dd841ce776627cc6f9 BUG: 1170075 Original-Author: Raghavendra Bhat Original-Author: Venky Shankar Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/9914 Tested-by: Vijay Bellur Reviewed-by: Vijay Bellur --- xlators/features/bit-rot/src/stub/bit-rot-stub.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/features/bit-rot/src/stub/bit-rot-stub.c') diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c index 420f145a849..0a2be5f6b42 100644 --- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c +++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c @@ -927,6 +927,8 @@ br_stub_open (call_frame_t *frame, xlator_t *this, if (!flags) goto wind; + if (frame->root->pid == GF_CLIENT_PID_SCRUB) + goto wind; cookie = (void *) BR_STUB_REQUEST_COOKIE; wind: -- cgit