summaryrefslogtreecommitdiffstats
path: root/libglusterfs
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: Properly validate compressed form of IPv6 addressesKaushal M2012-04-181-1/+21
| | | | | | | | | | | Properly validate IPv6 compressed notation, when used in volume set. Change-Id: Ia489125a45472fc0971c6b11de073aaeb9b1a123 BUG: 810442 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3152 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* features/locks: Find parent-entrylk presence in lookupPranith Kumar K2012-04-181-0/+1
| | | | | | | | | Change-Id: I8fc85676827f26b07bf578ea1152d3e251adb4af BUG: 765551 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3177 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd/rebalance: Start process with xlator option client-pid -3shishir gowda2012-04-161-1/+2
| | | | | | | | | | | | | This would prevent updation of xtime by the marker. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: I11e287511026326271c2926e55993e48b32018f6 BUG: 812287 Reviewed-on: http://review.gluster.com/3144 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Csaba Henk <csaba@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs: Syncop procs should not exceed SYNCENV_PROC_MAXPranith Kumar K2012-04-131-1/+1
| | | | | | | | | Change-Id: I0eb2adac06eae31939c8ed6b544b4be43d1a5885 BUG: 810109 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3146 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: IPv4 auth improvmentKaushal M2012-04-131-0/+7
| | | | | | | | | | | | | Check if last character of an IPv4 address is valid to prevent successful validation of addresses with '.' as last character. Change-Id: I0af6c288e12a47986ce3f8b02c317b99767e69e6 BUG: 811458 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3124 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* storage/posix: Handle gfid-less lookupPranith Kumar K2012-04-121-0/+1
| | | | | | | | | Change-Id: I4605dbb1dd8bf8e26de7f253e54a7f4840c8a8be BUG: 795355 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: loc_copy should set name only if src->name is setPranith Kumar K2012-04-121-1/+2
| | | | | | | | | Change-Id: If06d97dd1ff1293730e0cd4933f6ab3283f0475e BUG: 788051 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3137 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Replace GPLV3 MD5 with OpenSSL MD5Kaleb KEITHLEY2012-04-046-43/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ric asked me to look at replacing the GPL licensed MD5 code with something better, i.e. perhaps faster, and with a less restrictive license, etc. So I took a couple hour holiday from working on wrapping up the client_t and did this. OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD, Open Solaris, etc. IOW it's universally available on the platforms we care about. It's written by Eric Young (eay), now at EMC/RSA, and I can say from experience that the OpenSSL implementation of MD5 (at least) is every bit as fast as RSA's proprietary implementation (primarily because the implementations are very, very similar.) The last time I surveyed MD5 implementations I found they're all pretty much the same speed. I changed the APIs (and ABIs) for the strong and weak checksums. Strictly speaking I didn't need to do that. They're only called on short strings of data, i.e. pathnames, so using int32_t and uint32_t is ostensibly okay. My change is arguably a better, more general API for this sort of thing. It's also what bit me when gerrit/jenkins validation failed due to glusterfs segv-ing. (I didn't pay close enough attention to the implementation of the weak checksum. But it forced me to learn what gerrit/jenkins are doing and going forward I can do better testing before submitting to gerrit.) Now resubmitting with a BZ Change-Id: I545fade1604e74fc68399894550229bd57a5e0df BUG: 807718 Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.com/3019 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* libglusterfs/run: POSIX compatible closing of child fds on non-LinuxCsaba Henk2012-04-021-1/+6
| | | | | | | | | | | | | It just occurred to me that I realized there are POSIX features that let this be done cleanly. However, For Linux we keep the proc based approach to get more graceful strace logs. Change-Id: I6b473271b2adfd85cef6612eb65d88e5d00f5943 BUG: 764294 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3068 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs/run: clean up properly also if program could not be spawnedCsaba Henk2012-04-021-6/+6
| | | | | | | | | | Change-Id: Ie81a6e1a99c1cb002653c0175bb3c5fcff9c8a4a BUG: 808427 Reported-by: Krishnan Parthasarathi <kparthas@redhat.com> Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3055 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* libglusterfs/run: test suite refinementCsaba Henk2012-04-021-1/+10
| | | | | | | | | | | | | | | | | | | | If run is compiled as a standalone self-test program (-DRUN_STANDALONE -DRUN_DO_TESTS) add the possibility to pass an integer which makes the program sleep that many seconds before exit (0 forever). This makes it possible to investigate post-test state (eg. if there are leftover zombies). Change-Id: Ia8d80a74eb83615ad50db2e17bb2701dc0d69070 BUG: 808427 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3067 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* glusterd: Include port in nfs statusKaushal M2012-04-021-0/+5
| | | | | | | | | Change-Id: I679e491e801b694e8a0f93dd87cf540441dae927 BUG: 806877 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3060 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/quick-read: make unlink aware of open-behind behaviour of ↵Raghavendra G2012-03-281-0/+8
| | | | | | | | | | | | | | | quick-read. quick-read should do an open of all the fds that are waiting for to be opened behind before doing an unlink on a path. Change-Id: I4c8d65c0511e8a37765ff57e30d99dd89b56c4fc BUG: 765363 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/506 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/dht : Acl fix for distribute directory selfhealKaushal M2012-03-261-0/+3
| | | | | | | | | | | | Send acl xattrs, if present in the xattrs returned during lookup, during directory self-heal. Change-Id: I5337bbd3f3963aeed500a8a552e5f6713089b53e BUG: 764787 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/737 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/fd: ref fds while copying the fdentries.Raghavendra G2012-03-261-3/+6
| | | | | | | | | Change-Id: I8973ec5d9858adfbdd6efc7cd596cf5d5af0e3cb BUG: 767862 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3006 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: adding extra data for fopsAmar Tumballi2012-03-227-912/+1178
| | | | | | | | | | | | | with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "core: enable process to return the appropriate error code"Amar Tumballi2012-03-222-4/+0
| | | | | | | | | This reverts commit 16717f4df7b0fbd3c255f5faf8a2744444231bb7 Change-Id: I65624db4d31e11e1bec66b07b352ce823ef069b9 Reviewed-on: http://review.gluster.com/3001 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* dict: add a dict_dump() function to dump the dictionary contentsAmar Tumballi2012-03-212-0/+40
| | | | | | | | | | | | | | | helps for debugging some functionalities where we have to understand what we send from one end point to another is properly received on the other endpoint without any errors. Change-Id: I9b802f12ae542e499161a1f3b9a5602f7b93b0ee Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2959 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: enable process to return the appropriate error codeAmar Tumballi2012-03-212-0/+4
| | | | | | | | | | | | | Credit of this patch goes to Avati <avati@gluster.com> as I just did a rebase to the lastest master. Change-Id: I53b2adf90fd9808433bdc35b57dad0682bc90860 BUG: 762935 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: bring in feature to use syncop for mgmt opsAmar Tumballi2012-03-211-0/+5
| | | | | | | | | | | | | | | | * new sycnop routines added to mgmt program * one should not use 'glusterd_op_begin()', instead can use the synctask framework, 'glusterd_op_begin_synctask()' * currently using for below operations: 'volume start', 'volume rebalance', 'volume quota', 'volume replace-brick' and 'volume add-brick' Change-Id: I0bee76d06790d5c5bb5db15d443b44af0e21f1c0 BUG: 762935 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/479 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/call-stub: ref dict while storing it in readdirp stubRaghavendra G2012-03-191-1/+7
| | | | | | | | | Change-Id: I11224f7afa2e87dc242cc2e9e865c7ab2bb88c7e BUG: 765785 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2974 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs/dict: Add boundary conditionsv3.3.0qa29Harshavardhana2012-03-181-3/+30
| | | | | | | | | | | | | | Functions modified: 1. data_to_int16() 2. data_to_uint16() Change-Id: I6775ca5d39f519c24ca3a07ce41018472e238cdf BUG: 769692 Signed-off-by: Harshavardhana <fharshav@redhat.com> Reviewed-on: http://review.gluster.com/2599 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/stripe: fix {set/get}xattr query for dirs/symlinkVenky Shankar2012-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following problems: * ENOENT returned for getxattr (xtime) on symlinks Non-data entities are created only on the first subvolume but getxattr fop winds to all subvols. This results in all subvols except the first one to return ENOENT which is propogated down the stack. * ENODATA returned for getxattr (xtime) on directory setxattr calls always wind to the first stripe subvolume. xtime getxattr invocation winds to all subvolumes but the xattr is present in only the first one, resulting in all subvols except the first one to return ENODATA. Fix For symlinks getxattr now always winds to the first subvol and for directories setxattr sets the xattr on all subvols. NOTE For directories the all-subvol-wind in setxattr is done only when request is from a special client (client-pid == -1) Change-Id: I9236345ef319506770d2034b840ee4ac04704b21 BUG: 801394 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/2948 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Logs: Improved logs in lock/unlock execution pathPranith Kumar K2012-03-181-0/+1
| | | | | | | | | | | Statedump will now start showing the lk-owner of the stack. Change-Id: I9f650ce9a8b528cd626c8bb595c1bd1050462c86 BUG: 803209 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2968 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd : volume set validation fixesKaushal M2012-03-184-142/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the new version of the patch by Kaushik at review.gluster.com/699 The following new option types have been introduced: * GF_OPTION_TYPE_INTERNET_ADDRESS_LIST * GF_OPTION_TYPE_PRIORITY_LIST * GF_OPTION_TYPE_SIZE_LIST and option types of several options in translators have been updated to use the new types. valid_internet_address(), valid_ipv4_address() & valid_ipv6_address() functions has been updated for * wildcard matching. Previously used standalone wildcard address checking functions have been removed. Changes have been done to stripe translator to correctly set, update and use stripe-blocksize. Also minimum value for block-size has been set to 16KB. Change-Id: I2aa484ff695f6a915a8fc9a9f965cf0344f41d59 BUG: 765248 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2899 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mem-pool: more debug friendly logs by using gf_log_callingfn()Amar Tumballi2012-03-181-4/+6
| | | | | | | | | | Change-Id: I4d6e53ad8660314315f2ff3aa92ffbe707d6efe9 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 803638 Reviewed-on: http://review.gluster.com/2951 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: bring a cmdline option to set memory-accountingAmar Tumballi2012-03-152-11/+18
| | | | | | | | | | | | | | | | | | currently this is implemented as a command line option, and not as an easier translator option. this is because as of now, before even the volume files are parsed, we would need memory accounting enabled. there is scope for improving this behavior, but for now, this approach solves the problem. Also, this feature's major consumers are the testers who are looking for leaks, hence option is hidden from usage output. Change-Id: I09a5b13743ae43ff42c251989f921319e94cabe3 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 799199 Reviewed-on: http://review.gluster.com/2856 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: dict allocations through mem-poolAmar Tumballi2012-03-142-19/+21
| | | | | | | | | Change-Id: I7401639060957d437808779745a1e46c3f9f4585 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 798503 Reviewed-on: http://review.gluster.com/2851 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: handle sending NULL dentry name for inode link in self-heal-daemonRaghavendra Bhat2012-03-141-0/+8
| | | | | | | | | | | | | | | | | | | | | * Without the dentry name, dentry cannot be created in inode_link, which leads to trying to access the null dentry to check if it is cyclic and thus segfault. So send the parent inode also NULL, which just returns the proper inode after assigning the gfid and type to the inode without trying to create dentry. * Handle failures such as dentry_create returning NULL, in inode_link properly and return NULL in such cases. * Increase the lru limit of inode table of self-heal-daemon to 2048 Change-Id: I7ae0e0e9be279d1694b6aafb5e054585e43f03ff BUG: 801149 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2893 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core, cli : Changes to statedumpKaushal M2012-03-141-18/+17
| | | | | | | | | | | | | | | | This patch, * Enables missing inodectx, fdctx dumpops for cli statedump command. * Reintroduce changes introduced in statedump.c by 489a7a10 which were overwritten by db20a0f8. * Change strncasecmp() in gf_proc_dump_parse_set_option() to strcasecmp() to properly parse similar options like fd-fdctx, inode-inodectx Change-Id: I85ad854dce73048617b933d29cf360af9d0ed90a BUG: 797788 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* core: Made lkowner_unparse use 'type-safe' format-specifierKrishnan Parthasarathi2012-03-121-1/+1
| | | | | | | | | Change-Id: Ibd39edb5fccef525f7f0929401f7329508c59ced BUG: 767229 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2907 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* iobuf: add a counter to keep track of request missesAmar Tumballi2012-03-122-12/+11
| | | | | | | | | | | | requests can be denied if the size of the request is higher than the available sizes. Change-Id: Id1bf2a56de799ccb94f3791899f2e33f68cd1e2b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 802047 Reviewed-on: http://review.gluster.com/2913 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client: Register a timer(grace-timer) conditionally.Mohammed Junaid2012-03-101-1/+1
| | | | | | | | | | | | | | | | A grace timer is registered on a disconnect, but a reconnect timer sends a connect request after every 3sec and if the server is down, the client protocol receives disconnect and a grace timer will be registered which on timeout will increase the lk-version value. Its enough to register the grace timer once after the disconnect and later just ignore other psuedo disconnects. Change-Id: I36a153aa86b350d87fe50d014ee0297f558a7fb6 BUG: 795386 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/2906 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* syncop: Make syntask scalablePranith Kumar K2012-03-093-21/+37
| | | | | | | | | | | | | | | At the moment, synctask uses task->frame to perform all the syncops, this will lead to high-memory usage if the task crawls millions of directories. i.e millions of STACK_WINDS/UNWINDS. To prevent this, in each task a new stack is created to perform the fops which is reset after every syncop. Change-Id: I53c262ec348be9b1d91af73da01f1c217f31ce6e BUG: 798907 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2850 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/marker: GFID file handle based backend related fixesv3.3.0qa26Raghavendra G2012-03-071-0/+1
| | | | | | | | | | | | * make sure loc->gfid is filled. Change-Id: I5304e650d9fc181ee1f3b65be7f2ff3847d9722e BUG: 790389 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/2888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs/fd: fixed fd_anonymous() leakAmar Tumballi2012-03-071-2/+6
| | | | | | | | | | | | | | fd was getting leaked whenever there was a overlapping operations, which caused memory leak, and process fd leaks, which made most of the operations on NFS mount of a replicate volume not work. With the fix, things are back to normal. Change-Id: I2d2158b2972ba5dae270d6ff7b1a827403653c04 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 787368 Reviewed-on: http://review.gluster.com/2892 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* protocol/client: Added lk_ctx info in fdctx dumpKrishnan Parthasarathi2012-03-073-1/+26
| | | | | | | | | | | | | | | | | | - Added a brief explanation as to why we can't use gf_log when in statedump. - Removed gf_log messages from client_priv_dump since it can cause a 'deadlock' - See statedump.c for explanation - Added try-lock based accessors for fd_lk_list for dump purposes. Change-Id: I1d755a4ef2c568acf22fb8c4ab0a33a4f5fd07b4 BUG: 789858 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2882 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* fops/removexattr: prevent users from removing glusterfs xattrsRajesh Amaravathi2012-03-051-14/+33
| | | | | | | | | | | | | | | | | | | | | | | * Each xlator prevents the user from removing xlator-specific xattrs like trusted.gfid by handling it in respective removexattr functions. * For xlators which did not define remove and fremovexattr, the functions have been implemented with appropriate checks. xlator | fops-added _______________|__________________________ | 1. stripe | removexattr and fremovexattr 2. quota | removexattr and fremovexattr Change-Id: I98e22109717978134378bc75b2eca83fefb2abba BUG: 783525 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* libglusterfs: Handle loc_copy for nameless locPranith Kumar K2012-02-291-13/+9
| | | | | | | | | BUG: 787671 Change-Id: I7601f482ae753ead83be16d1df33c2187e76dc5c Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2825 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* mempool: add more counters to understand the usage scenarios properlyAmar Tumballi2012-02-273-0/+22
| | | | | | | | | | | | | | current design of mempool is to fallback to standard calloc/free if all the buffers in pool are exhausted. Understanding more about those numbers will help us to tune mempool parameters properly over time. Change-Id: I2c94373186f7c6a486caff2611c2d9df2c37db3c Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 797730 Reviewed-on: http://review.gluster.com/2804 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs: fix GF_FREECsaba Henk2012-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Argument-taking macros should be possible to use with same syntax that of C functions. In particular (assuming FOO is a single-argument macro), FOO(bar) should break and if (cond) FOO(bar); else baz(); should compile. Change-Id: If852c128a7317dc0dda1c669be7c6af40501e48d BUG: 762061 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/2816 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* Introduce new extended attribute: node-uuidVenky Shankar2012-02-221-0/+7
| | | | | | | | | | | | | | | | Request for trusted.glusterfs.node-uuid returns pathinfo like string but containing the UUID of glusterd instead of the backend path for the requested file. This info is benificial for tasks like parallel rebalance that will make use of the UUID for data locality. Change-Id: I766a09cc4a5f63aebd11c73107924a1b29242dcf BUG: 772610 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/2614 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterfsd: unref the dict and use dict_set_dynstr to avoid memleakRaghavendra Bhat2012-02-222-7/+11
| | | | | | | | | | | | | Unref the new dict and use proper dict api (dict_set_dynstr) to save data for displaying volume status information, which otherwise leads to memory leak in the process. Change-Id: Icb9ceb1a867c5b9759211a67027d983ab9b7e1c2 BUG: 796186 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* mempool: adjustments in pool sizesAmar Tumballi2012-02-222-2/+4
| | | | | | | | | | | | | | | | | * while creating 'rpc_clnt', the caller knows what would be the ideal load on it, so an extra argument to set some pool sizes * while creating 'rpcsvc', the caller knows what would be the ideal load of it, so an extra argument to set request pool size * cli memory footprint is reduced Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2784 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs/options: Cleanup xlator percent_sizet code.Harshavardhana2012-02-213-82/+97
| | | | | | | | | Change-Id: I1a39252d6c26f7e30b77ef682b8b3cdcde8a4a51 BUG: 769691 Signed-off-by: Harshavardhana <fharshav@redhat.com> Reviewed-on: http://review.gluster.com/2619 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs: Warn on missing _cbk calls in xlatorPranith Kumar K2012-02-211-0/+6
| | | | | | | | | Change-Id: I44684b5eeca3674ed8d5b7b0120699bb3767e38d BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2782 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* core: utilize mempool for frame->local allocationsAmar Tumballi2012-02-214-5/+11
| | | | | | | | | | | | | | | in each translator, which uses 'frame->local', we are using GF_CALLOC/GF_FREE, which would be costly considering the number of allocation happening in a lifetime of 'fop'. It would be good to utilize the mem pool framework for xlator's local structures, so there is no allocation overhead. Change-Id: Ida6e65039a24d9c219b380aa1c3559f36046dc94 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 765336 Reviewed-on: http://review.gluster.com/2772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/clnt: handle PARENT_DOWN event appropriatelyAmar Tumballi2012-02-211-0/+1
| | | | | | | | | | Change-Id: I4644e944bad4d240d16de47786b9fa277333dba4 BUG: 767862 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/2735 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* fuse-bridge: Handle graph-switch.Raghavendra G2012-02-214-2/+109
| | | | | | | | | | | | | | | | | The purpose of this patch is to let protocol/client know when its transports can be disconnected, without application running on gluster mount noticing any effects of graph switch. In order to do this, we migrate all fds and blocked locks to new graph. Once this migration is complete and there are no in-transit frames as viewed by fuse-bridge, we send a PARENT_DOWN event to its children. protocol/client on receiving this event, can disconnect up its transports. Change-Id: Idcea4bc43e23fb077ac16538b61335ebad84ba16 BUG: 767862 Reviewed-on: http://review.gluster.com/2734 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: Add commands to see self-heald opsPranith Kumar K2012-02-203-3/+14
| | | | | | | | | Change-Id: Id92d3276e65a6c0fe61ab328b58b3954ae116c74 BUG: 763820 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>