summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: Expect setmntent(3) to return NULLKrishnan Parthasarathi2012-09-081-0/+8
| | | | | | | | | | | | - Closed the mtab FILE * using endmntent(3) Change-Id: I5e1ebb7f092abda638cfbb5524da693dcac6c872 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3920 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep/gsyncd: work around rsync argument overflowCsaba Henk2012-09-071-3/+8
| | | | | | | | | | | | | instead of passing the files to be synced as args to rsync, have rsync read them on stdin with '-0 --files-from=-' Change-Id: Ic3f71a0269941ce50051af8adfad183a52a79b01 BUG: 855306 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: handle percent option for 'min-free-disk'Amar Tumballi2012-09-071-0/+11
| | | | | | | | | | | | | | | * with the init option cleanups, setting of 'conf->disk_unit' was reset, which made it not set the '%' in the option. * bring a global check, which makes the option assume its percent, as long as value is < 100. Change-Id: I00bd1395a309cdc596a2b2b80304c6d98696a24a Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 852889 Reviewed-on: http://review.gluster.org/3918 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: add mount-option "enable-ino32" for the native clientNiels de Vos2012-09-064-30/+49
| | | | | | | | | | | | | | By default the GlusterFS-native client uses 64-bit inodes. Some 32-bit applications can not handle these correctly. Introduce a client-side mount option "enable-ino32" which causes the FUSE-client to squash the 64-bit inodes into a 32-bit value. Change-Id: I3296d16528bfb50457b9675f6b8701234ed82ff0 BUG: 850352 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/3885 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Make posix_fremovexattr anon fd friendly.Pranith Kumar K2012-09-061-4/+1
| | | | | | | | | | | | | | | | | | | | | Problem: For anonymous fds posix_fremovexattr fails to work because the open never happens and the fd-ctx is not set with the fd-number. Fix: Use posix_fd_ctx_get which opens and sets the fd-number in the fd-ctx for anonymous fds. Tests: Added a syncop call in glustershd to test this change and it worked fine. Change-Id: I9629190a87eb27a7a1578e4fe732a5eb1248f30c BUG: 854331 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3903 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: Ignore noauto and _netdev optionsLubomir Rintel2012-09-061-0/+3
| | | | | | | | | BUG: 827121 Change-Id: Icab4ca9adecc7b9d62e3d5e7d161c442f16ad940 Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com> Reviewed-on: http://review.gluster.org/3873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* afr: add option description of 'open'.Jules.Wang2012-09-061-0/+2
| | | | | | | | | Signed-off-by: Jules Wang <lancelotds@163.com> Change-Id: I6c7dd337c758e82e9d58d4d65f53b5aa72ac5dfb BUG: 764890 Reviewed-on: http://review.gluster.org/3895 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fix mountbroker option parsing routineCsaba Henk2012-09-061-8/+2
| | | | | | | | | | | | Properly adjust it to the new dict API as of http://review.gluster.org/3829. Change-Id: I8f55d2b1d590b15000984f4862c52b3cd226cef8 BUG: 850917 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* posix: adjust new xattrops to new dict APICsaba Henk2012-09-061-4/+4
| | | | | | | | | | | | | | | | - http://review.gluster.org/3909 introduces new xattrops - http://review.gluster.org/3829 changes the dict API The new xattrops has been written against the old dict API, but been committed after the dict API change, resulting in a build error. Change-Id: I10b9acc79927f3505b5e13116653fb9a584ffd31 BUG: 850917 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3915 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Add or_array/and_array op for xattropPranith Kumar K2012-09-061-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For set/reset of outcast (ALL changelog bits set per transaction type i.e. data/mdata/entry) from afr the capability of OR/AND in xattrop is needed in posix. Otherwise marking outcast will only be possible in self-heals where appropriate locks are held so that no other transaction is in progress, so exact number can be computed with which when XATTROP_ADD happens all bits will be set for that changelog. Fix: Implemented new xattrop-op OR_ARRAY, AND_ARRAY. Made checks in __add_array to work well with __or_array. Tests: From Afr code made an OR_ARRAY with ALL bits set and it reflected on the changelog xattrs. changelog incrementing did not have any effects on the all-set changelog. From Afr code made an AND_ARRAY with 0 and it reflected in the changelog xattrs. Change-Id: Ie89c78a43d05789e3a8fa03d2422b52083ae80b9 BUG: 847671 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: remove gf_log() from statedump functionsAmar Tumballi2012-09-061-3/+0
| | | | | | | | | Change-Id: I83cccab6819d6a74e96c2717ca539fa1568cac89 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 843822 Reviewed-on: http://review.gluster.org/3912 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Typo in the error message of the volume stopVarun Shastry2012-09-061-2/+2
| | | | | | | | | Change-Id: I86e4fdb48d9b29789f3446b8c0925eb81cf220c9 BUG: 852999 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3892 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* mount/fuse: If gfid is not present assign gfidPranith Kumar K2012-09-061-1/+1
| | | | | | | | | Change-Id: I2fb8c607694eb8bbe5ec0f67d8db794066a89ca4 BUG: 821138 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/dict: make 'dict_t' a opaque objectAmar Tumballi2012-09-0629-315/+334
| | | | | | | | | | | | | | | * ie, don't dereference dict_t pointer, instead use APIs everywhere * other than dict_t only 'data_t' should be the valid export from dict.h * added 'dict_foreach_fnmatch()' API * changed dict_lookup() to use data_t, instead of data_pair_t Change-Id: I400bb0dd55519a7c5d2a107e67c8e7a7207228dc Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850917 Reviewed-on: http://review.gluster.org/3829 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* License change to 2 additional files.Varun Shastry2012-09-052-31/+12
| | | | | | | | | | Change-Id: I4689602cbea0e46498d10b8785bcde86d369e75d BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3880 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Honour configure --localstatedir and --sysconfdirEmmanuel Dreyfus2012-09-051-3/+4
| | | | | | | | | | | | | | Makes sure /etc/glusterd to /var/lib/glusterd migration does nonour configure --localstatedir and --sysconfdir. BUG: 764655 Change-Id: I65a5f96424d67531e81e75b084265bd4e6e30f29 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3890 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Made volume reset recognize options in <domain>.<specifier> formatKrutika Dhananjay2012-09-051-3/+5
| | | | | | | | | | | | | | | | | | | PROBLEM: Volume reset command does not reset options when specified in <domain>.<specifier> format. FIX: Changed glusterd_options_reset to use "key" (as opposed to "key_fixed") to fetch "value" in a way that ensures "key" ALWAYS holds the option name in its fully qualified form, irrespective of whether the option was specified in its fully qualified format or in short form. Change-Id: Ibc3a87f4d29cb09e34b54c4b5ead564fefade350 BUG: 847846 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/3901 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* glusterd: Removed pattern match lookup logic on volume optionsKrutika Dhananjay2012-09-051-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In light of the comments received on the following patch, http://review.gluster.com/#change,3860 this change knocks off the pattern match lookup logic that once enabled wildcard entries to be used for volume options. Here's a bit on the history of the macro "pattern_match_options", coming straight from the author's(Csaba) mouth: "So, the history of pattern_match_options is as follows: i. In the volume option table we used to be able to have wildcard entries like auth.addr.*.allow and there was a special lookup logic to support that, cf. http://github.com/gluster/glusterfs/commit/v3.1.0qa40~19 ii. However, later on we stopped using this mechanism: http://github.com/gluster/glusterfs/commit/v3.1.0qa40~9 iii. Later on we added the code that allowed the usage of option names both in fully qualified (<domain>.<specifier>) and short (<specifier>)forms: http://github.com/gluster/glusterfs/commit/v3.1.0qa41~10. At this point, maintaining support for wildcard table entries became more difficult (~ error prone), so that part was placed under the macro pattern_match_options and -- given that we made no use of the feature -- a simple direct lookup logic was introduced. I chose to keep the pattern matching logic in the code because I was not really sure about the future of it and thought we might want wildcarded table entries later. ..." Change-Id: I261735143891931e8150c36fe5b33ae74b1c663d BUG: 847846 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/3893 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* cli, glusterd: Changes to 'peer status' xml outputKaushal M2012-09-011-0/+5
| | | | | | | | | | | | | | Glusterd now returns the status of a peer as both a string and a number. The xml output for peer status has been modified, such that the <status> element now contains the status number and a new <statusStr> element contains the status string. Change-Id: I0d4b74b84a991893d1029b8408d66ff078bbd254 BUG: 847760 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3868 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Don't stop entry/data self-heal on metadata split-brainPranith Kumar K2012-08-292-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: Entry/Data self-heal is orthogonal to meta-data self-heal. meta-data split-brain should not affect entry/data self-heal. Fix: Prevented aborting rest of the self-heals when metadata split-brain happens. Tests: 1) Simulated meta-data split-brain then checked data-self-heal succeed on regular file, entry-self-heal succeed on dir. 2) Reset meta-data change-log on one of the subvols and checked that meta-data self-heal also completes. 3) Executed self-heal sanity script. Change-Id: I05ca222d855d3a6000703e3775471d0f874d35d6 BUG: 851451 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3853 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <obdurodon@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dht/rebalance: set the correct ownership on the dst file.shishir gowda2012-08-281-0/+8
| | | | | | | | | | | | | | | Currently, the dst file created has root:root ownership, till migration is completed. During this phase, open fails on the dst file if uid/gid is non-root. Setting the dst_file to the correct ownership fixes the issue Change-Id: Icfec89eb10dc866cdee38dab17695fe21174ef99 BUG: 852361 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/3861 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fixed incorrect assumptions in rpcsvc actors of glusterdKrishnan Parthasarathi2012-08-282-17/+26
| | | | | | | | | Change-Id: Iabfcb401de9d658e32433aa1e8c87b329cbd2cf7 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3864 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-08-28122-1757/+677
| | | | | | | | | | | | | | | | | | The license message is changed to Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. This file is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3858 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* afr: Avoid excessive logging in self-heal.Krishnan Parthasarathi2012-08-236-22/+25
| | | | | | | | | | | | | | - (Excessive) Logging has been very useful as 'bread-crumbs' in many a root-cause analyses. This patch aims at avoiding logging when the information could be reconstructed using the xattrs, statedump, and/or "volume heal" CLI commands. Change-Id: Iebc6b10ae18f0dd9704bdc6dd03bcfe0f2a09abd BUG: 844804 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* posix-acl: make use of 'umask' flag passed as argument in fopAmar Tumballi2012-08-232-8/+25
| | | | | | | | | | | | | | | | | | * currently "umask" is reffered only from xdata dictionary, instead we should utilize fop argument. * not taking of setting of "umask" in fuse for now, considering the backward compatibility with earlier releases. * dict_del() the "umask" and "mode" keys from xdata dict as the fop after reaching posix layer tries to set every entry in xdata as xattr on file/dir. Change-Id: I7199b05a5bde132df20e7812a99bc02ef7b988ce Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850873 Reviewed-on: http://review.gluster.org/3843 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: make background queue length configurableAmar Tumballi2012-08-223-3/+54
| | | | | | | | | | | | | | | | * also make 'congestion_threshold' an option * make 'congestion_threshold' as 75% of background queue length if not explicitely specified * in glusterfsd.c, moved all the fuse option dictionary setting code to separate function Change-Id: Ie1680eefaed9377720770a09222282321bd4132e Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845214 Reviewed-on: http://review.gluster.org/3830 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: remove .vector_actor and related changesAnand Avati2012-08-208-165/+152
| | | | | | | | | | | | | The .vector_actor method of rpcsvc_actor_desc is defunct now after rpc unification. Remove the field and all related usage of it. Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* Self-heald: Prevent logging of errno ENOENTVenkatesh Somyajulu2012-08-201-4/+4
| | | | | | | | | Change-Id: Ie56228dfbdc7e519a344681487164a835488a470 BUG: 835423 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/3826 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: handle 'dataonly' flag in syncop_fsync()Amar Tumballi2012-08-202-2/+2
| | | | | | | | | | | | * and also in syncop_readv(), don't look at _cbk args if op_ret is < 0. Change-Id: I3ab2982bc6d186e75b6adb74c8981e4ff7058bbe Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 839950 Reviewed-on: http://review.gluster.org/3828 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: avoid deadlock while taking the statedump of fdsRaghavendra Bhat2012-08-191-6/+24
| | | | | | | | | | | * Provide a hook for forget Change-Id: Ide7ea6d4c6a7d0d93b81570cb544f2bbda526eeb BUG: 846916 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3795 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: don't leak upon GF_REALLOC failureJim Meyering2012-08-191-4/+5
| | | | | | | | | Change-Id: I7dfabcc2981df5c5a1e1a54c3135400a60626cd1 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gsyncd: don't use void* arithmetic; don't leak upon OOM; remove castJim Meyering2012-08-191-4/+6
| | | | | | | | | | | | | | (duplexpand): Ignore risk of overflow in computation of the realloc object count, since we'd need a string with 2^62 space-separated tokens to trigger that (that's w/64-bit size_t; w/32-bit it'd be easier, but still improbable). Change-Id: If4521afe7b46110742991dd0ee234284ef8970df BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3793 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* utils: don't leak after failed GF_REALLOCJim Meyering2012-08-191-5/+24
| | | | | | | | | | | | | This is primarily to avoid a leak upon failed GF_REALLOC when glusterd_readin_file reads a file that is too large. Also, remove unnecessary memset-0 of PATH_MAX+256-byte buffer. Change-Id: Id06bd5faef024e1d865f6f0f56bfbb837c9c6168 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3804 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fix "--client-pid"Csaba Henk2012-08-191-0/+2
| | | | | | | | | | | | | http://review.gluster.com/3698 broke special clients by omitting the conversion of the client_pid_set parameter to the new xlator option framework. Change-Id: I0dc886dffba9c4a9fe8d97e5feccfa5f95784ce1 BUG: 848034 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3820 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: have setxattr on geo-rep related xattrs take effectCsaba Henk2012-08-191-3/+3
| | | | | | | | | | | | | | | | | | | In http://review.gluster.com/3687 setxattr was made to a noop for geo-rep special clients, with the exception of some special ones, relevant to geo-rep. These exceptions were all in trusted namespace. That's no good, because with a mountbroker (unprivileged) setup, the relevant attributes are in system namespace. So here we just let setxattr through for any geo-rep related xattr, regardless of namespace. Change-Id: I261141293b7db955a2e8b2405b4510cb10a42694 BUG: 848447 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3821 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: Reduce frame-timeout for glusterd connectionsKaushal M2012-08-173-8/+46
| | | | | | | | | | | | | | | | Reduce frame-timeout for glusterd connections from 30mins to 10 mins. 30mins is too long when compared to cli timeout of 2mins. Changing to 10mins reduces the disparity between cli and glusterd. Also, fix glusterfs_submit_reply() so that a reply is sent even if serialize failed. Change-Id: Id5f68f2ff28ea7453d9a62429fe12aa0c0a66952 BUG: 843003 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3803 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Optimize readdirp calls in DHTshishir gowda2012-08-135-2/+68
| | | | | | | | | | | | | | | | | Bring in option which is supported by posix xlator to filter out directory's entries from being returned. DHT would now request non-first subvols to filter out directory entries. dht xlator-option readdir-optimize will enable this optimization Change-Id: I35224bc81c9657f54f952efac02790276c35ded5 BUG: 838199 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3772 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: store the wb_inode in local before windingRaghavendra Bhat2012-08-111-1/+3
| | | | | | | | | | | | | | | * Store the write-behind's inode context in the local structure before winding the call so that in callback inode context is found. * Before returning EBADFD check if the inode context (wb_inode) is NULL, along with the inode type. Change-Id: If5a1c667efe6882a6efef1439cee3effc32ff9a7 BUG: 846536 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3796 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* fuse-bridge: fuse_thread_proc: avoid realloc-clobber induced leak upon OOMJim Meyering2012-08-081-3/+4
| | | | | | | | | Change-Id: I835d14b702b875bb07f41e157583592df9b72f36 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3792 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep: don't leak or segfault upon OOMJim Meyering2012-08-081-2/+4
| | | | | | | | | | | | | | | | In glusterd_urltransform, a failed GF_REALLOC would clobber the would-be-realloc'd buffer, linearr, with a NULL pointer, (thus leaking that memory) and then control would pass to the error-handling code that would attempt to free (via glusterd_urltransform_free) linearr[i], which is almost guaranteed to segfault when linearr is NULL. Change-Id: Ia75bf70fd8ff893a18804d49688048ef96db6037 BUG: 846755 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3791 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: while building graph, set xl->ctxAmar Tumballi2012-08-051-0/+2
| | | | | | | | | | | | | as glusterfs_'ctx'_t is used as reference in many places, it is important to set it right. In many places, xl->ctx is assumed to be present, hence it has to be set right. Change-Id: I37d767f384edb1819277c4ecee97dd94108aedff Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845715 Reviewed-on: http://review.gluster.com/3779 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: reduce the usage of global variablesAmar Tumballi2012-08-034-27/+22
| | | | | | | | | | | | | | | | | | | | | | | * move all the 'logging' related global variables into ctx * make gf_fop_list a 'const' global array, hence no init(), no edits. * make sure ctx is allocated without any dependancy on memory-accounting infrastructure, so it can be the first one to get allocated * globals_init() should happen with ctx as argument not yet fixed below in this patchset: * anything with 'THIS' related globals * anything related to compat_errno related globals as its one time init'd and not changed later on. * statedump related globals Change-Id: Iab8fc30d4bfdbded6741d66ff1ed670fdc7b7ad2 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 764890 Reviewed-on: http://review.gluster.com/3767 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: ignore any erros that might've happened while resolving entry in ↵Raghavendra G2012-08-033-25/+117
| | | | | | | | | | | | | | | | | | | resolver. One error we hit was absence of gfid on backend. While the lookup code-path generates a new uuid and sets it on file, resolver code doesn't do that. Since, functionally (atleast after resolving parent inode, we would be resolving the path in new-graph) both resolver and lookup does same work, it would be no harm in ignoring errors during resolving the entry. This would help us to continue with the _extra_ work (like healing gfid as of now) in fuse_lookup_resume. Change-Id: If46d5e07c32e67b5744287a6ef55d0b0fe347689 BUG: 821138 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3344 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Fix a compilation failure when libxml2-dev is not presentVijay Bellur2012-08-031-0/+3
| | | | | | | | | | | Addresses problem introduced by 1e4a2354b57a1eb Change-Id: I7cea76410769c584af6960860260fbd061a6df8a BUG: 844696 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3778 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse-resolve: consider cases where an entry should be resolved even when ↵Raghavendra G2012-08-031-0/+13
| | | | | | | | | | | | | | | parent belongs to active itable. When parent is root, the parent inode returned will always be active_subvol->itable->root and hence there can be cases where we should explicitly resolve the entry in active graph. BUG: 804592 Change-Id: I5829278e27435e06785a923ce8776616cedfb519 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3710 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-cache: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-021-7/+60
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: I2bb4592126c5d1eacf614130815a839c4a90c59a BUG: 843787 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3758 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Made volume set help/help-xml a non-cluster operation.Krishnan Parthasarathi2012-08-027-54/+87
| | | | | | | | | | | | - Retained apparent redundant checks in stage, commit phase of set volume for the help options for backward compatibility Change-Id: Iaefe3805d6b5eeeced2e7e4870830edf3e61dc87 BUG: 844696 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* performance/quick-read: use pthread_mutex_trylock to hold mutex in statedumpsRaghavendra Bhat2012-08-021-3/+16
| | | | | | | | | | | | Do not use pthread_mutex_lock and gf_log functions while dumping information to statedump, to avoid deadlocks. Change-Id: I0d30b04ae322f131b7a42d277ebd4385e83769e6 BUG: 843789 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3764 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix glusterd crash resulting from uninitialised pointerKrutika Dhananjay2012-08-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | PROBLEM: glusterd crashes during replace-brick operation as the pointer old_brickinfo is dereferenced without being initialised. FIX: Have old_brickinfo initialised to point to the brick info of the brick being replaced before dereferencing it. TEST: Ran glusterd in debug mode before and after the fix; process crash ceased in the latter case. Change-Id: I53f21b5424f534bbdba3b3fc407d4501a2c0052f BUG: 844332 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.com/3777 Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Unwind with correct pre/post parent bufsPranith Kumar K2012-08-023-403/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In case of dir fops create, mknod, mkdir, link, symlink, rename if the fop fails on read-child then unwinds are happening with all-zero pre/post iatt-bufs. The bug occurs because the parent bufs are not saved if the response is not from read-child. Fix: Save the pre/post-bufs for the first response. If the response comes from read-child, overwrite whatever we have cached. Tests: Attached the mount process to gdb. Tested that the unwinds happen with proper pre/post iatt bufs in the following cases: 1) All success case 2) Failure on read-child 3) Failure on non-read-child 4) Failure on all children. Tested soft-link self-heal to test the change made in that. Tested errno ENOTEMPTY for rmdir, rename fops. Change-Id: I82882423d2d766b4f4a3044203bcb5dbcaee1755 BUG: 845242 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3775 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>