summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* features/bitrot: move inode state just at the last momentVenky Shankar2015-07-131-19/+42
| | | | | | | | | | | | | | | Which was done at half the set expiry time resulting in actual IOs incrementing the object version. Now this is done just at the last moment with re-notification now cut-shorting into checksum calculation without waiting in the timer-wheel. BUG: 1242317 Change-Id: If655b77d822ebf7b2a4f65e1b5583dd3609306e7 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11461 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>
* rdma : porting missing gf_log to gf_msgManikandan Selvaganesh2015-07-123-12/+18
| | | | | | | | | Change-Id: I036b43007fbcd0e528faab8d44e1a7fc820eaf1f BUG: 1242333 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11607 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: Fixing dereference after null checkarao2015-07-121-4/+4
| | | | | | | | | | | | | | | CID: 1124557 Checking for the pointer itself before dereferencing it to check for the variable's value it is pointed to. Change-Id: Idcbb034e4c6d58501697e01e90647b6233a5e5ba BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9661 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> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/quota : Fix spurious failurevmallika2015-07-1211-138/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ctr:Avoid assertion failure in lookupMohammed Rafi KC2015-07-122-13/+13
| | | | | | | | | | | | | | in ctr_lookup, the loc variable need not be comes with pargfid, though there is a parent for the inode. The same for loc->name also. From this patch, we will generate loc->name from loc->path Change-Id: I24a79554748139504ec09f77930f8208d3805977 BUG: 1236128 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11459 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes
* libglusterfs: delete duplicate codePrasanna Kumar Kalever2015-07-121-6/+0
| | | | | | | | | | | | | | This patch saves cpu cyles by deleting duplicated code in most frequently used functions 'dict_set_static_bin' & 'dict_set_bin' which is already repeated/executed in function 'bin_to_data' Change-Id: I8e18b3f2b321e06bb6bd5a67e1782cb159182dd2 BUG: 1232304 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11255 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.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. Change-Id: I31c6384e37ab8d8baaed7a53de668c2eb5d82338 BUG: 1242030 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/11627 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: fix gitclean targetPrasanna Kumar Kalever2015-07-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | $ make gitclean # deleting unexpected 'Makefile' files ... $ git status ... deleted: extras/FreeBSD/Makefile deleted: extras/command-completion/Makefile deleted: extras/test/ld-preload-test/Makefile ... This change fix to ignore above built-in makefiles while executing 'gitclean' target Change-Id: I5365f5a1fe5b36141a6fe7ba27c38a2158f9f3a3 BUG: 1229639 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11136 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>
* 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. Change-Id: Ib95d2e3d67b0fb20d201244a206379d6261aeb23 BUG: 1242041 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/11632 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* logging: Fixed incorrect buffer sizeNithya Balachandran2015-07-111-1/+1
| | | | | | | | | | | | | | An incorrect buffer size passed in to_gf_msg_backtrace prevented the callers from being logged. Change-Id: I86104d6b3f611455308d5b3420dfb6d456070a23 BUG: 1238952 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/11521 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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* quota/marker: inspect file/dir invoked without havingvmallika2015-07-111-3/+11
| | | | | | | | | | | | | | | | | quota xattrs requested 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> Reviewed-on: http://review.gluster.org/11616 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>
* glusterd: Send friend update even for EVENT_RCVD_ACCKaushal M2015-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a multi-network cluster, a new peer being probed into the cluster will not get all the addresses of the peer that initiated the probe in some cases as it doesn't recieve friend updates from other peers in the cluster. This happens when the new peer establishes connection with the other peers before the other peers connect to the new peer. Assuming, F is the initiator peer, O is one of the other peers in the cluster and N is the new peer, the following series of events occur on O when N establishes the connection first. N is already in the BEFRIENDED state on O, and the actions happening will refer the BEFRIENDED state table. EVENT_RCV_FRIEND_REQ -> results in handle_friend_add_req being called which injects a LOCAL_ACC EVENT_RCVC_LOCAL_ACC -> results in send_friend_update being called which should have sent an update to N, but O has still not established a connection to N, so the update isn't sent EVENT_CONNECTED -> O now connects to N, this results in O sending a friend_add req to N EVENT_RCVD_ACC -> friend_add_cbk inject this event, but this event results in a NOOP when in BEFRIENDED As a result this O doesn't recieve all the addresses of F. If the cluster contains any volumes with bricks attached to the missing addresses of F and O is restarted in this condition, GlusterD will fail to start as it wouldn't be able to resolve those bricks. This commit changes the EVENT_RCVD_ACC action for the BEFRIENDED state from a NOOP to send_friend_update. This makes sure that the new peer recieves the updates from the other existing peers, irrespective of who establishes the connection first, thus solving the problem. Change-Id: Id807bc3032cf4cb13a5ba83819f2d50c96e76e96 BUG: 1241882 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11625 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* syncop: Include iatt to 'syncop_link' argsSoumya Koduri2015-07-106-10/+16
| | | | | | | | | | | | | | Include iatt to 'syncop_link' args to fetch proper attributes of the newly linked inode. Signed-off-by: Soumya Koduri <skoduri@redhat.com> Change-Id: If6b92961bd7a89add3791ed3a9b494087348b492 BUG: 1241788 Reviewed-on: http://review.gluster.org/11611 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> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gfapi: correct symbol versioning in glfs-handles.hNiels de Vos2015-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | Some of the symbol versions exposed to Mac OS X systems are incorrect. glfs_h_lookupat() has been exported multiple times, for different versions. Seems to be a simple copy/paste error, but we have not spotted that during review :-/ The only applications that could be affected by this correcting change, would need to have linked against the highest versions of glfs_h_lookupat(). Because Mac OS X is not a mainstream client-side environment, we do not need to take special precautions for it. BUG: 1202274 Change-Id: I9ee909ce0f205faa9f110be2101fc6feae20df41 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11623 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfdb/sql: Fixing broken query of find_unchangedJoseph Fernandes2015-07-101-2/+2
| | | | | | | | | | | | | | | | | | | The find_unchanged query should be "write_heat <= defined_heat" AND "read_heat <= defined_heat" and not "write_heat <= defined_heat" OR "read_heat <= defined_heat" Change-Id: Ie82e02aafbb7ea14563007307de3350ea022049a BUG: 1240970 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11577 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Joseph Fernandes Tested-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS-Ganesha : Add-node does not copy "exports" directory correctlyMeghana M2015-07-101-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. Change-Id: I539d1d525cc5614594b76f2cff1ac93a926712cf BUG: 1241895 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11618 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: use a real host name (instead of numeric) when we have oneJeff Darcy2015-07-101-0/+6
| | | | | | | | | | Change-Id: Ie9cc201204d3d613e3e585cab066a07283db902c BUG: 1241274 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>
* 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" Change-Id: I4ac97b1b5ee4f5a7e448a351b7c6270385dffe61 BUG: 1241480 Signed-off-by: Meghana M <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/11594 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/bitrot: Scrub log improvementVenky Shankar2015-07-101-1/+4
| | | | | | | | | Change-Id: I4937a578185ebacd2558cb8e22f130cd10193188 BUG: 1240219 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11547 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* quota/marker: fix spurious failure afr-quota-xattr-mdata-heal.tvmallika2015-07-107-32/+50
| | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/11583 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: use smaller stacksize in synctask for marker updationvmallika2015-07-095-14/+33
| | | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/11499 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> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: fix mem leak in markervmallika2015-07-092-202/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/11457 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: set lk_owner when taking lock on parent in renamevmallika2015-07-092-0/+22
| | | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/11561 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>
* glusterd: Fix management encryption issues with GlusterDKaushal M2015-07-092-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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: 1240564 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11559 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* features/ctr: Reduce the log-level for ctr-disabled messageAnoop C S2015-07-091-2/+2
| | | | | | | | | | | | | | | | | Since by default CTR translator is disabled, the following log message is being displayed in brick logs. [ctr-helper.c:256:extract_ctr_options] 0-gfdbdatastore: CTR Xlator is disabled. Therefore this change is to reduce the log-level to INFO. Change-Id: I3b82d6b0dc0445286f91490fb497167a36914a2b BUG: 1241379 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/11592 Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* libgfdb/ctr: Fixing rename or update of linkJoseph Fernandes2015-07-092-2/+2
| | | | | | | | | | | | | | | | Fixing rename or updating of link in 1) libgfdb : handling return from updatelink 2) ctr xlator: correcting freeing of oldbase name in hardlink list in the update link Change-Id: I1789c492b81876123cd456051a9ae495e876ad46 BUG: 1241054 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11584 Tested-by: Joseph Fernandes Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: Update loc->inode accordingly in 'glfs_loc_link'Soumya Koduri2015-07-092-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. Change-Id: I7d4a06043e4e731c8404532c47d482175dc2c277 BUG: 1240916 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11572 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> Reviewed-by: Shyamsundar Ranganathan <srangana@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 Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd BUG: 1241133 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11581 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* quotad: create sock listener only after graph init is completevmallika2015-07-092-4/+38
| | | | | | | | | | | | | | | | | 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> Reviewed-on: http://review.gluster.org/11552 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>
* libglusterfs removing strerror in logging Mohamed Ashiq Liyazudeen2015-07-094-34/+17
| | | | | | | | | | Change-Id: I8a0f40834da1151ddaef6139af3782bc076df57e BUG: 1194640 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/11464 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>
* snapview-client: Allocate memory using GF_CALLOCMohammed Rafi KC2015-07-091-1/+1
| | | | | | | | | | | | | | loc->path memory should allocate through GF_CALLOC/GF_MALLOC, since it uses GF_FREE from loc_wipe. Change-Id: If3030175dfb07b0e0b6c0a30234857f8a0780035 BUG: 1240184 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11543 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/ec: Don't read from bricks that are healingPranith Kumar K2015-07-091-1/+1
| | | | | | | | | | BUG: 1232678 Change-Id: I35503039e4723cf7f33d6797f0ba90dd0aca130b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11580 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>
* glusterd/snapd: Stop snapd daemon when glusterd is restartingAvra Sengupta2015-07-081-0/+6
| | | | | | | | | | | | | Stop snapd daemon when glusterd is coming back, if uss is disabled, or volume is stopped. Change-Id: I4313ecaff19de30f3e9ea76881994509402ed5b0 BUG: 1240952 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11575 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* tests/uss: Wait for process to come up before testing statAvra Sengupta2015-07-081-1/+1
| | | | | | | | | | | | | Fix spurious failure where snapd takes a while to come up. Change-Id: I32931afd4ff78f8d930c70f49b26f08976033d42 BUG: 1241071 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11579 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> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_fileAvra Sengupta2015-07-081-6/+6
| | | | | | | | | | | | | | | | | | | for 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: 1239269 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11535 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>
* cluster/ec: Remove locks in opendirPranith Kumar K2015-07-081-21/+1
| | | | | | | | | | | | | With readdir[p] taking locks to figure out which bricks are good/bad, no need to take any locks on opendir. BUG: 1232172 Change-Id: I4d924aeeaecab23af08c4598548a20d2a44cd849 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11506 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/ec: Fix use after free bugPranith Kumar K2015-07-072-0/+9
| | | | | | | | | | | | | | | In ec_lock() there is a chance that ec_resume is called on fop even before ec_sleep. This can result in refs == 0 for fop leading to use after free in this function when it calls ec_sleep so do ec_sleep at start and ec_resume at end of this function. Change-Id: I879b2667bf71eaa56be1b53b5bdc91b7bb56c650 BUG: 1240284 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11558 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>
* libgfapi: Gracefully exit when glfd is invalidPrashanth Pai2015-07-073-5/+7
| | | | | | | | | | | | | | | When glfs_* methods operating on glfd are invoked after calling glfs_close(), the program segfaults inside __GLFS_ENTRY_VALIDATE_FD trying to deference glfd->fd->inode which is invalid. Also, returning EBADF seemed more specific than EINVAL. BUG: 1221008 Change-Id: I13a92dca52da9a300252b69e026581b3a9e931fd Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/10759 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* tests: Fix ./tests/bugs/replicate/bug-1238508-self-heal.tRavishankar N2015-07-071-1/+1
| | | | | | | | | | | | | | | | | | Test failed @ http://build.gluster.org/job/rackspace-regression-2GB-triggered/12010/consoleFull (Reported by Vijaykumar M) Fix: s/afr_get_pending_heal_count/get_pending_heal_count Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: I69c44919ae68e3ebb9a5bc58a8e45a0a96fad62e BUG: 1238508 Reviewed-on: http://review.gluster.org/11556 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd/geo-rep: Fix failure of geo-rep pauseKotresh HR2015-07-071-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. Change-Id: Iba57d66b6db6919f42a95dd66e6db9ad1b21503b BUG: 1240229 Signed-off-by: Kotresh HR <khiremat@redhat.com> 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>
* quota: fix mem leak in quota enforcervmallika2015-07-071-1/+1
| | | | | | | | | | | | | | Do inode_unref on parent Change-Id: I21d82eb8716dd73aa2dc291b3ae8506e4fb4ea8b BUG: 1207735 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11526 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> 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-061-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: 1232183 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11250 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>
* glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's ↵Avra Sengupta2015-07-064-17/+12
| | | | | | | | | | | | | | | | | | | | | | | brick 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: 1218573 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11533 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* cluster/ec: Don't read from bad subvolsPranith Kumar K2015-07-061-18/+23
| | | | | | | | | | Change-Id: Ic22813371faca4e8198c9b0b20518e68d275f3c1 BUG: 1232678 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11531 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: Mac OS X build issues, configure.acKaleb S. KEITHLEY2015-07-061-7/+15
| | | | | | | | | | | Mac has sqlite3, but no sysconf pkgconfig Change-Id: I516613656ea3877c1a019438352b3ef8b62da1f5 BUG: 1238796 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11517 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* posix: fix mem-leak in posix_get_ancestry error pathvmallika2015-07-061-0/+7
| | | | | | | | | | | Change-Id: I47c8a8f170151f6374fc0420278aedf3ff5443ee BUG: 1207735 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11522 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* protocol/server: Add null check to gf_client_putRaghavendra G2015-07-062-1/+7
| | | | | | | | | Change-Id: I8bab3cd7387f89743e15e7569f0bc83a7df3c754 BUG: 1240161 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>
* glusterd: Get the local txn_info based on trans_id in op_sm call backs.anand2015-07-065-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. 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>
* cluster/ec: Remove failed subvols from source/sink computationPranith Kumar K2015-07-061-1/+6
| | | | | | | | | | Change-Id: Ib0de34c86ee25de361ec821d4015296c514742e0 BUG: 1240210 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11546 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/ec: Make background healing optional behaviorPranith Kumar K2015-07-0620-52/+208
| | | | | | | | | | | Provide options to control number of active background heal count and qlen. Change-Id: Idc2419219d881f47e7d2e9bbc1dcdd999b372033 BUG: 1237381 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11473 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>