diff options
author | Amar Tumballi <amarts@redhat.com> | 2018-02-01 22:56:09 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-02-01 23:19:01 +0530 |
commit | 641e5be8d1bcbb5161487eeb84229eed5ee5c31b (patch) | |
tree | c48e7290b2ee6fb7302682f1fb04e27620a1f61e /xlators | |
parent | 0e6e8216823c2d9dafb81aae0f6ee3497c23d140 (diff) | |
download | glusterfs-641e5be8d1bcbb5161487eeb84229eed5ee5c31b.tar.gz glusterfs-641e5be8d1bcbb5161487eeb84229eed5ee5c31b.tar.xz glusterfs-641e5be8d1bcbb5161487eeb84229eed5ee5c31b.zip |
sdfs: crash fixes
* from the patch which got tested in experimental branch, there
was a code cleanup involved, which missed setting of a local
variable, which led to crash immediately after enabling the
feature.
* added a sanity test case to validate all the fops of sdfs.
Updates: #397
Change-Id: I7e0bebfc195c344620577cb16c1afc5f4e7d2d92
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/sdfs/src/sdfs.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c index 3b70dce5d2..0c45cad623 100644 --- a/xlators/features/sdfs/src/sdfs.c +++ b/xlators/features/sdfs/src/sdfs.c @@ -263,7 +263,8 @@ sdfs_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -355,7 +356,8 @@ sdfs_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -452,7 +454,8 @@ sdfs_create (call_frame_t *frame, xlator_t *this, loc_t *loc, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -544,7 +547,8 @@ sdfs_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -639,7 +643,8 @@ sdfs_symlink (call_frame_t *frame, xlator_t *this, const char *linkname, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -861,7 +866,6 @@ sdfs_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, local->main_frame = frame; - lock = GF_CALLOC (1, sizeof (*lock), gf_common_mt_char); if (!lock) goto err; @@ -986,7 +990,8 @@ sdfs_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), @@ -1279,7 +1284,8 @@ sdfs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, goto err; } - ((sdfs_local_t *)new_frame->local)->stub = stub; + local = new_frame->local; + local->stub = stub; STACK_WIND (new_frame, sdfs_entrylk_cbk, FIRST_CHILD (this), |