Bug 1133266 - remove unused parameter and correctly handle mem alloc failure
Summary: remove unused parameter and correctly handle mem alloc failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: stripe
Version: mainline
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Harshavardhana
QA Contact:
URL:
Whiteboard:
Depends On: 1002207
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-24 06:44 UTC by Harshavardhana
Modified: 2015-03-23 01:05 UTC (History)
4 users (show)

Fixed In Version:
Clone Of: 1002207
Environment:
Last Closed: 2015-02-12 20:15:07 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Harshavardhana 2014-08-24 06:44:00 UTC
+++ This bug was initially created as a clone of Bug #1002207 +++

Description of problem:

gf_memdup() has only a single user, namely the stripe translator. Does it warrant being in libglusterfs for just a single user?

It has an unused parameter.

The stripe xlator updates its idea of how long the xattrs are even if the memory allocation failed.


Version-Release number of selected component (if applicable):

all

How reproducible:

code examination

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2013-08-28 13:15:23 EDT ---

REVIEW: http://review.gluster.org/5716 (stripe: remove unused param, handle mem alloc failure) posted (#1) for review on master by Kaleb KEITHLEY (kkeithle)

--- Additional comment from Anand Avati on 2013-08-28 13:35:44 EDT ---

REVIEW: http://review.gluster.org/5716 (stripe: remove unused param, handle mem alloc failure) posted (#2) for review on master by Kaleb KEITHLEY (kkeithle)

--- Additional comment from Anand Avati on 2013-08-28 14:33:34 EDT ---

REVIEW: http://review.gluster.org/5716 (stripe: remove unused param, handle mem alloc failure) posted (#3) for review on master by Kaleb KEITHLEY (kkeithle)

--- Additional comment from Anand Avati on 2013-08-28 19:59:24 EDT ---

COMMIT: http://review.gluster.org/5716 committed in master by Anand Avati (avati) 
------
commit b880b6b2908ad4e4afc8e26613bd0db8f0b28750
Author: Kaleb S. KEITHLEY <kkeithle>
Date:   Wed Aug 28 22:43:41 2013 +0530

    stripe: remove unused param, handle mem alloc failure
    
    Change-Id: I9c27b1edab111031ca8eea9cc49480ea01e39089
    BUG: 1002207
    Signed-off-by: Kaleb S. KEITHLEY <kkeithle>
    Reviewed-on: http://review.gluster.org/5716
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 1 Harshavardhana 2014-08-24 06:45:37 UTC
This bug cloned since test case was improper

$ git diff
diff --git a/tests/bugs/bug-1002207.t b/tests/bugs/bug-1002207.t
index 50b8c7d..4fad2ff 100644
--- a/tests/bugs/bug-1002207.t
+++ b/tests/bugs/bug-1002207.t
@@ -18,7 +18,8 @@ EXPECT 'Created' volinfo_field $V0 'Status';
 TEST $CLI volume start $V0;
 EXPECT 'Started' volinfo_field $V0 'Status';
 
-dd if=/dev/zero of=$M0/file$i.data bs=1024 count=1024 1>/dev/null 2>&1
+TEST glusterfs --attribute-timeout=0 --entry-timeout=0 -s $H0 --volfile-id=$V0 $M0;
+TEST dd if=/dev/zero of=$M0/file$i.data bs=1024 count=1024;
 
 function xattr_query_check()
 {
@@ -40,7 +41,6 @@ function set_xattr()
 }
 
 EXPECT 0 set_xattr $M0/file$i.data "trusted.name" "testofafairlylongxattrstringthatbutnotlongenoughtofailmemoryallocation"
-
 EXPECT 0 xattr_query_check $M0/file$i.data "trusted.name"
 
 ## Finish up
@@ -51,4 +51,3 @@ TEST $CLI volume delete $V0;
 TEST ! $CLI volume info $V0;
 
 cleanup;
-

Comment 2 Anand Avati 2014-08-24 06:50:32 UTC
REVIEW: http://review.gluster.org/8519 (tests: bug-1002207.t - should mount glusterfs before tests) posted (#1) for review on master by Harshavardhana (harsha)

Comment 3 Anand Avati 2014-08-26 08:38:09 UTC
COMMIT: http://review.gluster.org/8519 committed in master by Harshavardhana (harsha) 
------
commit b6b279107c70044ea97949c573442340f31d0220
Author: Harshavardhana <harsha>
Date:   Sat Aug 23 23:46:51 2014 -0700

    tests: bug-1002207.t - should mount glusterfs before tests
    
    Change-Id: I9238ea8cf4e5ad9bab384ef08d873a5b0e578a33
    BUG: 1133266
    Signed-off-by: Harshavardhana <harsha>
    Reviewed-on: http://review.gluster.org/8519
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>

Comment 4 Kaleb KEITHLEY 2015-02-12 20:15:07 UTC
fix is in 3.6 branch by now


Note You need to log in before you can comment on or make changes to this bug.