summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: enable process to return the appropriate error codeAnand Avati2012-09-214-13/+70
| | | | | | | | | | | | Setup a pipe() in glusterfs_ctx_t to communicate with the fork'ed child the exit status and return it to the shell. Change-Id: Ibbaa581d45acb24d5141e43ae848cae29312d95f BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* libglusterfs/graph: pass correct translator pairs during reconfigureRaghavendra G2012-09-212-8/+18
| | | | | | | | | | | | | | | | | when we autoload xlators like acl, worm or mac-compatibility, they will be loaded on top of old graph. However, corresponding ones won't be present in new graph, since newgraph doesn't contain autoloaded translators. While passing xlator pairs to reconfigure, this fact should be accounted and correct xlator pairs should be passed instead of blindly passing oldgraph->first and newgraph->first. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: I8f4fe37b7e26dc2dcae78c1fe0d4a04f8ab84ed0 BUG: 857874 Reviewed-on: http://review.gluster.org/3949 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: use runner_run_nowait() variant for starting bricksAnand Avati2012-09-201-2/+2
| | | | | | | | | | | | | This is a temporary change, which will be undone once glusterd is ready for handling portmap queries in a different thread while exec'ing brick processes. Change-Id: I389b9c38c7444e95fe9d8d0ff20fc91f4bfaf150 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3963 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
* runner: introduce a new variant runner_run_nowait()Anand Avati2012-09-202-0/+25
| | | | | | | | | | | | | which makes the child blindly _exit(0) (thereby relieving the caller quickly) and the grandchild continues to actually do execvp(). Change-Id: I4dac0f39aaaa5b2ae5dbeb96e221b8257f8d3a22 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3962 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* Prevent fuse from setting an invalid value of fd_ctxlinbaiye2012-09-201-2/+4
| | | | | | | | | | | This patch is used to prevent __fd_ctx_set() from setting an invalid value. Change-Id: I6756d83eab20fc485b3696ae341e21324f1c885c BUG: 789278 Signed-off-by: linbaiye <linbaiye@gmail.com> Reviewed-on: http://review.gluster.org/3961 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterd: Fix to log command status at the appropriate timeKrutika Dhananjay2012-09-2014-537/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: In the existing implementation, the success/failure of execution of a command is decided (and logged) in glusterd handler functions. Strictly speaking, the logging mechanism must take into account what course the command takes within the state machine before concluding whether it succeeded or failed. FIX: This patch attempts to fix the above issue for vol commands. The format of the log message is as follows: for failure: <command string> : FAILED : <cause of failure> for success: <command string> : SUCCESS APPROACH (in a nutshell): * The command string is packed into dict at cli and sent to glusterd. * glusterd logs the command status just before doing a "submit_reply", which is called (either directly or indirectly via a call to glusterd_op_cli_send_response) at 2 places for every vol command: i. in handler functions, and ii. in glusterd_op_txn_complete In short, the failure of a command in the handler implies the command has indeed failed. However, its success in the handler does NOT necessarily mean the command succeeded/will succeed. Change-Id: I5a8a2ddc318ef2dc2a9699f704a6bcd2f0ab0277 BUG: 823081 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/3948 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix compile time warning for gsyncd helper routineVenky Shankar2012-09-201-5/+8
| | | | | | | | | Change-Id: I262cc654a3d85ed690446b3875959565600b4bcd BUG: 846197 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/3784 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* rpcsvc: framework for executing actors as synctaskAnand Avati2012-09-193-1/+32
| | | | | | | | | | | | | | An rpcsvc_program can be registered by setting .synctask field to 1 which will make actors of that program be executed in a synctask, thus freeing up the rpc/poll thread while the actor executes. Change-Id: Idacef2ad3bcae0f354fd0fc16ca06ba7094d7b98 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3833 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* performance/io-cache: provide hook for dumping inode contextRaghavendra Bhat2012-09-191-29/+38
| | | | | | | | | Change-Id: Idcf24200ad8f0cf018ab92118f6b77cc4b9edcab BUG: 843787 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3816 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: override 'gid-timeout' option to disable aux gid compatibilityAmar Tumballi2012-09-191-0/+5
| | | | | | | | | | | | while mounting -o gid-timeout=-1 will be treated as disabling aux-gid Change-Id: I85c350868a8cc4a43f5e5aec9427222580da675b BUG: 835834 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/3954 Reviewed-by: Brian Foster <bfoster@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: Implement access fopPranith Kumar K2012-09-192-0/+28
| | | | | | | | | Change-Id: I959144451790d7e47ae48564923d324451a9db23 BUG: 858602 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3958 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: readdir() should return 32-bit inodes when 'enable-ino32' is usedNiels de Vos2012-09-183-5/+19
| | | | | | | | | | | | | | | | | | | | The glusterfs mount option 'enable-ino32' does not change the behaviour of readdir(). fuse_readdir_cbk() uses entry->d_ino directly, and this was missed in commit c13823bd16b26bc471d3efb15f63b76fbfdf0309. By adding the function gf_fuse_fill_dirent(), the fuse_dirent structure is filled in a similar way as the fuse_attr structure. This helper uses the same function to squash the 64-bit inode in a 32-bit attribute. Change-Id: Ia20e7144613124a58691e7935cb793b6256aef79 BUG: 850352 URL: http://lists.nongnu.org/archive/html/gluster-devel/2012-09/msg00051.html Tested-by: Steve Bakke <sbakke@netzyn.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/3955 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dual licenseKaleb S. KEITHLEY2012-09-181-6/+6
| | | | | | | | | | | rebased BUG: 820551 Change-Id: I9c51d68e52a9252c5a43af1677380a410ca69519 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/3856 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli/: Filter out the loopback address for brick creation.Varun Shastry2012-09-181-2/+4
| | | | | | | | | | | | Don't create the volumes with brick address 0.0.0.0 to 0.255.255.255 (http://en.wikipedia.org/wiki/Reserved_IP_addresses) Change-Id: Ic5464ec370bddf498a5220acf2d367b877e21e66 BUG: 787627 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3865 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* logging: log ENOENT errors in DEBUG mode instead of ERROR or INFORaghavendra Bhat2012-09-172-2/+4
| | | | | | | | | | Change-Id: I0a43769223991e4ad5206b4382d737a0c3557bf3 BUG: 851953 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3934 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/marker: if parent inode is NULL, then get it by inode_parentRaghavendra Bhat2012-09-172-4/+13
| | | | | | | | | | | | | | | | | | | * If parent inode is NULL (nameless lookups which uses gfid for looking up the inode), then try to get it by inode_parent, instead of returning which results in the inode's contribution not being added to the list. * Prevent exceesive logging while adding the inode's contribution to the list if the operation fails. (Check if the inode's gfid is null which indicates that the inode is not yet linked to the inode table and hence addition of its contribution to the list can fail). Change-Id: I5300f00195ae92a5122613898ae3dabddb2d0bfe BUG: 851953 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3935 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* CLI: Displaying time as N/A when unix time is 0Varun Shastry2012-09-172-5/+6
| | | | | | | | | | | | | | | | | | | Problem: 'volume top open' command was displaying '1970-01-01 00:00:00.000000' when no file has opened yet. Fix: Made the fix in gf_time_fmt() to make it more generic according to patchset 1 review comment. Change-Id: I748ed203bd0d9fbaac94b5b51ed708b34fccd434 BUG: 852000 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3924 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Clean up of typepunning errors ( Strict aliasing warnings )Varun Shastry2012-09-173-33/+29
| | | | | | | | | | | Change-Id: I48733967facc526fb523a8dc9bd068f8c5cc5971 BUG: 764282 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3950 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix remote processes not being shown in "volume status"Kaushal M2012-09-171-3/+4
| | | | | | | | | | | | Also, refactor function name so it makes more sense. Change-Id: I3bd3e1bdcacb522ddf4f39d09f73be1c53915362 BUG: 856480 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3933 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* protocol/server: dump the ltable and fd table related inodes onlyRaghavendra Bhat2012-09-174-29/+98
| | | | | | | | | | | | | Do not dump the entire inode table in the statedump. Instead dump those inodes only which are present in fdtable or ltable. Change-Id: If848f9a6198927b4cc0abd47339461f3ea41d6df BUG: 844688 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3848 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: Avoid mem_put on null localPranith Kumar K2012-09-172-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: QUOTA_STACK_UNWIND does not check if local is NULL before mem_put. This leads to a callingfn log for every setxattr in quota. Fix: Made sure the mem_put happens only on non-null local in quota. Additional changes: Removed unused QUOTA_STACK_DESTROY macro. Tests: Peformed setfattr on the mount point and the Invalid argument logs don't come anymore. Checked that the change does not introduce any memory leak in quota. Change-Id: Ie4534c7af0fff80e35d8510311055f930262594f BUG: 856541 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3936 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: add symlink (auto resolution) support in resolverAnand Avati2012-09-173-4/+96
| | | | | | | | | | | | - new internal API glfs_lresolve() for usage with APIs like glfs_lXXXX() (e.g. glfs_lstat()) Change-Id: I61c60af6bda3072f189684ad8ac9815d59f455fc BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3866 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* mount/fuse: treat NULL gfid is a failure in lookup disregarding op_retAnand Avati2012-09-171-2/+14
| | | | | | | | | | | | | | | | | | | It is not possible to inode_link() with a NULL gfid. If a lookup (or any other "entry" op) returns a success but has a NULL gfid, then treat it as a failure even if op_ret was 0. Currently AFR does this when self-healing fails/aborts in certain situations (like entrylk acquisition failure, gfid mismatch etc.) returning a NULL gfid in struct iatt of lookup_cbk with op_ret = 0. Fixing this is an independent patch and fuse-bridge needs to be robust against such misformed replies in any case. Change-Id: If5f75780c0b5b1303f466711f1992f90a77e768a BUG: 856921 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3952 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
* cli: Fix double free in cli_add_key_groupKrishnan Parthasarathi2012-09-141-0/+2
| | | | | | | | | Change-Id: I3c2f030ac7c53913612a3fbac5e582c47b005621 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3943 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Option to set brick(of a volume)'s root dir's uid/gidKrishnan Parthasarathi2012-09-142-6/+46
| | | | | | | | | | | | | | | | | | CLI --- gluster volume set VOLNAME owner-uid uid gluster volume set VOLNAME owner-gid gid where uid,gid are the owner's user id and group id respectively that would be set on the root of all brick (backend) fs. TODO: uid/gid should not be -1. Today we don't validate that in CLI. Change-Id: Ib6a2fb5e404691c5fe105a89faaeff3e1ab72e91 BUG: 853842 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3891 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fixed _is_prefix check for two file pathsKrishnan Parthasarathi2012-09-131-4/+25
| | | | | | | | | | Change-Id: Iad1f7c865c4ce5092d85379257ba7a5ec95f7ebc BUG: 764890 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3937 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-09-13160-1053/+923
| | | | | | | | | | | | License message changed for server-side, dual license GPLV2 and LGPLv3+. Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs SEGV on Fedora 17 from UFO fallocate(2) callKaleb S. KEITHLEY2012-09-131-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upload of a file will cause the volume's glusterfs to SEGV when it fields a FUSE_FALLOCATE op. Swift inspects libc to determine if there is a symbol for fallocate(2) and if so will use it. And while the libc in RHEL 6 does have fallocate(2), the version of fuse in RHEL 6 does not support fallocate, and things are handled gracefully elsewhere (the kernel perhaps?) N.B. fallocate was added to version 7.19 of fuse. Fedora 17 and later (and maybe earlier too) has 7.19. RHEL 6 still has 7.13. Glusterfs uses the 7.13 version <linux/fuse.h> (in contrib/fuse-include/fuse_kernel.h) Thus on Fedora 17, with both fallocate(2) in libc and fallocate support in fuse, the fallocate invocation is dispatched to glusterfs, but the dispatch table (fuse_std_ops in xlators/mount/fuse/src/fuse-bridge.c) is too short for one thing; the fallocate opcode (43) indexes beyond the end of the table, and even when that doesn't directly cause a SEGV, the NULL pointer at that location does cause a SEGV when attempting to call the function through the pointer. BUG: 856704 Change-Id: I148acbf1265f01a15bd158f227c8a7cb9365606e Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/3938 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse-bridge: Pass unknown option down to fuseLubomir Rintel2012-09-126-4/+44
| | | | | | | | | | | | | | | | | | In Linux, certain "filesystem-specific" options (passed in string form in last argument to mount(2)), such as "rootcontext" or "context" are in fact common to all filesystems, including fuse. We should pass them down to the actual mount(2) call untouched. This is achieved by adding "fuse-mountopts" option to mount/fuse translator and adjusting the mount helper to propagate it with unrecognized options as they are encountered. BUG: 852754 Change-Id: I309203090c02025334561be235864d8d04e4159b Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com> Reviewed-on: http://review.gluster.org/3871 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dht: improve dht_fix_layout_of_directory for better re-assignmentAnand Avati2012-09-121-145/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jeff Darcy wrote: > AFAICT, the fix-layout code doesn't do the same rotation that the > new-directory code does. Therefore, the new bricks always claim > completely predictable hash ranges for every directory, leading to > either a 0-1-2-3 pattern or a 1-0-2-3 pattern. In other words, a > file whose hash falls into the second quarter of the range will always > be assigned to brick 2, and a file whose hash falls into the fourth > quarter will always be assigned to brick 3. The rest will be split > according to the original pattern. Put still another way, instead of > same-named files in different directories being spread across N bricks, > they might be spread across only two bricks (bad) or totally > concentrated on one brick (worse) regardless of N. The current dht_fix_layout_of_directory() code, in an attempt to maximize overlap of new layout with existing layout (to minimize movement of data) fails to do a good job of randomizing new assignment even when it could do a better job. In an example where we expand from 2 nodes to 4 nodes, the current possibilities are limited in the following way - (theoretical hash range: 00 - 99) OLD 1 ----- server1: 00 - 49 server2: 50 - 99 NEW 1 ----- server1: 00 - 24 server2: 50 - 74 server3: 25 - 49 server4: 75 - 99 OLD 2 ----- server1: 50 - 99 server2: 00 - 49 NEW 2 ------ server1: 50 - 74 server2: 00 - 24 server3: 25 - 49 server4: 75 - 99 The above shows that when add-brick from 2 bricks to 4 bricks, server3 and server4 always get the _same_ hash range no matter what the original hash range assignment was. The fix in this patch is first do the standard new directory assignment to a directory (with rotation etc.) and then do the reassignment to maximize overlap. This way newly added servers still get random ranges and existing servers have a probability of getting either of the quarters which were part of its half previously. The same principles hold for all add-brick from M to M+N. Change-Id: I0cbbf3bfa334645728072d66aaaa80120d0b295f BUG: 853258 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3883 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* event: peel out poll and epoll specific code into separate filesAnand Avati2012-09-124-836/+920
| | | | | | | | | | | code re-org, no change in logic. Change-Id: Ib1cb3d3f4cf8989a916df7476479c26570d07a84 BUG: 821087 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3932 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli: Added special key "group" for bulk volume set.Krishnan Parthasarathi2012-09-123-33/+148
| | | | | | | | | | | | | | | | | | | gluster volume set VOLNAME group group_name - where group_name is a file under /var/lib/glusterd/groups containing one key, value pair per line as below, key1=value1 key2=value2 [...] - the command sets key1 to value1 and so on. Change-Id: Ic4c8dedb98d013b29a74e57f8ee7c1d3573137d2 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3831 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Detect python > 2.5, make sure MKDIR_P is substitutedEmmanuel Dreyfus2012-09-093-1/+356
| | | | | | | | | | | | | | | | | | | | | | gluster build machine generate configure scripts unable to detect python > 2.5 This change include a more recent python.m4 so that newer python can be correctly detected. Build.gluster.com also produces a configure that fails to subsitute MKDIR_P, leading to bugs at make install. Works this around by introducing mkdirp.m4 from aclocal-1.11, with the autoconf version test removed because build.gluster.com also has an outdated autoconf. And we need a bit from a recent autoconf NB: this patchset changes nothing since the last one, I just fix title in gerrit. BUG: 764655 Change-Id: I3ffac50cc7a10cb9e56dd490dbc2b550bba3fabd Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* 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-067-30/+67
| | | | | | | | | | | | | | 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>
* libglusterfs: Implementation of syncop_fsyncdirPranith Kumar K2012-09-062-0/+29
| | | | | | | | | | Change-Id: I832b9c0bfbe804fbca98dc9e8fbe7d3174fecc82 BUG: 854326 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3902 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.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-062-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cli: sanitize exit valueCsaba Henk2012-09-061-1/+1
| | | | | | | | | | | | | | | The pattern established in http://review.gluster.com/3218 as of which cli exits with negated return value of the command instrumentation function should be uniformly followed. (Prior to this commit whether cli exits with 255 or 1 on failure depended on the way of invocation.) Change-Id: Icbab1f435042b3321c689fa785109bf87195d86d BUG: 765214 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3913 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@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>
* core/statedump: parse the file and set the path of the statedump filesRaghavendra Bhat2012-09-062-15/+119
| | | | | | | | | | | | | | | | | | | | * As of now "gluster volume set statedump-path" option sets the path of the statedump files for brick processes only. If SIGUSR1 is sent directly to all the gluster processes instead of using gluster cli command, then some of the statedumps will still be in /tmp (such as nfs server, glustershd). * This patch makes glusterfs processes search for the file /tmp/glusterdump.options and consider the options given in it. There if path key is set, then all the processes use that path when SIGUSR1 is sent or cli statedump command is executed. (Note that after taking statedump, if /tmp/glusterdump.options file is removed, then the default way is resumed). Change-Id: I2e8fbfb4823318512e03b234e90d3a3888724ddc BUG: 851175 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3907 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs/dict: make 'dict_t' a opaque objectAmar Tumballi2012-09-0637-413/+486
| | | | | | | | | | | | | | | * 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>