diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-06-30 11:22:31 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-08-19 01:38:33 -0700 |
commit | d703745493e7cf5eec41875dc5c786d29ef2de03 (patch) | |
tree | 08aa35bbef88924fdd610e16e0c2aecc3abfd274 /xlators/features/changetimerecorder/src/changetimerecorder.c | |
parent | b54353ec7e3ceaee1100f3616a6725e3dd67a539 (diff) |
ctr:Avoid assertion failure in lookup
in ctr_lookup, the loc variable need not be comes with pargfid,
though there is a parent for the inode. The same for loc->name
also. From this patch, we will generate loc->name from loc->path
Back port of :
>Change-Id: I24a79554748139504ec09f77930f8208d3805977
>BUG: 1236128
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: http://review.gluster.org/11459
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>Reviewed-by: Joseph Fernandes
(cherry picked from commit 2e44d1580497eb75f325ad3104249a425ddf592a)
Change-Id: Ia926bee45059ec97bbe5120f19999b9d5a71aa88
BUG: 1254439
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/11947
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/features/changetimerecorder/src/changetimerecorder.c')
-rw-r--r-- | xlators/features/changetimerecorder/src/changetimerecorder.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 703df496e95..7fd62584752 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -334,8 +334,8 @@ ctr_lookup (call_frame_t *frame, xlator_t *this, goto out; /*fill ctr link context*/ - FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, - loc->path); + FILL_CTR_LINK_CX(_link_cx, loc->parent->gfid, loc->name, + loc->path, out); /* Fill ctr inode context*/ /* IA_IFREG : We assume its a file in the wind @@ -764,11 +764,11 @@ ctr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, /*Fill old link context*/ FILL_CTR_LINK_CX(_olink_cx, oldloc->pargfid, oldloc->name, - oldloc->path); + oldloc->path, out); /*Fill new link context*/ FILL_CTR_LINK_CX(_nlink_cx, newloc->pargfid, newloc->name, - newloc->path); + newloc->path, out); /*Fill ctr inode context*/ FILL_CTR_INODE_CONTEXT(_inode_cx, oldloc->inode->ia_type, @@ -874,7 +874,7 @@ ctr_unlink (call_frame_t *frame, xlator_t *this, CTR_IS_DISABLED_THEN_GOTO(this, out); /*Fill link context*/ - FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, loc->path); + FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, loc->path, out); /*Fill ctr inode context*/ FILL_CTR_INODE_CONTEXT(_inode_cx, loc->inode->ia_type, @@ -1123,7 +1123,7 @@ ctr_mknod (call_frame_t *frame, xlator_t *this, gf_uuid_copy (gfid, uuid_req); /*fill ctr link context*/ - FILL_CTR_LINK_CX (_link_cx, loc->pargfid, loc->name, loc->path); + FILL_CTR_LINK_CX (_link_cx, loc->pargfid, loc->name, loc->path, out); /*Fill ctr inode context*/ FILL_CTR_INODE_CONTEXT (_inode_cx, loc->inode->ia_type, @@ -1212,7 +1212,7 @@ ctr_create (call_frame_t *frame, xlator_t *this, gf_uuid_copy (gfid, uuid_req); /*fill ctr link context*/ - FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, loc->path); + FILL_CTR_LINK_CX(_link_cx, loc->pargfid, loc->name, loc->path, out); /*Fill ctr inode context*/ FILL_CTR_INODE_CONTEXT(_inode_cx, loc->inode->ia_type, @@ -1292,7 +1292,7 @@ ctr_link (call_frame_t *frame, xlator_t *this, /*fill ctr link context*/ FILL_CTR_LINK_CX(_link_cx, newloc->pargfid, newloc->name, - newloc->path); + newloc->path, out); /*Fill ctr inode context*/ FILL_CTR_INODE_CONTEXT(_inode_cx, oldloc->inode->ia_type, |