From c0da330c32312edc4233fe6f660ce8e218638fb5 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Mon, 20 Jul 2015 16:03:40 +0530 Subject: tests: set inode-lru-limit to 1 and check if bit-rot xattrs are wrongy created 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: I1fa25fa2d31dda8d26e8192562e896e5bddd0381 BUG: 1244613 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/11718 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Venky Shankar --- xlators/protocol/server/src/server-resolve.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 91654ceb172..a7071daaf6a 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -162,12 +162,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, @@ -205,12 +207,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, -- cgit