summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nfs: refcount each auth_cache_entry and related data_tNiels de Vos2015-07-181-9/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that all the auth_cache_entry structures are only free'd when there is no reference to it anymore. When it is free'd, the associated data_t from the auth_cache->cache_dict gets unref'd too. Upon calling auth_cache_purge(), the auth_cache->cache_dict will free each auth_cache_entry in a secure way. Cherry picked from commit 7b51bd636fc5e5e1ae48a4e7cba48d0d20878d15: > Change-Id: If097cc11838e43599040f5414f82b30fc0fd40c6 > BUG: 1226717 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11023 > Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: If097cc11838e43599040f5414f82b30fc0fd40c6 BUG: 1242515 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11646 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* nfs: add a gf_lock_t for the auth_cache->cache_dictNiels de Vos2015-07-182-40/+126
| | | | | | | | | | | | | | | | | | | | | | | This is the 1st step towards implementing reference counters for the auth_cache_entry structure. Access to the structures should always be done atomically, but this can not be guaranteed by the a dict. Cherry picked from commit 67f7562b5cc9e42774d1dc569471f86f61eef040: > Change-Id: Ic165221d72f11832177976c989823d861cf12f01 > BUG: 1226717 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11021 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Change-Id: Ic165221d72f11832177976c989823d861cf12f01 BUG: 1242515 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11645 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* quota: fix quota test casevmallika2015-07-162-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11673/ Below command is wrong way of executing mutilple command with | (pipe) local cmd="$CLI volume quota $V0 list $QUOTA_PATH | grep $QUOTA_PATH | awk '{print \$$FIELD}'" $cmd This patch fixes the issue This patch also fixes testcase inode-quota.t, which checking quota values in wrongs fields > Change-Id: If28732e6a76ea4bf75560f6496c8f56670915cf9 > BUG: 1229297 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I301a62566a97bbb4cc9657e1139772de1f09049a BUG: 1242329 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11674 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* syncop: Include iatt to 'syncop_link' argsSoumya Koduri2015-07-156-10/+16
| | | | | | | | | | | | | | | | | Include iatt to 'syncop_link' args to fetch proper attributes of the newly linked inode. This is backport of the below fix - http://review.gluster.org/11611 Change-Id: If6b92961bd7a89add3791ed3a9b494087348b492 BUG: 1243408 Reviewed-on: http://review.gluster.org/11611 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11677 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrsRaghavendra Bhat2015-07-142-7/+106
| | | | | | | | | | | | | | | Backport of http://review.gluster.org/11389 * setxattr and {f}removexattr of versioning, signature and bad-file xattrs are returned with error. Change-Id: I8fe5f973d6e410bec2758959d20d379189808d5e BUG: 1241529 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11604 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>
* features/bit-rot-stub: deny access to bad objectsRaghavendra Bhat2015-07-147-32/+430
| | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11126 * Access to bad objects (especially operations such as open, readv, writev) should be denied to prevent applications from getting wrong data. * Do not allow anyone apart from scrubber to set bad object xattr. * Do not allow bad object xattr to be removed. Change-Id: I6903184ab64a9d1ea595330b603935979c33bc26 BUG: 1241529 Reviewed-on: http://review.gluster.org/11603 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>
* quota/marker: fix mem-leak in markervmallika2015-07-142-49/+44
| | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11617/ Free local in error paths > Change-Id: I76f69e7d746af8eedea34354ff5a6bf50234e50e > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I0f87ee11970e7bf6f8c910d112fc988c2afd6eca BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11620 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* NFS-Ganesha : Add-node does not copy "exports" directory correctlyMeghana M2015-07-141-6/+6
| | | | | | | | | | | | | | | | | Add-node logic has to copy the "exports" directory into the new node in the same path. There was an error in copying to the correct path. Fixing it. This is a backport of the patch merged upstream, http://review.gluster.org/#/c/11618/ Change-Id: I76d8679966372d6fcee2dcf38bc20c9b5c522132 BUG: 1242192 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11635 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: Fix failure in replace-brick when src-brick is offlineAnuradha Talur2015-07-142-75/+25
| | | | | | | | | | | Change-Id: I0fdb58e15da15c40c3fc9767f2fe4df0ea9d2350 BUG: 1242728 Reviewed-on: http://review.gluster.org/11651 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/11656
* cluster/tier: fixes for migration over ec as cold tierDan Lambright2015-07-142-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of fix 11433. > An opendir is done in rebalance. The graph constructed when > EC is used in tiering may have no local volumes (if > all the hot volumes are on one node and all the others on > another node). Previously the opendir only sent fops down > the local subvolumes for migration. They must be sent down > both the hot and cold subvolumes for tiering. > When setxattr2() received a NULL subvolume; this dereferenced > an uninitialized variable. > When a lookup is done during creation of the destination > file, the xattr dict is "polluted" with virtual xattrs. > These cause subsequent xattrs in the new file to not be > written by posix. They are required by EC. > The inode gfid for "entry_loc" in gf_defrag_migrate_single_file() > was not initialized. This made underlying translators > think the gfid was 0, and failed migration. > Change-Id: I6ccda8ca8e43485b9b354341bbfcb302496f632c > BUG: 1236212 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I9b26725e055eecfec235c4291ee90b0e53d0ea62 BUG: 1242274 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/11652 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* quota/marker: use smaller stacksize in synctask for marker updationvmallika2015-07-145-14/+32
| | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11499/ Default stacksize that synctask uses is 2M. For marker we set it to 16k Also move market xlator close to io-threads to have smaller stack > Change-Id: I8730132a6365cc9e242a3564a1e615d94ef2c651 > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Id1cb6288a38d370956cc47aed5253ff95f04c966 BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11595 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* rpc-transport: socket_poller fixes for proper working of mgmt encryptionKaushal M2015-07-141-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 8c39f14 from master socket_poller, the polling function used by ssl own_thread, had two issues which lead to GlusterD crashes when using management encryption Issue 1 ------- socket_poller calls functions which require THIS to be set. But, THIS was being set conditionally. Because of this, functions could sometimes be called without THIS being set. For example, rpc_transport_notify could be called for an accepted client socket without THIS being set, as THIS was only set it the transport wasn't yet connected. This would cause the process to crash when THIS was accessed by the called functions. To fix this, THIS is being set at the start of socket_poller unconditionally. Issue 2 ------- DISCONNECT notify was being sent on the listener transport instead of the client transport. The DISCONNECT event was converted to a LISTENER_DEAD event in rpcsvc_handle_disconnect, as it could not find the listener socket of the listener socket. GlusterD was notified of a LISTENER_DEAD event instead of a DISCONNECT and failed to remove the client transport from its xprt_list. The transport would subsequently be freed, leaving the xprt_list with a corrupted/invalid entry. Later, when GlusterD would iterate over the xprt_list to send notifications, it would crash when the invalid entry was accessed. To fix this, DISCONNECT notification in socket_poller is sent on the client socket, as it is done in the epoll handler. Change-Id: I0370b7c6d7eb13de10ebf08d91a4a39dc7d64c7a BUG: 1242734 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11655 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* refcount: correct the documentationNiels de Vos2015-07-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | The only check that _gf_ref_get() needs is "== 0" for detecting a failure. The actual return value is not guaranteed to be the number of active refences (they can change in other threads anyway). Cherry picked from commit c7f309116d8fa62f6b9fd6ff2902e8ce4bfa192d: > BUG: 1163543 > Change-Id: I8801601eab37046f5a5ee0bce5a62606115ca151 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/11328 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: I8801601eab37046f5a5ee0bce5a62606115ca151 BUG: 1242515 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11647 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* mem-pool,stack,store,syncop,timer/libglusterfs : Porting to a new logging ↵Mohamed Ashiq2015-07-149-155/+201
| | | | | | | | | | | | | | | | | | | | | | framework Backport of http://review.gluster.org/10827 Cherry picked from 2b9b3ef3b646989bbc0412dca187b3f5fcad3283 >Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10827 >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11478 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* quota/marker: fix mem leak in markervmallika2015-07-131-65/+96
| | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11457/ Part of the fix is available in: http://review.gluster.org/#/c/11527/ This patch optimizes the memory consumption. create syntask txn only for linked inodes Change-Id: Ia4410840025eb4f48a48c26b043862b4f8d5aa84 BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11593 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/quota : Fix spurious failurevmallika2015-07-1311-138/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11125/ Problem : Basically, in this test case a file is created which exceeds the quota limit. Once the limit is reached that file will be deleted. At the same moment we are testing inode-quota. It can so happen that before the marker updates the information related to deletion of file, a new file creation operation comes and sees that quota limit is still exceeded. Solution : Inducing a check to see if marker updation completed successfully. Updated all the test case which has the similar machanism and also moved the "usage" function to a common place "volume.rc" > Change-Id: I36ddbc5ebbf1b74c9d326a0d1d5f3b32f20a906a > BUG: 1229297 > Signed-off-by: Sachin Pandit <spandit@redhat.com> > Signed-off-by: vmallika <vmallika@redhat.com> > Reviewed-on: http://review.gluster.org/11125 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: Iccc36de2b3a1e1a068d1a8d5e98d413c3afa1bc7 BUG: 1242329 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11642 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* quota/marker: inspect file/dir invoked without having quota xattrs requestedvmallika2015-07-131-3/+11
| | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11616/ In a lookup and build ancestry quota xattrs are not requested, it gives wrong assumption that quota xattrs are missing and tries to do healing process > Change-Id: I7135101ec0edc72a6310dbb304227eaa3b16cb46 > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I286d9634e8afeab691d8f4caa70865adfe8b184a BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11619 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: use a real host name (instead of numeric) when we have oneKrishnan Parthasarathi2015-07-131-0/+6
| | | | | | | | | | | | Change-Id: Ie9cc201204d3d613e3e585cab066a07283db902c BUG: 1241963 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/11587 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11624
* defaults,globals,iobuf,latency,logging,options,xlator/libglusterfs : porting ↵Mohamed Ashiq2015-07-138-179/+231
| | | | | | | | | | | | | | | | | | | | | | to a new logging framework Backport of http://review.gluster.org/10826 Cherry picked from ef374774b8727b2f76915a1f88b26c83c77dde43 >Change-Id: If6a55186cddc3d1c4d22e3d56b45358b84feeb49 >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10826 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: If6a55186cddc3d1c4d22e3d56b45358b84feeb49 BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11405 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: Get the local txn_info based on trans_id in op_sm call backs.anand2015-07-135-70/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: when two or more transactions are running concurrently in op_sm, global op_info might get corrupted. Fix: Get local txn_info based on trans_id instead of using global txn_info for commands (re-balance, profile ) which are using op_sm in originator. TODO: Handle errors properly in call backs and completely remove the global op_info from op_sm. Backport of: >Change-Id: I9d61388acc125841ddc77e2bd560cb7f17ae0a5a >BUG: 1229139 >Signed-off-by: anand <anekkunt@redhat.com> >Reviewed-on: http://review.gluster.org/11120 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit c9765bcb1557ab1e921080e7de4f3ebac1e424d5) Change-Id: I4405a4a1cf4c853b5d2ce478fd65043e45a79826 BUG: 1230523 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11557 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Fix management encryption issues with GlusterDKaushal M2015-07-132-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport for 01b82c6 from master Management encryption was enabled incorrectly in GlusterD leading to issues of cluster deadlocks. This has been fixed with this commit. The fix is in two parts, 1. Correctly enable encrytion for the TCP listener in GlusterD and re-enable own-threads for encrypted connections. Without this, GlusterD could try to esatblish the blocking SSL connects in the epoll thread, for eg. when handling friend updates, which could lead to cluster deadlocks. 2. Explicitly enable encryption for outgoing peer connections. Without enabling encryption explicitly for outgoing connections was causing SSL socket events to be handled in the epoll thread. Some events, like disconnects during peer detach, could lead to connection attempts to happen in the epoll thread, leading to deadlocks again. Change-Id: I438c2b43f7b1965c0e04d95c000144118d36272c BUG: 1241784 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11610 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* quota/marker: fix spurious failure afr-quota-xattr-mdata-heal.tvmallika2015-07-127-32/+48
| | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11583 During quota-update process if inode info is present in size-xattr and missing in contri-xattrs, then in function '_mq_get_metadata', we set contri-size as zero (on error -2, which means usage info present, but inode info missing). With this we are calculating wrong delta and updating the same. With this patch we are ignoring errors if inode info in xattrs are missing > Change-Id: I7940a0e299b8bb425b5b43746b1f13f775c7fb92 > BUG: 1241153 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ie85fa84b5362ae179cc43402bd6a3a6d96a04b81 BUG: 1241831 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11614 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* quota/marker: set lk_owner when taking lock on parent in renamevmallika2015-07-122-0/+22
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11561/ Before doing a rename operation marker takes inode lock on the file parent, here lk_owner is NULL and this can cause accounting problem with multiple rename on the same directory This patch fix the problem by setting lk_owner > Change-Id: Ibb789e39b2833e425d0a5fca85282ff1465206cb > BUG: 1240598 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: Ibd3abaee2dd5d132906a79a518fbcedcdefc4552 BUG: 1241487 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11601 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tools/glusterfind: RENAME and MODIFY issuesAravinda VK2015-07-122-12/+30
| | | | | | | | | | | | | | | | | | | | | | If Modification happens before RENAME, GFID to Path Conversion converts it into New Path. Delete Modify Entry and insert again So that MODIFY <NEW NAME> comes after RENAME. Default value of pgfids and basenames changed to "" instead of NULL Also fixed RENAME issue of displaying "RENAME <NEW NAME> <NEW NAME>". Also fixed RENAME followed by missing MODIFY Change-Id: I8202f6e6ec33f7bd921e71da38677f2ee2dab87a BUG: 1236282 Signed-off-by: Kotresh HR <khiremat@redhat.com> Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/11443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit adc704557a141a624fc702f7303b8b81582e1598) Reviewed-on: http://review.gluster.org/11548 Reviewed-by: Venky Shankar <vshankar@redhat.com>
* geo-rep: Fix fd referenced before assignmentKotresh HR2015-07-121-2/+6
| | | | | | | | | | | | | | | | Fix fd reference before assignment in mgmt_lock function. BUG: 1240607 Change-Id: Ib8a5207a516eecb55a5f906ff5d49abc98cab2a6 Reviewed-on: http://review.gluster.org/11318 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11563 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* features/posix : Avoid double free of a variable in posix_setxattr()Jiffin Tony Thottan2015-07-121-24/+24
| | | | | | | | | | | | | | | | | | | | | The buffer acl_xattr is introduced in posix_setxattr() as part of http://review.gluster.org/#/c/11519/. This variable can be freed twice in the code path , one in dict_unref() and another by explicit GF_FREE() call in the code. This patch avoids the same. Backport of http://review.gluster.org/#/c/11627/ >Change-Id: I31c6384e37ab8d8baaed7a53de668c2eb5d82338 >BUG: 1242030 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: I172be30c0570fe096138c2e529c45fb26497f649 BUG: 1242031 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/11628 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* access_control : avoid double unrefing of acl variable in its context.Jiffin Tony Thottan2015-07-121-15/+16
| | | | | | | | | | | | | | | | | | | | | In handling_other_acl_related_xattr(), acl variable is unrefered twice after updating the context of access_control translator.So the acl variable stored in the inmemory context will become invalid one. When the variable accessed again , it will result in brick crash. This patch fixes the same. Backport of http://review.gluster.org/#/c/11632/ >Change-Id: Ib95d2e3d67b0fb20d201244a206379d6261aeb23 >BUG: 1242041 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: I5dc69d8ea8f3e4740a90a52cabf86e317950a659 BUG: 1242044 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/11634 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd/geo-rep: Fix failure of geo-rep pauseKotresh HR2015-07-101-4/+17
| | | | | | | | | | | | | | | | | | | Geo-replication pause fails if one or more of the nodes in the master cluster is not part of master volume. If the master volume bricks are not part of the node, it should be ignored. The check is added to fix the issue. BUG: 1240616 Change-Id: If10da6921d0c87d6e1c1c4ceba975c4b1e3bf302 Reviewed-on: http://review.gluster.org/11549 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11564 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
* NFS-Ganesha : Export fails on RHEL 7.1Meghana M2015-07-103-8/+93
| | | | | | | | | | | | | | | | | | | We grep for CONFFILE parameter in "/etc/syconfig/ganesha" file to find out the path of the ganesha config file. In RHEL 7.1, this parameter does not exist in the file and we can't find out the ganesha config file. Export fails invariably due to this. Changing this pattern to a more generic one and default it to "/etc/ganesha/ganesha.conf" This patch is a backport of the fix merged upstream, http://review.gluster.org/#/c/11594/ Change-Id: Ia0f87f964a5771b97d9077f17a0387d7a01e02b6 BUG: 1241885 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11621 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gfapi: Update loc->inode accordingly in 'glfs_loc_link'Soumya Koduri2015-07-102-15/+11
| | | | | | | | | | | | | | | | | | | In case if the inode already exits in the cache, inode_link returns the pointer to the exiting one instead of using loc->inode. This will result in issues if that invalid inodei(loc->inode) is referenced further. Fixed the same. This is backport of the below fix - http://review.gluster.org/#/c/11572/ BUG: 1241666 Change-Id: I1a89932397f7d2b70d619eeaf862c0a5d7f6b91c Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11572 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-on: http://review.gluster.org/11606 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* quotad: create sock listener only after graph init is completevmallika2015-07-092-4/+38
| | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11552/ If FOPs are received before completing graph initialization, FOP path can crash while accessing uninitialized variables This patch fixes issue by not creating listener until graph initialization is complete and hence not receiving FOP request > Change-Id: I4771e376410843dff44bfe819329a4632523d266 > BUG: 1240254 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I6c5964a8334abdc26aa2813c13f09e796e22b10a BUG: 1240906 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* common-ha: ganesha-ha.sh status tries to read ganesha-ha.confKaleb S. KEITHLEY2015-07-091-20/+20
| | | | | | | | | | | | | | | | status doesn't need to read the config backport of > Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd > BUG: 1241133 > http://review.gluster.org/#/c/11581/ Change-Id: I036fd3072f38958373b1a85b0dc5c97245a72af4 BUG: 1241134 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11582 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* features/bitrot: convert pending gf_log() to gf_msg()Venky Shankar2015-07-094-30/+73
| | | | | | | | | | | | Backport of http://review.gluster.org/11396 Change-Id: Idfd245327b485459ccbda503510b8ca0127bb66c BUG: 1226666 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11542 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* features/bitrot: handle scrub states via state machineVenky Shankar2015-07-097-52/+331
| | | | | | | | | | | | | | | Backport of http://review.gluster.org/11149 A bunch of command line options for scrubber tempted the use of state machine to track current state of scrubber under various circumstances where the options could be in effect. Change-Id: Id614bb2e6af30a90d2391ea31ae0a3edeb4e0d69 BUG: 1226666 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11541 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/bitrot: cleanup, v2Venky Shankar2015-07-098-67/+214
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11148 This patch uses "cleanup, v1" infrastrcuture to cleanup scrubber (data structures, threads, timers, etc..) on brick disconnection. Signer is not cleaned up yet: probably would be done as part of another patch. Change-Id: I78a92b8a7f02b2f39078aa9a5a6b101fc499fd70 BUG: 1226666 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11540 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/bitrot: cleanup, v1Venky Shankar2015-07-093-126/+271
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11147 This is a short series of patches (with other cleanups) aimed at cleaning up some of the incorrect assumptions taken in reconfigure() leading to crashes when subvolumes are not fully initialized (as reported here[1] on gluster-devel@). Furthermore, there is some amount of code cleanup to handle disconnection and cleanup up data structure (as part of subsequent patch). [1] http://www.gluster.org/pipermail/gluster-devel/2015-June/045410.html Change-Id: I68ac4bccfbac4bf02fcc31615bd7d2d191021132 BUG: 1226830 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11539 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/server: Add null check to gf_client_putRaghavendra G2015-07-092-1/+7
| | | | | | | | | | | | Change-Id: I8bab3cd7387f89743e15e7569f0bc83a7df3c754 BUG: 1240603 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/11550 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11562 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* call-stub,circ-buff,client_t,compat,dict/libglusterfs : Porting to a new ↵Mohamed Ashiq2015-07-096-182/+256
| | | | | | | | | | | | | | | | | | | | | | | logging framework Backport of http://review.gluster.org/10828 Cherry picked from a1e32fbcfbfaf6e4c63e140b3b90a80dc748a269 >Change-Id: Ie7d180e0ab2fed1270d66504606d1b2522884020 >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10828 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: Ie7d180e0ab2fed1270d66504606d1b2522884020 BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11406 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* event,parse-utils,quota-common-utils,rbthash/libglusterfs : Porting to new ↵Mohamed Ashiq2015-07-097-104/+126
| | | | | | | | | | | | | | | | | | | | | | logging framework Backport of http://review.gluster.org/10823 Cherry-picked from a9b6933ef097d2a81ce21a8aeda2acc569cd1509 >Change-Id: I13ae9a97fe442c06cf50fe77c63718ea0858dc4d >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10823 >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: I13ae9a97fe442c06cf50fe77c63718ea0858dc4d BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11404 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd/snapd: Stop snapd daemon when glusterd is restartingAvra Sengupta2015-07-081-0/+6
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/11575/ Stop snapd daemon when glusterd is coming back, if uss is disabled, or volume is stopped. Change-Id: I4313ecaff19de30f3e9ea76881994509402ed5b0 BUG: 1240955 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11576 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* libglusterfs: Use GF_CALLOC/GF_FREE instead of CALLOC/FREEPranith Kumar K2015-07-082-144/+147
| | | | | | | | | | | | | | | | | | | | | - Also removed numbers for the types as the string form of type is printed in statedump now, so the numbers are not needed anymore. >Change-Id: I6e8c15a1dc8cb6187842f96f1d46ec0f26a602b4 >BUG: 1237381 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/11495 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Vijay Bellur <vbellur@redhat.com> >(cherry picked from commit e7f2547f89dbcd90cdb3714f63620a36bdc2ef3a) Change-Id: I60dbe14ba0c9855982e235001ee86747e3fa87a0 BUG: 1238476 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11501 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_file for ↵Avra Sengupta2015-07-081-6/+6
| | | | | | | | | | | | | | | | | | writing data into tmp file and then making an atomic rename to the required filename The reason for using this location is that it adheres to the selinux policies. Also moving the update of the current_scheduler file, under the lock so as to avoid multiple writes Change-Id: I61e62b5daf6f1bce2319f64f7b1dfb8b93726077 BUG: 1239270 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11536 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* quota/marker: fix mem leak in markervmallika2015-07-072-170/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11457/ Problem-1) Now the marker accounting happens in background, There is a possibility that before completing create_xattr_txn another create txn can be initiated for the same inode. suppose if few 100 txns are initiated before completion, this can block all synctask threads waiting on a lock and this can also consume lot of memory and can take more time to complete the background accounting operation. This patch improves the locking mechanism which can improve the performance as well reduce memory consumption Problem-2) For every lookup and for all inodes in readdirp we were initiating a new txn, this can result in more txn pending in synctask queue and lead to huge memory consumption. inspect file/dir should start a txn only if there is some delta Problem-3) When there are multiple write operations on same inode and all the synctask threads are busy. As we are checking for updation_status flag in background, all txn will be move to synctask queue. This can increase the mem usage. Only one txn for inode in a queue will be sufficient, so check and set updation falg before moving txn to background > Change-Id: Ic42ce00f0a50ce51c7128ba68a1b6a0699a1cd14 > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I52a05b99b19b97c79b69671120f53e05481f99cd BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11527 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* fd,inode/libglusterfs : porting to a new logging frameworkMohamed Ashiq2015-07-073-107/+172
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/10825/ Cherry picked from d32b221747cf6742cffaff5a60e16269dffd04cc >Change-Id: I4beba3b50456f802824374b6e3fa8079d72f2c00 >BUG: 1194640 >Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> >Reviewed-on: http://review.gluster.org/10825 >Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> >Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: I4beba3b50456f802824374b6e3fa8079d72f2c00 BUG: 1217722 Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com> Reviewed-on: http://review.gluster.org/11402 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* posix: fix mem-leak in posix_get_ancestry error pathvmallika2015-07-071-0/+7
| | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/11522/ > Change-Id: I47c8a8f170151f6374fc0420278aedf3ff5443ee > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I7863634ba7b3a2e8933d891df72cda7e129aa2a2 BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11528 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* quota: fix mem leak in quota enforcervmallika2015-07-071-1/+1
| | | | | | | | | | | | | | | | | | | This is a backport of review.gluster.org/#/c/11526/ Do inode_unref on parent > Change-Id: I21d82eb8716dd73aa2dc291b3ae8506e4fb4ea8b > BUG: 1207735 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I4caeedbe8721b660df1c8502a0a42033f1d40a97 BUG: 1229282 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11529 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: Correction in Error message for disperseAshish Pandey2015-07-071-2/+7
| | | | | | | | | | | | | | | | | | | volume create Problem: If all the bricks are on same server and creating "disperse" volume without using "force", it throws a failure message mentioning "replicate" as volume. Solution: Adding failure message for disperse volume too Change-Id: I9e466b1fe9dae8cf556903b1a2c4f0b270159841 BUG: 1232185 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11251 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* tests: rebalance completed should only check the status for completedAtin Mukherjee2015-07-071-2/+2
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/11055 Change-Id: I1abc91cefaf16d1c8351f35e951c26078ef90544 BUG: 1232602 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11055 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit 1950f30ee77df938a76159f07fe8f8ca3ef14cf8) Reviewed-on: http://review.gluster.org/11271 Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's ↵Avra Sengupta2015-07-064-17/+12
| | | | | | | | | | | | | | | | | | | | | | | brick Backport of http://review.gluster.org/#/c/11533/ The brick path we use to create shared storage is /var/run/gluster/ss_brick. The problem with using this brick path is /var/run/gluster is a tmpfs and all the brick/shared storage data will be wiped off when the node restarts. Hence using /var/lib/glusterd/ss_brick as the brick path for shared storage volume as this brick and the shared storage volume is internally created by us (albeit on user's request), and contains only internal state data and no user data. Change-Id: I808d1aa3e204a5d2022086d23bdbfdd44a2cfb1c BUG: 1230399 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11534 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: populate errstr if gd_syncop_submit_request failsAtin Mukherjee2015-07-061-0/+3
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/10659 Change-Id: Ie4a3edef5d553fc07de53b46f9485c46a4305245 BUG: 1223318 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/10659 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com> (cherry picked from commit 988db25572b94220a7cc69bcc3040c2a77b8e9a5) Reviewed-on: http://review.gluster.org/10838 Tested-by: NetBSD Build System <jenkins@build.gluster.org>