summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* posix-acl: fixup extended ACL entries properlyv3.4.1rc1v3.4.1Anand Avati2013-09-252-1/+46
| | | | | | | | | | | | | | Typically when updating cached ACL from backend, we get both iatt and ACL xattrs (like lookup, readdirplus etc.) However in calls like setattr(), the mode would have updated but we receive only iatt and not the ACL xattrs. In such case we need to "spread" the effects of the changed mode properly into the cached ACL xattr ourselves. Change-Id: I23a7bc9c14722ff6848e175ed4bbe863a21ce2c9 BUG: 998967 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6002 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gNFS: avoid double fd unref in opendirSantosh Kumar Pradhan2013-09-241-3/+1
| | | | | | | | | | | | | | | | Noticed that the fd_unref was called on the fd regardless of the return value at nfs3svc_opendir_readdir_cbk(), hence removing an extra unref in the negative case in nfs_inode_opendir_cbk, which fixes the spurious fd_unref(). Back port of: http://review.gluster.org/4943 (Rajesh Amaravathi) Change-Id: Ibddf487c7890407d01befedd65eefb10cb9c989f BUG: 1011761 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5996 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Treat migration failures due to space constraints as skippedv3.4.1qa3shishir gowda2013-09-196-17/+86
| | | | | | | | | | | | | | | | Currently rebalance/remove-brick op's display migration failed count even for files which failed due to space issues (not enough space for file, or migration leading to cluster imbalance) These will now be counted as skipped, and rebalance/remove-brick status will display the additional counter BUG: 989846 Change-Id: I4efa7ce69dd43680ff47181afed0c561954c5080 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5977 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: implement a minimial glfs_fini()Anand Avati2013-09-192-4/+74
| | | | | | | | | | | | | At the very least, we should PARENT_DOWN on the currently active graph and disconnect ourselves from glusterd. Further cleanups underway. Change-Id: I9276686a84b0975b5ce272b4cbec1b80920d5c5c BUG: 1004519 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5903 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli,glusterd: Task parameters in xml outputKaushal M2013-09-194-8/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 91cd0eae2cc1d96cbafa6457835f146503355238 from master This patch introduces task parameters for the asynchronus task shown in volume status. The parameters are only given for xml output. The parameters shown currently are, - source and destination bricks for replace-brick tasks ...... <tasks> <task> <type>Replace brick</type> <id>3d1a1005-9d2e-4ae0-bd62-577bc1d333a3</id> <status>1</status> <params> <srcBrick>archm:/export/test4</srcBrick> <dstBrick>archm:/export/test-replace1</dstBrick> </params> </task> </tasks> ...... - list of bricks being removed for remove-brick tasks ...... <tasks> <task> <type>Remove brick</type> <id>901c20ca-0da2-41de-8669-5f0caca6b846</id> <status>1</status> <params> <brick>archm:/export/test2</brick> <brick>archm:/export/test3</brick> </params> </task> </tasks> ...... The changes for non-xml output will be done in a subsequent patch. BUG: 916577 Change-Id: Iade8a4974aefc5ffb080553496ae5a3169055090 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5973 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: add aggregate status for rebalance and remove-brick status xml outputKaushal M2013-09-191-1/+15
| | | | | | | | | | | | | | | | | | | Backport of 91e4b7aa1361087317238b9bf6427ef274737c8c from master Add aggregate status information in <aggregate> section of gluster volume 'rebalance status' and 'remove-brick status cli xml output. The aggregate status determined based on the most critical level and the aggregate status will have 'Complete' only when all individual status are 'Complete'. BUG: 1006813 Change-Id: I803d4bfb31dbda53b5665332263576c910562805 Original-author: Timothy Asir <tjeyasin@redhat.com> Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5972 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Don't reset rebalance status on add-brickKaushal M2013-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | Backport of 67c28b19355c47e96d1420405cc38753a3e5f9be from master The rebalance status was being reset to 'Not started' when add-brick was performed. This would lead to odd cases where a 'rebalance status' on a volume would show status as 'not started' but would also include the rebalance statistics. This also affected the showing of asynchronus task status in 'volume status' command. By not resetting the status prevent the above issues from happening. Since we use the running/not-running of the rebalance process as the check when performing other operations we can safely leave the rebalance stats collected on an add-brick. BUG: 1006247 Change-Id: Idade88d9e5a6f27659490b3e6d85495d426ef0a3 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5971 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: allocate large auxgid list on demandAnand Avati2013-09-196-2/+43
| | | | | | | | | | | | | | | | For rpc requests having large aux group list, allocate large list on demand. Else use small static array by default. Without this patch, glusterfsd allocates 140+MB of resident memory just to get started and initialized. Change-Id: I3a07212b0076079cff67cdde18926e8f3b196258 Signed-off-by: Anand Avati <avati@redhat.com> BUG: 953694 Reviewed-on: http://review.gluster.org/5927 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5928
* mount/fuse: Implement forget in cbks for fuse.Vijay Bellur2013-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | With the introduction of inode_ctx_set in fuse as part of 2991503d014, forget cbk gets called for fuse xlator. Though nothing needs to be done inf forget_cbk, excessive log messages of the following kind are observed: [2013-09-16 06:09:50.758063] W [defaults.c:1331:default_forget] (-->/usr/local/lib/glusterfs/3git/xlator/mount/fuse.so(+0xa1f2) [0x7f51432781f2] (-->/usr/local/lib/libglusterfs.so.0(inode_unref+0x3c) [0x7f5144e5 816c] (-->/usr/local/lib/libglusterfs.so.0(+0x2d061) [0x7f5144e58061]))) 0-fuse: xlator does not implement forget_cbk This patch prevents such log messages from being seen. Signed-off-by: Vijay Bellur <vbellur@redhat.com> BUG: 979910 Change-Id: Ie5874138f46822b10ff4213bd1134d78330ec460 Reviewed-on: http://review.gluster.org/5932 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5975 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: Fix 'status all' xml output when volumes are not startedKaushal M2013-09-192-10/+38
| | | | | | | | | | | | | | Backport of 7d9bc0d21408c31651a65a6ec0e67c3b8acd0fde from master CLI now only outputs one XML document for 'status all' only containing those volumes which are started. BUG: 1004218 Change-Id: I119ac40282380886b46a09fd9a19d35115fd869d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5970 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Add statusStr xml tag to task list and rebalance/remove brick statusKaushal M2013-09-193-19/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of cd7951aa31ae4bbdf35fc6d1f2466636844b889d from master New xml tag statusStr added to following gluster cli commands gluster volume status all --xml (For Task status) gluster volume rebalance <VOLNAME> status --xml gluster volume remove-brick <VOLNAME> <BRICK1..> status --xml Example(volume status all): <task> <type>Rebalance</type> <id>82d8d122-8738-4144-8507-d93fc98b61df</id> <status>3</status> <statusStr>completed</statusStr> </task> Example(volume rebalance <VOL> status) <node> <nodeName>localhost</nodeName> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </node> Also modified task status as string instead of showing number in gluster volume status all Example: Status of volume: gv1 Gluster process Port Online Pid ------------------------------------------------------------------------------ Brick sumne.sumne:/gfs/b1 49154 Y 15489 Brick sumne.sumne:/gfs/b2 49155 Y 15493 NFS Server on localhost N/A N 15913 Task ID Status ---- -- ------ Rebalance 82d8d122-8738-4144-8507-d93fc98b61df completed BUG: 1003521 Change-Id: I2f6845b621cbd5a74aeb3a3195f944536745e0ec Original-author: Aravinda VK <avishwan@redhat.com> Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5969 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Remove grep process entries from pidgrepRaghavendra Talur2013-09-151-1/+1
| | | | | | | | | | | | | | | | | | Problem: We were picking process with lowest pid from ps|grep result. However, lowest pid need not be oldest process as recycling of PIDs can take place. Solution: Removed grep process entries from ps entries using grep -v grep. Change-Id: I2b9687a05a34cf6358f773183770d69a3fb9eb10 BUG: 858488 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5930 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Calculate volume op-versions only on set/resetv3.4.1qa2Kaushal M2013-09-133-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5568 The volume op-versions are calculated during a volume set/reset, reading a volume from disk and importing a volume during probe or volume sync. The calculation of the volume op-version depends on the clusters op-version as some features are enabled automatically depending on the clusters op-version. We also don't store the volume op-versions persistently and don't export the volume op-versions during sync. Due to this, there can occur cases which will lead to inconsistencies in volumes in different peers. One such case is below, Consider, a cluster made up 3 peers P1, P2 and P3, operating at op-version N. The cluster has two volumes V1 and V2, which have volume op-versions N (since volume op-version cannot be greater than cluster op-version). We have, Cluster-op-version = N V1 op-version = N V2 op-version = N A set operation on V1 causes the clusters op-version to be bumped up to N+1. Assume that there exist some features that are automatically enabled on op-version N+1. The op-version of V2 remains at N as no operation has been performed on it. So, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N Now, we probe a new peer P4. On the new peer we will have the following op-versions, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N+1 This happens because we don't send volume op-versions during the sync after probe. P4 will freshly calculate the op-version of V2 (assuming features have been auto enabled due to the cluster op-version being N+1) as N+1. Another case is when glusterd on a peer restarts. Assume P3 was restarted, glusterd will recalculate the volume op-versions during the restore state. Again, op-version of V2 will be calculated as N+1 assuming auto enabled features. This will lead to inconsistency in the volume representation in memory and on disk, as glusterd will assume the volume contains auto enabled features, but the volfiles don't contain them as they were not regenrated. These kind of issues can be solved by calculating the volume op-version only when features are enabled and disabled (ie. during volume set/reset), persisting the volume-op-versions and exporting/importing them. BUG: 1005043 Change-Id: Id8bb05ba2a77e510739b3b1833f98b4d6d1fa4d7 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Use volume op-versions during volgenKaushal M2013-09-134-19/+14
| | | | | | | | | | | | | | | | | Backport of '3af61d6 glusterd: Use volume op-versions during volgen' from master Instead of using the cluster op-version, volume op-version is used to enable open-behind during volgen. For doing this, the volume op-versions are updated before regenerating the volfiles. BUG: 990830 Change-Id: I07e4a34004816c803fcbb3ee1ddd4b1e4c3a8006 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5831 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Update sub_count on remove brickVijay Bellur2013-09-132-0/+26
| | | | | | | | Change-Id: I7c17de39da03c6b2764790581e097936da406695 BUG: 1002556 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5902 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Allow bumping down a peer's op-version during probev3.4.1qa1Kaushal M2013-09-102-28/+9
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5715 Earlier, a peer running a higher op-version couldn't be probed into a cluster running at a lower op-version. This created issues when trying to expand an upgraded cluster. This patch changes this behaviour. The cluster no longer rejects a peer being probed if its op-version is higher than the cluster op-version. The peer will reduce its op-version if it doesn't have any volumes. If the peer contains volumes and needs to reduce its op-version, it fails the handshake and the probe fails. BUG: 1005038 Change-Id: Iabe790a9f826a4ac63d379eeeba01efcfef01f4d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5834 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Ignore subvols with error in min-free-disk/inodesAmar Tumballi2013-09-105-17/+86
| | | | | | | | | | | | | | | | | | | Currently when selecting a alternative subvolume when hashed subvol has exceeded min-free-disk/inodes, we do not check if layouts have errors (including decommissioning). This leads to data being written to those subvolumes, and in case of decommissioning, will lead to data loss. BUG: 982919 > Original-Author: shishir gowda <sgowda@redhat.com> > Reviewed-on: http://review.gluster.org/5299 Change-Id: If301a86cf3ca5fad6529bd2e61382f9901663ba0 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc: fix typo which refers glibc macroAnand Avati2013-09-101-1/+1
| | | | | | | | | | | | | A typo which read MAX_AUTH_BYTES instead of GF_MAX_AUTH_BYTES was picking the value 400 instead of the larger 2048. This causes failures when number of aux group ids is a large number. Change-Id: Idb8d59aee2690fd53e24c2e09f58a16fe387ef27 BUG: 1000131 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: fix for not able to rename foldersRaghavendra Talur2013-09-101-8/+11
| | | | | | | | | | | | If oldname is being renamed to newname, we need to check for type of newname only if newname exists. Change-Id: I068a283f9ffe67fcd5e8754d6bf052a2339efbf2 BUG: 953694 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5886 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: fix glfs_readlink()Anand Avati2013-09-101-1/+6
| | | | | | | | | | | | glfs_readlink() is supposed to memcpy the buffer pointer returned by syncop_readlink(). Fix it. Change-Id: I5936b07abbd93cf02b354233dc60f6623e30a38b BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5885 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: perform open() on pre-existing inode in glfs_creat()Anand Avati2013-09-101-2/+6
| | | | | | | | | | | | | | Performing syncop_create() on a pre-existing file can result in opening the linkfile if DHT has a linkfile for the file. This is because dht_create() will perform the op on the hashed_subvol() and overwrite the layout in dht_create_cbk. Change-Id: I7a0db56921ec9fc3e278e0418db3b967f81e5598 BUG: 990410 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5884 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* performance/write-behind: invoke request queue processing ifRaghavendra G2013-09-101-19/+30
| | | | | | | | | | | | | | | | | | | | | we find fd marked bad while trying to fulfill lies. * flush was queued behind some unfulfilled write. * A previously wound write returned an error and hence fd was marked bad with corresponding error. * wb_fulfill_head (invocation probably rooted in wb_flush), before winding checks for failures of previous writes and since there was a failure, calls wb_head_done without even winding one request in head. * wb_head_done unrefs all the requests in list "head". * since flush was last operation on fd (and most likely last operation on inode itself), no one invokes wb_process_queue and flush is stuck in request queue for eternity. Change-Id: I3b5b114a1c401d477dd7ff64fb6119b43fda2d18 BUG: 988642 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/5883 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi : Fix for hardlink creation on SMB mountAnand Avati2013-09-101-0/+9
| | | | | | | | | | | | | | Previously the inode of the hard link was left uninitialised hence glfs_loc_link() used to fail with invalid parameter.Since inode is same for both the files in hard link creation, updated the inode field of hard link to be same as that of the original file. Change-Id: Ifd6439867d982524a7b48bf3f6add6e844b3c4c1 BUG: 996063 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5882 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: release big locks while doing mountAnand Avati2013-09-101-0/+4
| | | | | | | | | | | | Else things can deadlock in getspec v/s glusterd_do_mount() Change-Id: Ie70b43916e495c1c8f93e4ed0836c2fb7b0e1f1d BUG: 997576 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5881 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mount/fuse: save the basefd flags in the new fdRaghavendra Bhat2013-09-101-0/+1
| | | | | | | | | | | | | | Upon graph switch, the basefd's flags were not saved in the new fd created for the new graph upon which all the further requests for the open file would come. Thus posix was treating the fd as a read-only fd and was denying the write on the fds. Change-Id: I781b62b376a85d1a938c091559270c3f242f1a2a BUG: 998352 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5880 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* io-cache: fix unsafe typcasting of pointer to uint64Anand Avati2013-09-101-1/+3
| | | | | | | | | | | | | The typecast of pointer to uint64_t *, followed by setting of 64bit in inode_ctx_get() results in memory corruption on 32bit system. Change-Id: I32fa3bf3b853ed2690a9b9a471099a59b9d7186a BUG: 997902 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5879 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: unlock before aborting transactionAnand Avati2013-09-101-0/+2
| | | | | | | | | | | Else this results in a missing frame causing a hang Change-Id: Ib5f3dc6a3999449faa2853cee2944af2fb065a20 BUG: 1002399 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5878 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* api: Fill loc.path and loc.gfid before syncop_open.Raghavendra Talur2013-09-101-0/+9
| | | | | | | | | | | | syncop_open was crashing because of NULL dereference. This fixes that. Change-Id: I4bc48fac2a6c0b15c806cbbb4ae45c67891ab7ed BUG: 1002577 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5877 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* api: Add null check for active_subvol in glfs_close.Raghavendra Talur2013-09-101-0/+5
| | | | | | | | | | | | | Problem: In glfs_close, NULL value returned by glfs_active_subvol was not being checked and was causing a crash. Change-Id: I6eefa60e7b07dee251b98932b1d08a5c2981d3d7 BUG: 1002511 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5876 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfs, gfapi: fix symbol clashAnand Avati2013-09-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The callback structures in both protocol/client and glusterfsd, gfapi used the same name for the actor table - gluster_cbk_actors. CBKs are required only for the management connection, and the actors of protocol/client are NOP functions. This supposed-to-be NOP function dispatch tabble is actually ending up pointing to the actor table of glusterfsd or gfapi. These functions, even though set wrongly, are not even expected to be called through the protocol/client callback path. Glusterd however sends the FETCHSPEC (and other) notify callbacks to *all* connected clients unconditionally, and there is a small period of time when protocol/client is connected to glusterd for PORTMAP query. If the FETCHSPEC callback notify is issued in this window of time, we end up calling the wrong actor in the client side resulting in a crash. Change-Id: I605ff7df64c7faf4607369bbf275aedec28e1778 BUG: 1004091 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5875 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: apply an upper bound on nested symlink resolutionAnand Avati2013-09-102-1/+13
| | | | | | | | | | | | | | In case of nested symlink resolution, implement an upper bound on the number of such nested levels the resolver will descend. This limit is arbitrary, and set to 2048 nested levels. Change-Id: I264e5bd60d317eda97f4e6f49bd5d8694f8664a9 BUG: 1004100 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5874 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: store the open/create flags in fd_t objectPoornima2013-09-102-2/+5
| | | | | | | | | | | | The flags passed on to open and create calls were not being saved in the fd_t object, hence the fd migration was failing. Change-Id: I486bb818477fe4c393d64a711534a082162a0e53 BUG: 1005159 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/5873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: assign layout onto missing directories tooAnand Avati2013-09-102-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | The current self-healing algorithm is ignoring missing directories for assigning new layout. When lookup() is racing against mkdir() or when self-healing a half-done mkdir(), the layout assignment split must happen based on the final number of directories, and not the currently existing number of directories (because we finish mkdir() of missing directories before hash layout assignment). Without this fix, concurrent mkdir() and lookup() will step on each others feet, create a messed up layout on disk, and end up with different in-memory layouts. Once two clients have different in-memory layouts, creation of subdirectory will not arbitrate on the same hashed subvolume and will result in GFID mismatch of the sub-directory. Change-Id: Ia47acad67c265060405984c822b4d37512b9dbb3 BUG: 907072 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5871 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* parser: make the parser thread safe.Anand Avati2013-09-101-7/+10
| | | | | | | | | | | | | | The volfile parser thread safe by guarding the parsing phase in a mutex. Thread safety becomes a problem when there are multiple glfs_t objects created by gfapi and all of them potentially parse the respective volfiles at the same time. Change-Id: I4376019c4956994b72397ab36e6ac3ce849797ec BUG: 1004519 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5872 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: increase the auxillary group limit to 65536Anand Avati2013-09-097-12/+79
| | | | | | | | | | | | Make the allocation of groups dynamic and increase the limit to 65536. Change-Id: I702364ff460e3a982e44ccbcb3e337cac9c2df51 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5172 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* doc: Update link in release notes.Vijay Bellur2013-09-091-1/+1
| | | | | | | | Change-Id: If00485b88611f9ce7ab37491000bf7f9e0c8df57 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5753 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* api: glusterfs-api.pc.in use rpath (-Wl,-R...) (backport BZ 1002220)Kaleb S. KEITHLEY2013-09-091-1/+1
| | | | | | | | | Change-Id: Ie36d7c3c058c2e738b0fb1ffae116ed43d573474 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 1004751 Reviewed-on: http://review.gluster.org/5822 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: call 'cleanup' at the end of each test (backport BZ 983975)Kaleb S. KEITHLEY2013-09-097-1/+12
| | | | | | | | | | | | | Some tests do not cleanup after themselves. That is bad behaviour and makes it difficult to run single tests and verify the state of the system afterwards. Change-Id: I5cf80a4a996c691e6b82fd9ce9c711951dc26138 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 1004756 Reviewed-on: http://review.gluster.org/5821 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* doc: Update bug for replace-brick problems.Vijay Bellur2013-09-091-1/+3
| | | | | | | | Change-Id: I372568d86fe1b043504dd189853e156b2e210b6e BUG: 825906 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5579 Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: fix potential use after free crashBrian Foster2013-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | do_iot_schedule() enqueues the stub and kicks the worker thread. The stub is eventually destroyed after it has been resumed and thus unsafe to access after being enqueued. Though likely difficult to reproduce in a real deployment, a crash is reproducible by running a smallfile benchmark on a replica 2 volume on a single vm. Reorder the debug log message prior to the do_iot_schedule() call to avoid the crash. BUG: 989579 Change-Id: Ifc6502c02ae455c959a90ff1ca62a690e31ceafb Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/5418 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5815 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* cli: check for null in is_server_debug_xlator()Ravishankar N2013-09-092-0/+38
| | | | | | | | | | | | | | | | | | | | Command: gluster volume set <volname> diagnostics.client-log-level trace Expected output: "volume set: failed: option log-level trace: 'trace' is not valid (possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE, TRACE.)" Current output: gluster cli receives a segmentation fault Fix: check for NULL before calling strstr Change-Id: If4c7a85a635849a388cf122543e12349c109643c BUG: 982174 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/5298 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5814 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* system/posix-acl: check for the sticky bit of the parent directoryRaghavendra Bhat2013-09-092-0/+55
| | | | | | | | | | | | | | | * While creating links, check if there is sticky bit set for the parent directory and whether the sticky bit permits the user to create the link. Change-Id: Ic0d09d9ed579c4eb47462c71602a3a60cc7d3bc1 BUG: 958691 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4934 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5813 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* posix-acl: disable permission checks for fd based opsshishir gowda2013-09-091-4/+4
| | | | | | | | | | | Signed-off-by: shishir gowda <sgowda@redhat.com> Change-Id: I9d49537c2c7b51d5598b80627d61f060aaec8549 BUG: 921437 Reviewed-on: http://review.gluster.org/4671 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5812 Reviewed-by: Anand Avati <avati@redhat.com>
* gluster/CLI: crash upon executing "peer status" commandSantosh Kumar Pradhan2013-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: While doing "gluster peer status", cli_cmd_peer_status_cbk() creates the frame and passes as arg to gf_cli_list_friends() which sets frame->local to GF_CLI_LIST_PEERS flag (value: 0x1). It expects gf_cli_list_friends_cbk() [invoked through cli_cmd_submit()] to reset frame->local to NULL. But if cli_cmd_submit() fails some where before gf_cli_list_friends_cbk() gets invoked, then the flag value remains in frame->local and causes a SEGV while destroying the stack i.e. [CLI_STACK_DESTROY => cli_local_wipe()]. Fix: In gf_cli_list_friends(), if cli_cmd_submit() fails, then reset the value of frame->local to NULL. Change-Id: Ied19f07eaf67e3bd42c75cdc2ff3729b0789e632 BUG: 961691 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/4976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5811 Reviewed-by: Anand Avati <avati@redhat.com>
* performance/open-behind: Fix fd-leaks in unlink, renamePranith Kumar K2013-09-092-0/+39
| | | | | | | | | | | Change-Id: Ia8d4bed7ccd316a83c397b53b9c1b1806024f83e BUG: 991622 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/5493 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5810 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* xlator: NULL terminate volume_options structSantosh Kumar Pradhan2013-09-092-5/+7
| | | | | | | | | | | | | | | | | | | Problem: volume_options struct for open-behind and quick-read xlators were not NULL terminated. Fix: Make them NULL terminated. Change-Id: I2615a1f15c6e5674030a219a99ddf91596bf346b BUG: 965995 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5064 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5809 Reviewed-by: Anand Avati <avati@redhat.com>
* open-behind: propagate errors from ob_wake_cbkAnand Avati2013-09-091-9/+25
| | | | | | | | | | | | | | | | If opening fd in background fails, then remember the error and fail all further calls on the fd. Use the newly introduced call_unwind_error() function from call-stub cleanup to fail the future calls. Change-Id: I3b09b7969c98d915abd56590a2777ce833b81813 BUG: 846240 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4521 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5808
* performance/open-behind: use anonymous fd for doing fstat and readvRaghavendra Bhat2013-09-093-2/+25
| | | | | | | | | | | Change-Id: I61a3c221e0a15736ab6315e2538c03dac27480a5 BUG: 846240 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4483 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5807 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* mount/fuse: perform lookup() on inodes linked through readdirplusAnand Avati2013-09-096-21/+80
| | | | | | | | | | | | | | | | Some xlators still require lookup() fop to be sent for proper working. This patch remembers inodes which have been linked through readdiprlus and makes the resolver send lookups on them. Also, introduce and use context count for inode table. Change-Id: Ibe8a04a659539d90dfc794521b51bf2bda017a0b BUG: 979910 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5267 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/5806
* glusterd.service (systemd), ensure glusterd starts early, (backport BZ 1004795)Kaleb S. KEITHLEY2013-09-091-0/+1
| | | | | | | | | | | | | | | | | | Try (emphasis on the try) to ensure that glusterd starts, and in turn starts glusterfsd before init attempt to mount any gluster (or gluster NFS) volumes in /etc/fstab. N.B. Joe Julian says this doesn't fix the problem for him, although it worked for me in kvm. Lennart Poettering says it should, and we should file a BZ against systemd if it doesn't. See https://lists.fedoraproject.org/pipermail/devel/2013-July/185870.html Change-Id: I6ac329b5130ba5615df570cf151e70d3618a8a63 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 1004796 Reviewed-on: http://review.gluster.org/5824 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>