diff options
author | Venky Shankar <vshankar@redhat.com> | 2015-03-31 15:48:18 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-08 07:01:32 +0000 |
commit | f0cd1d73c63001740cd7691a77df7631c9b8e8dc (patch) | |
tree | 336a8ee694dc71a2fde6927d8a40682bef6368ef /libglusterfs | |
parent | 7fb55dbdabf73f9169b0f3021a42fa120d64b373 (diff) |
bitrot/scrub: Scrubber fixes
This patch fixes a handful of problem with scrubber which
are detailed below.
Scrubber used to skip objects for verification due to missing
fd iterface to fetch versioning extended attributes. Similar
to the inode interface, an fd based interface in POSIX is now
introduced.
Moreover, this patch also fixes potential false reporting by
scrubber due to:
An object gets dirtied and signed when scrubber is busy
calculatingobject checksum. This is fixed by caching the
signed version when an object is first inspected for
stalenes, i.e., during pre-compute stage. This version is
used to verify checksum in the post-compute stage when the
signatures are compared for possible corruption.
Side effect of _not_ sending signature length during signing
resulted in "truncated" signature to be set for an object.
Now, at the time of signing, the signature length is sent
and is used in place of invoking strlen() to get signature
length (which could have possible 00s). The signature length
itself is not persisted in the signature xattr, but is
calculated on-the-fly by substracting the xattr length by
the "structure" header size.
Some of the log entries are made more meaningful (as and aid
for debugging).
Change-Id: I938bee5aea6688d5d99eb2640053613af86d6269
BUG: 1207624
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/10118
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index c5459018717..50a5dba86ee 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -124,6 +124,9 @@ #define BITROT_CURRENT_VERSION_KEY "trusted.glusterfs.bit-rot.version" #define BITROT_SIGNING_VERSION_KEY "trusted.glusterfs.bit-rot.signature" +/* on-disk size of signing xattr (not the signature itself) */ +#define BITROT_SIGNING_XATTR_SIZE_KEY "trusted.glusterfs.bit-rot.size" + /* GET/SET object signature */ #define GLUSTERFS_GET_OBJECT_SIGNATURE "trusted.glusterfs.get-signature" #define GLUSTERFS_SET_OBJECT_SIGNATURE "trusted.glusterfs.set-signature" |