summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix issues in make distM S Vishwanath Bhat2012-07-311-2/+2
| | | | | | | | | | Change-Id: I2fb3b0b35e2b5fdb08ee1857bf31ec8f65889306 BUG: 844669 Signed-off-by: M S Vishwanath Bhat <msvbhat@gmail.com> Reviewed-on: http://review.gluster.com/3759 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: update loc inode after inode_linkPranith Kumar K2012-07-311-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | RCA: inode passed to inode_link is not assigned any gfid if the inode with that gfid is already linked, so loc for opendir does not have a valid inode Fix: Use the linked_inode returned by inode_link in the loc to perform further operations on the entry. Tests: Checked that opendir comes with an loc with valid inode. Checked that re-opendir happens successfully. Tested index, full self-heal work fine with the fix. Change-Id: Idf4ced4cc2320133744962059d363e373af0e5ec BUG: 826580 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3748 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/socket: finish initialization in own threadJeff Darcy2012-07-301-7/+47
| | | | | | | | | | | | ...if we have one, that is. This addresses Avati's review comment on ea7759f1240b1e97684273b9369472695173a66. Change-Id: I71a272f7eeff8279981a75241d60620ca4975c99 BUG: 764731 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3701 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Modifed replace-brick mount cleanup to use lazy umountKrishnan Parthasarathi2012-07-301-94/+135
| | | | | | | | | Change-Id: I83a985967cbaee4927f1b8ca4bc01c9fb0171522 BUG: 806890 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3143 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/stripe: handle short writes and errors in writev callbackBrian Foster2012-07-303-38/+106
| | | | | | | | | | | | | | | | | | | | | | | cluster/stripe write callback handling is broken in the event of server side errors and short writes due to crudely summing up the return values from each node. This can produce incorrect results or cause an application to rewrite the wrong portions of a buffer in an attempt to handle this condition. Modify cluster/stripe writev handling to record the requested size of each write and use this data to return the number of consecutive bytes written from the original request. This allows an application to retry a write at the point of error (and potentially consume said error). BUG: 809975 Change-Id: Ic35cb1e092c29545205aa32e352485c507534ce0 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3700 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <sgowda@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: dump the io-threads specific information in statedumpRaghavendra Bhat2012-07-302-2/+52
| | | | | | | | | Change-Id: Ib9b9eab2d2e90fce21ef32f0f884101938978859 BUG: 843377 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3736 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsycnd: restore the generic signature for sendmark_regularCsaba Henk2012-07-301-3/+3
| | | | | | | | | | | | | | | | | Earlier fixes to 842330 changed the generic (*a, **kw) signature, although that was not related to the issue. We restore the generic signature as it was used for a reason (proxy methods that do none or only algebraic transformations on passed arguments idiomatically have generic signature, both to serve as visual cue and agnosticism wrt. the inner API). Change-Id: Ib609a3a58be53d78b7f1221a3c162c6aec8fd488 BUG: 842330 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/statedump: add start and end markers in the statedump fileRaghavendra Bhat2012-07-301-2/+37
| | | | | | | | | | | | | Also do not overwrite the statedump file if statedump is taken on the same process again. Instead add the timestamp to the filename Change-Id: I451a0decf2dad5c398631cab1fc2a69811c69af8 BUG: 843408 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3738 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: Provide option to turn off least-priorityPranith Kumar K2012-07-303-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In cases when self-heal is in progress, self-heal fops are starved because of least-priority. This affects other fops with conflicting inode, entry locks with self-heal. Fix: This patch provides configuring enable/disable of least-priority. Additional changes: Moved RCHECKSUM fop to low instead of least because it will still affect the performance of other fops if RCHECKSUM is in LEAST priority. Tests: Tested that the enabling/disabling of fops is working fine. Tested that RCHECKSUM fop priority is assigned LOW when least-priority is disabled. Change-Id: I8d72872b33e2ac7e1ad3afb27582682b0eb98a80 BUG: 843704 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3743 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* volgen: add option to add trace/error-gen in client volume fileAmar Tumballi2012-07-291-0/+6
| | | | | | | | | | | | | | | | bash# gluster volume set <VOLNAME> debug.trace client bash# gluster volume set <VOLNAME> debug.error-gen client would add the corresponding translator in client volume file just below io-stats translator. (gets added even in nfs volfile) Change-Id: I698eb9b348c59aaff9967a4e238fabfc40e69a11 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782262 Reviewed-on: http://review.gluster.com/3699 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Persisted hooks friendly user.* keysKrishnan Parthasarathi2012-07-294-48/+51
| | | | | | | | | | | | - Fixed validation of user.* keys in presence of multiple key, value pairs in a single volume set command Change-Id: I5b96de2d009fbc79772121308d9b4c0a552bac52 BUG: 825902 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3715 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: Fix statedump codePranith Kumar K2012-07-294-74/+52
| | | | | | | | | | | | | | | | | | | | | | | | RCA: Taking blocking mutex/spin locks lead to dead locks because of the locking order in statedumps. Also we were asked to remove gf_logs if possible to avoid extra cost in signal handlers. Fix: changed blocking mutes/spin locks to their non-blocking variants. Removed gf_logs in locks xlator statedump code-path. Tests: State-dump success cases are working fine. Triggered try-lock failures by putting statedumps in a while loop. In parallel did chown of the same file in a while loop. Change-Id: I81539a62f8216f267f57bb703ef132c85bfd557d BUG: 843781 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3747 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Prevent creation of volumes with tokens as volnamesPranith Kumar K2012-07-291-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: yyparse confuses volnames with tokens when any of the tokens 'volume', 'type', 'subvolumes', 'option', 'end-volume' are used as volnames. This happens because io-stats xlator name is same as volname in fuse volfile. Both nfs, fuse volfiles are affected by this problem. Fix: We could fix this also by changing io-stats xlator name to something other than 'volname'. But I am worried of the backward compatibility issues it may introduce. Disallowing creation of volumes with tokens as volname seems like a safer fix. Tests: All volume creation operations with tokens as volname give invalid volume name error. Change-Id: Ifc63a5c31375e92541b954ec133aa3c8e6a56a02 BUG: 844030 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3745 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Ensured 'store' data reaches disk.Krishnan Parthasarathi2012-07-291-15/+55
| | | | | | | | | | | | | - Opened temporary file(s) with O_SYNC flag to avoid explicit fsync'ing. - Sync'd directory entry after creation and rename of 'store' files. - Thanks to Jeff Moyer's article on http://lwn.net/Articles/457667/ Change-Id: I68a8672dc6a0b24d128de53f3b60c74dd08d8ab8 BUG: 765434 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3726 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Warnings: Fix set, unused variable warningsPranith Kumar K2012-07-292-5/+0
| | | | | | | | | Change-Id: If7ee85aa0d93f9018a76e7f60fcb7dcaf849dbdc BUG: 839950 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3742 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* acl: enable handling of FMODE_EXEC flagAmar Tumballi2012-07-273-1/+18
| | | | | | | | | | | | | | | | | | | | | | on linux systems, with open(), we can get below flag as per 'linux/fs.h'. /* File is opened for execution with sys_execve / sys_uselib */ Instead of adding '#include <linux/fs.h>, its better to copy this absolute number into other variable because then we have to deal with declaring fmode_t etc etc.. With the fix, we can handle the file with '0711' permissions in the same way as backend linux filesystems. Change-Id: Ib1097fc0d2502af89c92d561eb4123cba15713f5 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3739 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: unglobalize oldvol{file,len}Anand Avati2012-07-273-12/+35
| | | | | | | | | | | Multiple initialization of volumes works fine now. Change-Id: Ibc16957b39325817bc6f9ab90ebac9cefdafabf8 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3734 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cluster/afr: Modified split-brain handlingPranith Kumar K2012-07-265-57/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA The bug is observed because the decision to mark a file in split-brain is taken outside appropriate locks. Lookup gathers xattrs outside any lock. The xattrs being in split-brain in lookup should only be taken as a hint. Appropriate inodelks should be taken before confirming a split-brain. Self-heal confirms this at the moment. If data/metadata self-heal is turned off, inspecting of xattrs could not be performed so split-brain behavior does not work correctly if the self-heal options are turned off. Fix Self-heals are launched to inspect xattrs even when the data/metadata self-heal options are turned off. The decision to heal data/metadata after the xattrs are inspected is based on whether the options are turned on/off. So decision to set/reset split-brain flag is taken inside appropriate locks. Testcases: tests 33-36 in https://github.com/pranithk/gluster-tests/blob/master/afr/self-heal.sh Change-Id: Ia8aeab08208b50c06609ad35a9d72f3d553ee343 BUG: 833727 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3626 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Filter O_TRUNC in afr-fix-openPranith Kumar K2012-07-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | RCA: When open was done while a brick is down, afr opens the file after the brick comes backup. If this happens after the self-heal on the file is completed by self-heald etc, the file will end up in truncated state. Fix: Filter O_TRUNC while afr-fix-open because afr_open turns O_TRUNC into truncate transaction, so there will be pending changelog for the subvolume on which open fails. Testing: Had to simulate the race by stopping fix-open until self-heald completes self-heal on the file after brick online. Change-Id: I32759cc37f4bb34f206d01606a279f17b246dba4 BUG: 841840 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3705 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: detect short writes and pend an EIO errorBrian Foster2012-07-251-1/+15
| | | | | | | | | | | | | | | Write-behind returns write requests immediately and queues the request in memory for merging, etc. If a write is incomplete, pend an EIO error for the next fop. This ensures that write failures are not silent and potentially ignored. BUG: 809975 Change-Id: I0e0e6c8e710efab58ccfaf746501d00e459eb7ef Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3712 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: preserve lk-owner while syncing writes.Raghavendra G2012-07-251-66/+143
| | | | | | | | | | | | | - This patch also makes syncing of non-overlapping but consecutive writes parallel. Till now only contiguous writes were synced parallely. Change-Id: Icf0d5ea373f30c79fcdc90ba44b7e7a1bc5f0111 BUG: 765141 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/269 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster: fix crash on link of named pipe in stripe/replicate volBrian Foster2012-07-252-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | A crash occurs when attempting to link a named pipe on a striped, replicated volume. The cause for this crash is attempting to deref a NULL inode pointer in stripe_link_cbk(). The RCA for this bug uncovered a couple of problems: - AFR ignores the inode pointer it receives on failure (returning NULL). - stripe assumes the inode pointer is valid on failure. Either one of these changes addresses the crash, but this patch includes both changes. AFR is modified to pass along the inode pointer it receives (which could still be NULL). stripe is modified to not assume the inode pointer is valid on fop failure. BUG: 842825 Change-Id: I9cb2cc918552620929c3ecbd69bc66d4635eafdc Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3727 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Perform data self-heal for non regular filesPranith Kumar K2012-07-255-217/+162
| | | | | | | | | | | | | | | | | | | | | | | | | RCA: Data self-heal for non regular files open the files and then proceeds using that fd. This approach does not work for symlinks because open on symlink opens the file resolved by it. Fix: If the file is not a regular file then perform self-heal using loc. It needs to get 'big' lock and then perform lookup to get changelog then erase data part of chagelog, then unlock. Test cases: Automated at https://github.com/pranithk/gluster-tests/blob/master/afr/special-file-self-heal-test.sh Change-Id: I924a922f5135872efe2cccf2e712ada082c5689f BUG: 811317 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3724 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/stripe: don't fail if no fctx on a non-regular fileBrian Foster2012-07-251-10/+14
| | | | | | | | | | | | | cluster/stripe broke directory rename. Only check for fctx on regular files. BUG: 842652 Change-Id: I8a1e7ff30d57c994082cb10471f610023713ee53 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3720 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/index: make pthread_attr_t local to init()Pranith Kumar K2012-07-252-8/+6
| | | | | | | | | | | | | | | | | RC & FIX: No need to carry around pthread_attr_t in index_priv. So made it local to init() Tests: stepped through init() in gdb, it succeeded. Change-Id: I0525ac0676f9a329fccb0fd064933594ec117261 BUG: 843071 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3729 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: Suppress user xattr mismatch log messageshishir gowda2012-07-251-1/+1
| | | | | | | | | | | | | | | | | Changing the log-level to DEBUG. Xattr mismatch can occur when parallel setxattr's race, or when one of the bricks was down. A subsequent setxattr will fix the condition when all the subvols are up. In this case, the 'user.swift' xattr used by ufo was out of sync, but did not cause any other error. Change-Id: I6fdff78869b8ff72c305bbe122033e6c1d9d3cff BUG: 838197 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/index: Fix race in this->private initializationPranith Kumar K2012-07-251-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | RCA: In index_worker function at the time of assigning priv from this->private, this->private may not be set in init() function of index xlator. Fix: Set this->private before creating the thread. Additional Changes: Added code to handle error path completely. Test cases: Attached the process to gdb and simulated failures. executed fini in gdb using call fini(this) after init was successful. Change-Id: I1874a30d009a35352173b827574cf83daf431453 BUG: 843071 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3728 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gsyncd / geo-rep: Fix sendmark() invocation for Normal MixinVenky Shankar2012-07-251-1/+1
| | | | | | | | | Change-Id: I0ae81ab01418becba83e401ec36c6db5323945e8 BUG: 842330 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3725 Tested-by: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs: fix creation of spurious root inodesRaghavendra Bhat2012-07-241-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Suppose lookup is sent on a newly created inode (gfid is root gfid), and in the call back inode_link is done, where if there is an inode already present in the inode table for that gfid, then we start using the present inode and the newly created inode supposedly gets destroyed when refcount comes down to zero through inode_unref calls. But inodes with root gfid are not unrefed. Now since in inode_link, the gfid has already been copied to the new inode and later the actual inode is found from the inode table, the new inode does not gets unrefed if its gfid is root gfid. Thus those spurious inodes with root gfid will be present throughout the lifetime of the filesystem. To fix this first search the inode table for an inode, with the gfid, present in the stat structure received as an argument. If the inode is not found, then copy the gfid to the newly created inode. Now whenever unref is called on on the new inode it gets unrefed and thus eventually gets destroyed Change-Id: I0f25f0a8dca3245abda1c322c216f063b52cf842 BUG: 841188 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3716 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fixes for gsyncd / geo-rep and FUSE listxattrVenky Shankar2012-07-242-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two problems with recent changes to Geo-Replication First: ------ Recent changes to geo-replication relies on Rsync to tranfer extended attributes. Essentially Rsync would invoke a listxattr() and then getxattr() the set reutrned by listxattr() and finally transfer it to the remote slave. Xattrs like security.selinux would create problems as they are not allowed to be set explicitly (unless there's a rule that allows this). So, to make Rsync behave sanely we filter out all "*.selinux*" xattrs from listxattr() (which is getxattr() with ->name as NULL). Second: ------- Python's "if {..} else {..}" shortcut ".. and .. or .." was misused here. This is a straightforward fix by interchanging last two variables (classes in this case). Also fix a typo in sendmark_regular() definition. Change-Id: I097b5f5d88a36c7eef5560a78d4332948a545942 BUG: 842330 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3714 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* afr: pass back xdata in createBrian Foster2012-07-231-2/+5
| | | | | | | | | | | | | | | A striped, replicated volume spits an error on file creation because stripe requires xdata to process stripe information and AFR isn't passing it back. This fix was suggested by Amar Tumballi. BUG: 842373 Change-Id: Ia7063590ca5e873d4a4e155989cf067e8a07501f Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3713 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfxdr.so: change licenseAmar Tumballi2012-07-2026-366/+130
| | | | | | | | | Change-Id: I049441e465127195c192443ab0234548d2449e50 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3704 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gsyncd / geo-rep: Fix typo in 'purge' flowVenky Shankar2012-07-201-1/+1
| | | | | | | | | Change-Id: I6c329b895178545d16b0cb9f01ad116f5342f752 BUG: 841855 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3706 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd: convert ignore-deletes to a mixin tooCsaba Henk2012-07-191-3/+16
| | | | | | | | | Change-Id: I164a1d1dd5f15569afd6806834119a6844949df0 BUG: 841062 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3684 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep / gsyncd: add support for sending xtimes through rsyncCsaba Henk2012-07-193-14/+35
| | | | | | | | | | | | | | Note that in said mode metadata synchronization is best effort: rsync syncs metadata at last so if rsync is interrupted in between xattr sync and metadata sync stages, then file will be considered in sync Change-Id: I1c75eab33b0a1000abf3ad36b2d484a89eeda1bd BUG: 841062 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3683 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* glusterd: Refactored brickinfo APIsKrishnan Parthasarathi2012-07-1910-202/+145
| | | | | | | | | | | | | | | | | This patch modifies the existing brickinfo function signatures and/or names to do one thing right and call them by 'appropriate' names. - Decoupled brickinfo_get and is_brickpath_available - Removed dead comment about realpath(3) in canonicalize_path - Renamed glusterd_brickinfo_from_brick to glusterd_brickinfo_new_from_brick to make the name of the function reflect that an allocation is happening Change-Id: I29daba6d431ca799d43c927b9dfbaeda327e83e8 BUG: 764890 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.com/3668 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* fuse-bridge: utilize the option handle framework for doubleAnand Avati2012-07-191-52/+34
| | | | | | | | | | | | Also make other option initialization code use GF_OPTION_INIT framework for setting options and default values. Change-Id: I68a5c7b674f487fef9d23195654d3a5b2f7b8811 BUG: 841417 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3698 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs/options: enable validator macros for type 'double'Anand Avati2012-07-192-25/+48
| | | | | | | | | | | | | Values like 'entry-timeout' and 'attribute-timeout' in FUSE are of C type double. Enable support in the options framework for using this type. Change-Id: If1a619595a5925937e88540710860df27347acd0 BUG: 841417 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3697 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* fuse-bridge: expose negative entry caching of FUSEAnand Avati2012-07-196-2/+52
| | | | | | | | | | | | | | | | Fuse kernel module supports caching negative entries, enabled by specifying a timeout while returning ENOENT to lookup. This patch enables the functionality to be enabled with the command line. Also fixed a typo bug in mount.glusterfs.in. Change-Id: I47eab2834cca9a05887266358afbf504bbb4c489 BUG: 841417 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3696 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
* glusterd: atomic store update.Krishnan Parthasarathi2012-07-192-2/+118
| | | | | | | | | | | | | | | | All 'updates' to store are done in their respective tmp files and a rename to their original copies is done in one pass. Failure to write or rename successfully, promptly reduces the store's revision no., giving us an opportunity to 'correct' it via peer 'detach-attach' operations, if need be. Change-Id: I44a33c41cb4d3d1cfbb455bc1f2f074d4f17dade BUG: 765434 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/654 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* FUSE: ignore setxattr for some keys from gsyncd aux mountVenky Shankar2012-07-193-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Context ------- gsyncd/geo-rep plans to rely on Rsync to sync extended attributes. When this is in place, all xattrs *visible* on the mount point would be candidate for syncing. This set could include gluster internal xattrs too (as xome xlators do not filter out in their cbks). Syncing these xattrs to the slave could result in unexpected functioning of the slave mount. Soln. ----- For gsyncd auxillary mounts (identified by client_pid -1), we only allow xtime related xattrs to go through and silently ignore (w/o propagating error back to the client) the rest of them. This provides a future proof solution as we need not worry about what xattrs show up on the mounts. Also, 'user' namespace xattrs are always passed through even if it's from a gsyncd aux mount. Signed-off-by: Venky Shankar <vshankar@redhat.com> Change-Id: I6fac5e03d2b25fa4cdece4b2897fb202617b3c23 BUG: 841062 Reviewed-on: http://review.gluster.com/3687 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/distribute: cli support for setting directory-layout-spreadshishir gowda2012-07-181-0/+1
| | | | | | | | | | | | | gluster volume set <volname> subvols-per-directory Change-Id: I5f1420eeb2268897d9b4c70edb933ed1f07649d1 BUG: 838006 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3634 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs-api.pc: include pkgconfig file in -devel RPMAnand Avati2012-07-181-0/+1
| | | | | | | | | | | Previous patch missed out including the .pc file in the -devel RPM while purging the -api.rpm. Change-Id: I895feefc62e88a962a829612aa829401fed081f8 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3693 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Example of using libglfs from Python.Jeff Darcy2012-07-181-0/+29
| | | | | | | | | Change-Id: I081582c457428d55db8ec1ed6d90f1e439f51f0d BUG: 839950 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3675 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glfsxmp: libgfapi based exampleAnand Avati2012-07-185-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an example application which uses libgfapi. It is a complete autotools based build system which demonstrates the required changes in configure.ac, Makefile.am etc to successfuly detect for and build an application against libgfapi. There are two approaches to building a libgfapi based application: 1. In the presence of pkg-config in your build system. This is the recommended approach which is also used in this example. For this approach to work, you need to build glusterfs by passing --pkgconfigdir=/usr/lib64/pkgconfig (or the appropriate directory) in your distro. This already happens if you build RPMs with the glusterfs.spec provided in glusterfs.git. You will also need to install glusterfs-api RPM. 2. In the absence of pkg-config in your build system. Make sure your LDFLAGS includes -L/path/to/lib where libgfapi.so is installed and -I/path/to/include/glusterfs where the 'api' directory Change-Id: Ic4eab2df002d7e8d20593a03e643859423048848 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3666 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterfs-api.pc: pkgconfig for API consumersAnand Avati2012-07-183-2/+26
| | | | | | | | | | Change-Id: I08c60ff9ec5d336077c39f903720f8850d4ddc72 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3665 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* gfapi: API/library for accessing gluster volumesAnand Avati2012-07-1812-1/+2864
| | | | | | | | | | | Change-Id: Ie4cbcf91b58218bebf23cf951c313aceeb29f311 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3664 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>
* libglusterfs: remove debug log messages from gidcacheBrian Foster2012-07-181-4/+0
| | | | | | | | | | | | The debug log messages for every cache lookup/add pollute the debug output. BUG: 800892 Change-Id: I6b75fd5b7005b8c007106347de8827a0d6c2fd03 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3692 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mount/fuse: check for fuse inval notify support when fopen-keep-cache enabledBrian Foster2012-07-181-1/+15
| | | | | | | | | | | | | | | | | The fopen-keep-cache feature relies on the fuse notification system to operate correctly. As Csaba has pointed out, the inode invalidation functionality was added in FUSE version 7.12. Require that the user have 7.12 or later to enable fopen-keep-cache. If not supported, warn the user and disable the feature. BUG: 833564 Change-Id: Ib9eecb56b689d8edff118b34e2dcc7dba6539b04 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3690 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: rsync option cleanups, fixesCsaba Henk2012-07-182-2/+6
| | | | | | | | | | | | - add two tunables for rsync: "rsync-options" and "rsync-ssh-options" - always pass "--no-implied-dirs" to rsync Change-Id: I3d67a4cba8cabd681edac80e6b1fb8ea322008bd BUG: 841062 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3682 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>