diff options
| author | Raghavendra Bhat <raghavendra@redhat.com> | 2015-07-20 16:03:40 +0530 | 
|---|---|---|
| committer | Venky Shankar <vshankar@redhat.com> | 2015-08-10 21:22:09 -0700 | 
| commit | c0da330c32312edc4233fe6f660ce8e218638fb5 (patch) | |
| tree | bae1c42b34d2a60483df6977703542e56055660c /xlators/protocol/server/src | |
| parent | cdf238e7c90273beff73617481d19d77fc8014db (diff) | |
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 <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/11718
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/protocol/server/src')
| -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 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,  | 
