summaryrefslogtreecommitdiffstats
path: root/xlators
Commit message (Collapse)AuthorAgeFilesLines
* gNFS: Set default outstanding RPC limit to 16Kaleb S. KEITHLEY2014-03-072-3/+39
| | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/6696/ With 64, NFS server hangs with large I/O load (~ 64 threads writing to NFS server). The test results from Ben England (Performance expert) suggest to set it as 16 instead of 64. Change-Id: Iaa9dda512904d2e359d8122a05e5bf65f99a7e78 BUG: 1073441 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7200 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
* geo-rep/gfid-access: Fix errno for non-existent GFID.Kotresh H R2014-03-021-0/+5
| | | | | | | | | | | | | | | | | | | | | Because of http://review.gluster.org/#/c/6318/ patch, ESTALE is returned for a lookukp on non-existent GFID. But ENOENT is more appropriate when lookup happens through virtual .gfid directory on aux-gfid-mount point. This is avoids confusion for the consumers of gfid-access-translator like geo-rep which expects ENOENT. Change-Id: I4add2edf5958bb59ce55d02726e6b3e801b101bb BUG: 1069191 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/7154 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/7163 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: perform chmod after chown.Ravishankar N2014-02-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | Problem: When a replica brick is added to a volume, set-user-ID and set-group-ID permission bits of files are not set correctly in the new brick. The issue is in the posix_setattr() call where we do a chmod followed by a chown. But according to the man pages for chown: When the owner or group of an executable file are changed by an unprivileged user the S_ISUID and S_ISGID mode bits are cleared. POSIX does not specify whether this also should happen when root does the chown(). Fix: Swap the chmod and chown calls in posix_setattr() BUG: 1058797 Change-Id: Id2fbd8394cf6faf669f414775409f20f46009f2b Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/6988 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: fix crash in error handling after building ancestry.Raghavendra G2014-02-081-1/+1
| | | | | | | | | Change-Id: Ifbebf1aa496d49a6c4bb30258b83aaf9792828e5 BUG: 1059833 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6924 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Reset opinfo.op ONLY if lock succeededKrutika Dhananjay2014-02-071-3/+6
| | | | | | | | | | | | | | ... and also initialise @this before doing anything else. Change-Id: I0244a7f61a826b32f4c2dfe51e246f2593a38211 BUG: 1060434 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6885 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/6922 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libxlator: fix memleak in cluster_markerxtime_cbk and cluster_markeruuid_cbkLukas Bezdicka2014-02-071-0/+2
| | | | | | | | Change-Id: Ide3574bf9f661b077f707990d47821feda18b1a3 BUG: 841617 Reviewed-on: http://review.gluster.org/6872 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* POSIX : gefattr fails and mount point become inaccessible Atin Mukherjee2014-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point. Analysis : The caller of posix_make_ancestryfromgfid() function i.e. posix_get_ancestry_non_directory() is sending an incorrect type value as an argument leading to a crash in posix_make_ancestral_node() (head dirent pointer is NULL and an attempt to dereference causes seg fault). For a non directory operation this piece of code should not have been executed but due to incorrect type value this happened. Solution : In posix_make_ancestryfromgfid() call type is passed as logical or of type and POSIX_ANCESTRY_PATH instead of logical or of POSIX_ANCESTRY_PATH and POSX_ANCESTRY_DENTRY. Please note this patch is backport picked up from following patch: http://review.gluster.org/#/c/6892/ Change-Id: Iaf844bea91396c5e2ee295d5a082998fda66f0a9 BUG: 1060104 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/6892 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6921
* quota: get directory size before enforcing quota on renameKrishnan Parthasarathi2014-02-052-12/+72
| | | | | | | | | | | Backport of http://review.gluster.org/6155 BUG: 1023974 Change-Id: Icb4bca8c4a5fa9b14855478e69b1315f2e9a3c3d Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6887 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* quota: fix recording of last alert log messageKrishnan Parthasarathi2014-02-051-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6532 PROBLEM: Alert log messages, corresponding to disk usage crossing soft-limit on a directory, weren't being logged as often as expected. CAUSE: The mechanism in place to log alert messages, once every alert-time seconds, set the previous logged time incorrectly. FIX: Update previous logged time only if we logged an alert message, ie. when the "time was right" to alert. BUG: 969461 Change-Id: Ie019c180c97d2b049fa664b14ce087b88e3b578f Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6886 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mgmt/glusterd: Set right op versions for few options.Vijay Bellur2014-02-031-12/+12
| | | | | | | | | | | | compression and changelog translators appear first in 3.5. op-versions of options corresponding to these translators should be 3. Change-Id: Ib514207743e36eba53c3d5cf477c85136cf30b42 BUG: 923540 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6849 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mount.glusterfS/glusterfsd: Add dummy deprecated *fetch-attempts optionsHarshavardhana2014-02-021-0/+6
| | | | | | | | | | | | | | volfile-max-fetch-attempts and fetch-attempts were not deprecated properly at 'b610f1be7cd71b8f3e51c224c8b6fe0e7366c8cf'. Provide a way for backward compatibility for broken third party apps. Change-Id: I520d7bc775d67917cf149d7833a8e46bdf265d9d BUG: 1045309 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6761 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/marker: Filter quota xattrs on file as wellPranith Kumar K2014-02-022-3/+70
| | | | | | | | | | | | | | | | | | | | | | Problem: Quota contributions of a file/directory are tracked by quota xlator using xattrs on the file. Quota allows these xattrs to be healed as part of metadata self-heal. This leads to wrong quota calculations on this brick after self-heal because quota xattrs don't represent the actual contributions on the brick anymore. Fix: Don't let self-heal of this xattr happen as part of self-heal by filtering quota xattrs on file in listxattr. Change-Id: Iea68a116595ba271e58c6fdcc3dd21c7bb55ebb3 BUG: 1035576 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6374 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6812
* glusterd/geo-rep : Allow volume to stop if geo-rep is not active.Kotresh H R2014-01-283-1/+176
| | | | | | | | | | | | | | | In staging phase of volume stop, code is added to read the state_file for each slave of the master to which the volume belongs. If any of the geo-rep session is active with at least one slave, volume is not allowed to stop else it is allowed. Change-Id: I4a01a357fc86b872e9635b3d19998cdbd9545114 BUG: 1049727 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/6663 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6821
* mgmt/glusterd: make sure quota enforcer has established connection with ↵Raghavendra G2014-01-284-24/+68
| | | | | | | | | | | | | | | | | | quotad before marking quota as enabled. without this patch there is a window of time when quota is marked as enabled in quota-enforcer, but connection to quotad wouldn't have been established. Any checklimit done during this period can result in a failed fop because of unavailability of quotad. Change-Id: I0d509fabc434dd55ce9ec59157123524197fcc80 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6572 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6820
* features/quota: Handle the corner case in statfs callVarun Shastry2014-01-281-3/+3
| | | | | | | | | | | | | | Problem: Even though limit is not set quota used to send 'quota-deem-statfs' key in the dictionary resulting in incorrect calculations. Change-Id: I643cb35cca6648e40f1c745135280876958ddaa9 BUG: 1046894 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6840 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Metadata cleanupVarun Shastry2014-01-282-9/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quota and marker uses 'trusted.glusterfs.quota*' and 'trusted.pgfid*' xattrs to store its configurations and accounting information and also to build the parent inode chain in case of absense of path. Problem: After disabling and then enabling quota back, the xattrs may contain stale data leading to impaired accounting and thus improper enforcement. Solution: Clean up all the quota related xattrs after quota disable. Marker xlator implements a virtual xattr to cleanup quota and pgfid xattrs. In this approach glusterd mounts an auxiliary mount and sends the below command to all the files by crawling the mountpoint. #setfattr -n "glusterfs.quota-xattr-cleanup" -v 1 <path/to/file> Credit: Krishnan Parthasarathi <kparthas@redhat.com> Varun Shastry <vshastry@redhat.com> Change-Id: I9380eca58a285dc27dd572de1767aac8f2cd8049 BUG: 969461 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6369 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6838
* mgmt/glusterd: Improve the description in volume set help outputVarun Shastry2014-01-284-9/+23
| | | | | | | | | | Change-Id: I785648970f53033a69922c23110b5eea9e47feb3 BUG: 1046030 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6573 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6837
* features/quota: maintain correct link_count in ancestry buildingRaghavendra G2014-01-281-53/+68
| | | | | | | | | | | | | | | | | | | | | | codepath. Ancestry building codepath can be executed simultaneously when a file has hardlinks. So, following fixes are needed: * modify local->link_count under locks in ancestry building codepath. * before invoking check_limit on newly constructed parents, link_count should not be set, but instead incremented by as many number of new invocations of check_limit. * decrementing link_count and the check whether the count has hit zero to resume the waiting call_stub should be atomic. Change-Id: I6f52e50547362a5ded6bd9f085570223aea372d1 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6491 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6819
* features/quota: remove in-memory accounting of files in enforcerRaghavendra G2014-01-283-222/+210
| | | | | | | | | | | | | | | | Accounting was done in enforcer (though marker is the ultimate source of truth) to offset cached directory size becoming stale. However, with enforcer being moved to brick we can no longer maintain correct cluster wide size for a directory. Hence removing accounting code from enforcer. Change-Id: I5ea94234da4da85ed5f5ced1354d8de3454b3fcb BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6434 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6818
* cluster/dht: set op_errno correctly during migration.Raghavendra G2014-01-281-3/+22
| | | | | | | | | | | | Change-Id: I65acedf92c1003975a584a2ac54527e9a2a1e52f BUG: 1010241 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6219 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6817 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: use STACK_WIND_TAIL when quota is turned off.Raghavendra G2014-01-281-168/+207
| | | | | | | | | | Change-Id: I8a0b7f3a1995a72560c210efbad1eaafb0bdf329 BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6373 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6816
* performance/io-cache: reduce the severity of log-messageRaghavendra G2014-01-281-1/+1
| | | | | | | | | | | | | | During a genuine error condition like network outage, the log grows with redundant information. Change-Id: I5a4f2f62da10ef656f14200c4c84a6917b1f0ddd Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 1048084 Reviewed-on: http://review.gluster.org/6635 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6815
* features/quota: log usage only if hard limit not exceeded.Raghavendra G2014-01-281-4/+9
| | | | | | | | | | Change-Id: I60abf576999996e0d0d65534e1e416f6e10994c8 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 969461 Reviewed-on: http://review.gluster.org/6479 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6814
* mount/fuse: cleanup old graphs.Raghavendra G2014-01-281-6/+24
| | | | | | | | | | | | | | | | | | | | | | | After a graph switch, a PARENT_DOWN event from fuse indicates protocol/client to shutdown all its sockets. However, this event will be sent only when the first fop is received from fuse mount after graph switch. Also, this event is sent only on previously active graph. So, if there are multiple graph switches when there is no activity on mountpoint, we'll be left with a list of graphs with their sockets still open. This patch fixes the issue by sending PARENT_DOWN to previously non-active graph when a new graph is available irrespective of whether there is an activity on mount-point. Change-Id: I9e676658d797c0b2dd3ed5ca5a56271bd94b4bb6 BUG: 924726 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/4713 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6813 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: adding a setxattr filter pass for geo-rep create.v3.5.0beta2Ajeet Jha2014-01-271-0/+2
| | | | | | | | | | | | Adding filter pass for setxattr when key is "glusterfs.gfid.newfile". This was blocking creates at slave volume. Change-Id: I61455abd8688c52ac6894b5a04ba050076117ea3 BUG: 1054199 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6811 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/geo-rep: more glusterd and cli fixes for geo-rep.Ajeet Jha2014-01-2710-259/+543
| | | | | | | | | | | | | | | | | | | | | | | | | | -> handle option validation cases in reset case. -> Creating valid conf path when glusterd restarts. -> Reading the gsyncd worker thread status and displaying it. -> Displaying status-detail per worker. -> Fetch checkpoint info in geo-rep status. -> use-tarssh value validation added. misc: misc geo-rep fixes based on cluster, logrotate etc.. -> cluster/dht: fix 'stime' getxattr getting overwritten. -> cluster/afr: return max of 'stime' values in subvol. -> geo-rep-logrotate: Sending SIGHUP to geo-rep auxiliary. -> cluster/dht: fix convoluted logic while aggregating. -> cluster/*: fix 'stime' min/max fetch logic. Change-Id: I811acea0bbd6194797a3e55d89295d1ea021ac85 BUG: 1036552 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6405 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6810 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/changelog: more changelog fixes.Ajeet Jha2014-01-278-38/+212
| | | | | | | | | | | | | | | | -> log additional records. -> include FOP number for metadata. -> prevent crash if inode is not found in a fop. Change-Id: I9edd4b71819ebd68c6a2b4150ae279c471d129da BUG: 1036536 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6403 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/6808 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Treat ESTALE on nameless lookup as ENOENTPranith Kumar K2014-01-271-1/+3
| | | | | | | | | Change-Id: I635fc0fa955b33590f1c5b4dfec22d591ea8575c BUG: 1032894 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6593 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/gfid-access: fix lookup on .gfid/<parent>/bnameVenky Shankar2014-01-271-0/+17
| | | | | | | | | | | | | | | In gfid translator, lookup was not handling the case when the lookup is sent on .gfid/<parent>/bname. In this case, we flip with fake inode of the parent with the real inode in loc and send it downwards. Change-Id: I639ff1dce10ffc045da419e333d455e208b6a0f0 BUG: 1057881 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/6795 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6807
* features/gfid-access: populating inode during virtual_lookup_cbk.Ajeet Jha2014-01-272-5/+6
| | | | | | | | | | | | Setting appropriate ia_type and gfid for the inode, obtained during virtual_lookup_cbk of a directory by doing an "inode_link". Change-Id: I9582570c82e70ff5f1d4e441f9e9868ef82e9dc6 BUG: 1054199 Signed-off-by: Ajeet Jha <ajha@redhat.com> Reviewed-on: http://review.gluster.org/6806 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfid-access: fix the issue of entry creation with wrong gfidAmar Tumballi2014-01-271-6/+39
| | | | | | | | | | | | | | | | | | * dict_set was happening with a string instead of 'uuid_t' causing entry creations to happen with wrong gfid * revalidate was causing excessive ESTALE logs as lookup was happening on '.gfid/' path itself causing server to become clueless Change-Id: I3b76ce7fdec9c2ff785be21f506f859f489f80f0 BUG: 1054199 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/6520 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfid-access: do chown() after creating the new entries.Amar Tumballi2014-01-272-8/+73
| | | | | | | | | | | | | | changing the 'frame->root->uid' on the fly is not a good idea as posix-acl xlator on brick process would fail the op. Change-Id: I996b43e4ce6efb04f52949976339dad6eb89bede Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 847839 Reviewed-on: http://review.gluster.org/5833 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6801 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/compress: rename "compress" option to "network.compression"Niels de Vos2014-01-262-15/+20
| | | | | | | | | | | | | | | | Prevent mistaking the "compress" options for storage (at rest) compression. The cdc-xlator is implemented to support compressing of network traffic (READ and WRITE FOPs). URL: http://www.gluster.org/community/documentation/index.php/Features/On-Wire_Compression_+_Decompression Master-Change-Id: I9fedf4106dcb226d135ab92e4b533aff284881d7 Master-Reviewed-on: http://review.gluster.org/6765 Change-Id: Ib882af855b36df93fac46236c349c33dd4c3ced4 BUG: 1053670 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6773 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* cluster/afr: Treat FOOL condition as split-brain for entry self-healPranith Kumar K2014-01-251-0/+48
| | | | | | | | | | Change-Id: I44c942d5f949ea812d66184f868471522db17027 BUG: 1057846 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6789 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol: pass the size of the data in the WRITE on-wire FOPNiels de Vos2014-01-242-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Capturing GlusterFS traffic with tcpdump and displaying it in Wireshark shows that the size of all WRITEs are 0 bytes. It seems that the attribute is not used, and the size is calculated an other way. Even if the size attribute is not used (yet), it should be set correctly to prevent confusing while debugging network traffic with Wireshark or other tools. Note that the on-wire format is not being changed with this patch. The size is already part of the structure that is exchanged between the client and server. Change-Id: I4a1729a8e154a6fed4f8baa10ef3009d4df040cf Master-Change-Id: I9d67fe17bf203672116dea4948328e2af4004677 Master-Reviewed-on: http://review.gluster.org/6766 BUG: 1057264 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6768 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
* locks: set @lock->frame = NULL when lock is grantedAnand Avati2014-01-222-3/+5
| | | | | | | | | | | | This way disconnect cleanup code can differentiate which locks are granted vs blocked. Change-Id: I2a835c6865b6c804231d852953ea84eeccef35a3 BUG: 849630 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6762 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Make sure gf_defrag_migrate_data is not optimizedPranith Kumar K2014-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Problem: Whenever there syncop_xxx() is used inside a synctask and gcc optimizes it when compiled with -O2 there is a problem where 'errno' would not work as expected. Fix: Until http://review.gluster.com/6475 is reviewed and merged we are making sure the function is not going to be optimized. Change-Id: I504c18c8a7789f0c776a56f0aa60db3618b21601 BUG: 1040356 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6481 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6745 Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* locks: various fixesAnand Avati2014-01-147-626/+383
| | | | | | | | | | | | | | | | - implement ref/unref of entry locks (and fix bad pointer deref crashes) - code cleanup and deleted various data types - fix improper read/write lock conflict detection in entrylk - fix indefinite hang of blocked locks on disconnect - register locks in client_t synchronously, fix crashes in disconnect path Change-Id: Id273690c9111b8052139d1847060d1fb5a711924 BUG: 849630 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6695 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* protocol/server: Change log message severityv3.5beta1Vijay Bellur2014-01-031-2/+2
| | | | | | | | | | | Change-Id: Ia6aaf8a106c26fa7118c86fadb6805d2877bb6ee BUG: 849630 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6610 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/6615 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterd: Save/restore/sync rebalance dictKaushal M2014-01-031-0/+6
| | | | | | | | | | | | | | | | | | | | | A dictionary was added to store additional information of a rebalance process, like the bricks being removed in case of a rebalance started by remove-brick. This dictionary wasn't being stored/restored or synced during volume sync, leading to errors like a volume status command failing. These issues have been fixed in this patch. The rebalance dict is now stored/restored and also exported/imported during volume sync. Also, this makes sure that the rebalance dict is only create on remove-brick start. This adds a bricks decommissioned status to the information imported/exported during volume sync. BUG: 1040809 Change-Id: I46cee3e4e34a1f3266a20aac43368854594f01bc Signed-off-by: Kaushal M <kaushal@redhat.com> Backport-of: http://review.gluster.org/6492 Reviewed-on: http://review.gluster.org/6524 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Use linkat() instead of link() for portability sakeEmmanuel Dreyfus2014-01-021-1/+2
| | | | | | | | | | | | | | | | | | This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f POSIX does not says wether link(2) on symlink should link on symlink itself or on target. Linux use symlink, most other systems use target. Using linkat(2) allows the behavior to be specified, so that the behavior is portable. Also fix configure test for NetBSD linkat(2), which ceased to work. BUG: 764655 Change-Id: Ifcabda5e81b15cd80982bcfc05afda4c9e5370ef Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6612 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Use linkat() instead of link() for portability sakeEmmanuel Dreyfus2014-01-021-0/+20
| | | | | | | | | | | | | | | | | | This is a backport of Iccd27ac076b7a74e40dcbaa1c4762fd3ad59da5f POSIX does not says wether link(2) on symlink should link on symlink itself or on target. Linux use symlink, most other systems use target. Using linkat(2) allows the behavior to be specified, so that the behavior is portable. Also fix configure test for NetBSD linkata(2), which ceased to work. BUG: 764655 Change-Id: I7cf9e62ea19c7eb356935c11b480cf637c83126b Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6594 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: Remove duplicate GET_STATE callPranith Kumar K2014-01-011-2/+0
| | | | | | | | | BUG: 952029 Change-Id: I4aa87ffe70f2b56182666981956d7d1d62048e2f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6580 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* bd: Check for capabilities for creating thin lvM. Mohan Kumar2014-01-011-0/+7
| | | | | | | | | | | | Check capabitlies of the volume before trying to create thin LV. BUG: 1028672 Change-Id: Ie4e2281265e193458ccd16736960daf69d3e1b29 Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/6590 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* crypt: On calloc failure follow goto statementHarshavardhana2013-12-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | At -------------------------------------------- 1423 if (local->vec.iov_base == NULL) { -------------------------------------------- This condition being true leads to NULL pointer to be passed into `memcpy` later at ---------------------------------------------------- 1432 memcpy((char *)local->vec.iov_base + copied, ---------------------------------------------------- Avoid this by clean exit through a goto statement with in the conditional. Change-Id: I95260767f96107aa96191b18db10908ddda82ee6 BUG: 1030058 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/6617 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Change errno to op_errnoVenkatesh Somyajulu2013-12-291-1/+1
| | | | | | | | | | | | Changed errno to op_errno Change-Id: I357987af352cf1d9abda4188d392f17d10b12aec BUG: 1037501 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6541 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: rebalance to ref volinfo before startingKrishnan Parthasarathi2013-12-232-5/+11
| | | | | | | | | | | Backport of http://review.gluster.org/6522 Change-Id: Ib316897dcbd0748bfb3bfcda186b9fe30c07f80f BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: make volinfo a refcnt'ed object.Krishnan Parthasarathi2013-12-236-6/+55
| | | | | | | | | | | | | | Backport of http://review.gluster.org/6521 Add glusterd_volinfo_remove(..) which removes @volinfo from the list of volumes in the cluster and performs an unref on @volinfo Change-Id: I5f546ca58f61bc334ab1bab4c51c4a21e1f66161 BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6569 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: ignore failure to stop a stopped service.Krishnan Parthasarathi2013-12-231-0/+12
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6525 kill(2) returns -1 with errno set to ESRCH when the pid of the process being killed doesn't exist. Failing glusterd_brick_stop on a stopped brick could result in volume-stop failing, in commit phase. This fix prevents that from happening. Change-Id: I00f46fa06e489a671efbb8e4119f545f8ccea329 BUG: 1038051 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6568 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fix stopping of stale rebalance processesKrishnan Parthasarathi2013-12-231-102/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/6531 Trying to stop rebalance process via RPC using the GD_SYNCOP macro, could lead to glusterd crashing. In case of an implicit volume update, which happens when a peer comes back up, the stop function would be called in the epoll thread. This would lead to glusterd crashing as the epoll thread doesn't have synctasks for the GD_SYNCOP macro to make use of. Instead of using the RPC method, we now terminate the rebalance process by kill(). The rebalance process has been designed to be resistant to interruption, so this will not lead to any data corruption. Also, when checking for stale rebalance task, make sure that the old task-id is not null. Change-Id: I54dd93803954ee55316cc58b5877f38d1ebc40b9 BUG: 1044327 Signed-off-by: Kaushal M <kaushal@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6567 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>