diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2015-07-20 16:03:40 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2015-08-14 01:12:41 -0700 |
commit | ae37a97252e33e1c5cb636b679e2458a489d2550 (patch) | |
tree | daf6b0b79ce61cdc9a7655f9ee1e60bfbfbf7b95 /xlators | |
parent | 39f2a499c69943dd0430e75276f55262de8c26b4 (diff) |
tests: set inode-lru-limit to 1 and check if bit-rot xattrs are wrongy created
Backport of http://review.gluster.org/11718
This test sets the lru limit of the inode table to 1 and checks if inode forgets
and resolve cause any problem with bit-rot xattrs (especially bad-file xattr).
Change-Id: I3a19f90384c980368152bb723e7263eab2bed6bd
BUG: 1252348
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/11881
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 906dc00acf5..5f3d475c595 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -167,12 +167,14 @@ resolve_gfid_cbk (call_frame_t *frame, void *cookie, xlator_t *this, inode_path (resolve_loc->parent, resolve_loc->name, (char **) &resolve_loc->path); - dict = dict_copy_with_ref (state->xdata, NULL); - if (!dict && state->xdata) - gf_msg (this->name, GF_LOG_ERROR, ENOMEM, PS_MSG_NO_MEMORY, - "BUG: dict allocation failed (pargfid: %s, name: %s), " - "still continuing", uuid_utoa (resolve_loc->gfid), - resolve_loc->name); + if (state->xdata) { + dict = dict_copy_with_ref (state->xdata, NULL); + if (!dict) + gf_msg (this->name, GF_LOG_ERROR, ENOMEM, PS_MSG_NO_MEMORY, + "BUG: dict allocation failed (pargfid: %s, name: %s), " + "still continuing", uuid_utoa (resolve_loc->gfid), + resolve_loc->name); + } STACK_WIND (frame, resolve_gfid_entry_cbk, frame->root->client->bound_xl, @@ -210,12 +212,14 @@ resolve_gfid (call_frame_t *frame) resolve_loc->inode = inode_new (state->itable); ret = loc_path (resolve_loc, NULL); - xdata = dict_copy_with_ref (state->xdata, NULL); - if (!xdata && state->xdata) - gf_msg (this->name, GF_LOG_ERROR, ENOMEM, PS_MSG_NO_MEMORY, - "BUG: dict allocation failed (gfid: %s), " - "still continuing", - uuid_utoa (resolve_loc->gfid)); + if (state->xdata) { + xdata = dict_copy_with_ref (state->xdata, NULL); + if (!xdata) + gf_msg (this->name, GF_LOG_ERROR, ENOMEM, PS_MSG_NO_MEMORY, + "BUG: dict allocation failed (gfid: %s), " + "still continuing", + uuid_utoa (resolve_loc->gfid)); + } STACK_WIND (frame, resolve_gfid_cbk, frame->root->client->bound_xl, |