summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2014-03-25 23:58:50 +0000
committerJeff Darcy <jdarcy@redhat.com>2014-04-22 14:56:35 +0000
commitacd2292f085b15c2c5c28169d11f20dca90f5ec9 (patch)
tree35e691e0ab15a361595cbf8c53ae1d7e99830d16 /xlators/cluster
parent90366df60fa3b9b2915a4a8d804c2e95ae1948e7 (diff)
nsr: expand coverage of reconciliation test
This version tests eight kinds of modifying operations instead of just two, and tests those two a bit better than before. Symlink had to be fixed because there was a mismatch between the actual changelog format and the nsr-recon parsing code. Setxattr and removexattr are still hopelessly broken, but that code needs to be replaced anyway when we start putting the xattr names into the changelog so it's not worth fixing them right now. When that's done we'll be up to ten kinds of operations, missing only rename. Change-Id: I3d805cf8fd324221be03edc3e5fc26d7656e4af9 Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/nsr-recon/src/recon_xlator.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/xlators/cluster/nsr-recon/src/recon_xlator.c b/xlators/cluster/nsr-recon/src/recon_xlator.c
index ffbf74296..272c35dc2 100644
--- a/xlators/cluster/nsr-recon/src/recon_xlator.c
+++ b/xlators/cluster/nsr-recon/src/recon_xlator.c
@@ -391,19 +391,19 @@ gf_boolean_t nsr_recon_libchangelog_get_records(xlator_t *this, char *bp, int32_
}
rec->gfid[i] = '\0';
- if (opcode == GF_FOP_SYMLINK) {
- // the symlink would have been removed. Hence ignore this.
- // TBD - have an uniform error policy in case of such cases.
- // Right now we are handling some on the source and some on the destination.
- if(get_link_using_gfid(this->private, rec->gfid, rec->link_path) == _gf_false) {
- rec->type = NSR_LOG_HOLE;
- goto finish;
- }
- }
-
GF_ASSERT(*start == 0);
start ++;
+ if (opcode == GF_FOP_SYMLINK) {
+ i = 0;
+ do {
+ if (i >= 256) {
+ goto finish;
+ }
+ rec->link_path[i++] = *start;
+ } while (*(start++) != '\0');
+ }
+
i = 0;
// If type is fop_gfid_offset+_len, get offset
if ((type == fop_gfid_offset) || (type == fop_gfid_offset_len)) {