summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* glusterd: synctaskize 'volume create' operationKrutika Dhananjay2013-02-062-42/+52
| | | | | | | | | | | | .. and also move brickpath validation to volume create stage Change-Id: Ia028677932ca5f6aa05dcf624f47033b62e7b212 BUG: 862834 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4213 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: get hostnames of client to allow FQDN based authenticationRajesh Amaravathi2013-02-064-0/+96
| | | | | | | | | | | | | | If FQDNs are used to authenticate clients, then from this commit forth, the client ip(v4,6) is reverse looked up using getnameinfo to get a hostname associated with it, if any, thereby making FQDN-based rpc authentication possible. Change-Id: I4c5241e7079a2560de79ca15f611e65c0b858f9b BUG: 903553 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4439 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: use req's uid and gid for open_and_resumeRajesh Amaravathi2013-02-062-9/+4
| | | | | | | | | | | | | | | | Previously, NLM was setting the frame->root->{uid,gid} to root by default. This causes permission problems with root squashing for lock calls. Now, we obtain the uid and gid from rpc request. And duplicate #defines are removed from rpcsvc.h Change-Id: I5d6c87aed8d04aab2619bb913408048c0a02d1e7 BUG: 906884 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4466 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* open-behind: translator to perform open calls in backgroundAnand Avati2013-02-068-1/+1006
| | | | | | | | | | | | | | | | | | | | This is functionality peeled out of quick-read into a separate translator. Fops which modify the file (where it is required to perform the operation on the true fd) will trigger and wait for the backend open to succeed and use that fd. Fops like fstat() readv() etc. will use anonymous FD (configurable) when original fd is unopened at the backend. Change-Id: Id9847fdbfdc82c1c8e956339156b6572539c1876 BUG: 846240 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4406 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* rpcsvc/dump: return correct return valueRaghavendra G2013-02-061-0/+1
| | | | | | | | | | | | | fix e8d09b9ab9 resulted in rpcsvc_dump returning large non-zero values to caller in case of success. This patch fixes that issue by returning 0 Change-Id: I594703dada74da17b33c98b073627a3378d170c5 BUG: 903113 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4477 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs/core: dump frame and callstack creation times in statedumpRaghavendra Bhat2013-02-064-85/+202
| | | | | | | | | Change-Id: I3772602ac264cbca490d77a0343038297faee7df BUG: 844688 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4087 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Use client-op-versions during "volume set"Kaushal M2013-02-063-2/+64
| | | | | | | | | | | | | | | The supported op-versions of the client and the name of the requested volume, are saved during server_getspec(). These are used during the staging of volume set. If the option being set is not supported by any of the clients which currently have the volume mounted, then set will fail. Change-Id: I4e6b60b274d5200508762dc0204cfa848a6c0aa4 BUG: 907311 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4424 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd,glusterfsd,libgfapi: Client op-versionKaushal M2013-02-065-21/+167
| | | | | | | | | | | | | | | This patch introduces op-version support for glusterfs clients. Now, a client sends its supported op-versions during the volfile fetch request and glusterd will return the volfile only if the client can support the current op-version of the cluster. Change-Id: Iab1f1f1706802962bcf27058657c44e8a344d2f6 BUG: 907311 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4247 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Test the open-fd count for a file on brickPranith Kumar K2013-02-061-0/+38
| | | | | | | | | Change-Id: I59bc4974eff93e92c4f7041d3722ac60e88b0734 BUG: 908146 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4471 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Added function to generate brick statedumpPranith Kumar K2013-02-061-14/+21
| | | | | | | | | Change-Id: I5f394a028a3251ec673c8787b2c67691a8b57449 BUG: 908146 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4470 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Fix open-fd-count virtual xattrPranith Kumar K2013-02-061-8/+3
| | | | | | | | | | | Send open-fd-count maintained in inode. Change-Id: I23db5d052bdeb4f67978ff618ed5a0bed7d1592d BUG: 908146 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4469 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: Maintain open-fd-count in inode.Pranith Kumar K2013-02-063-0/+8
| | | | | | | | | Change-Id: I643d02959f92e40f68a53baf165753ed20f8b3e0 BUG: 908146 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4468 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Avoid priv->eager_lock value update racePranith Kumar K2013-02-064-4/+6
| | | | | | | | | | Change-Id: I7049c0c64e36a9dfa4cc0e0b34de7ec111d2f6c1 BUG: 908302 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4076 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 wakeup just before fopPranith Kumar K2013-02-062-13/+21
| | | | | | | | | | | | | | | There is no necessity for the delayed-post-op to wait until the next fop phase on the fd completes. Change-log, locks are inherited by the time next fop phase is attempted so the wakeup can happen just before the fop phase is started. Change-Id: I0b8e591f591b0f7565eb55265ab51f476ed2b165 BUG: 908302 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4073 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse(efence): zero sized memory was being allocated.v3.4.0alphaAnand Avati2013-02-051-0/+5
| | | | | | | | | | | | | For the last call of getdents(), gf_malloc called with 0 size, which is then caught by efence. BUG: 782760 Change-Id: If289029117a62ecfcecc70480e5ac8f0e050487d Signed-off-by: Anand Avati <avati@redhat.com> Original-author: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3846 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* rpcsvc: Fix memory corruption caused by rpcsvc_dump returning non-zeroRaghavendra G2013-02-051-10/+8
| | | | | | | | | | | | | | | | | | | | The convention followed is that any actor should return non-zero value only if it has not attempted to send the reply back. If an actor returns non-zero, rpcsvc_handle_rpc_call tries to send an error reply. Since, rpcsvc_submit_generic frees the rpc_req, its wrong to invoke it more than once on same rpc_req. When the transport is not connected, rpcsvc_dump used to pass the non-zero value it got from transport to rpcsvc resulting in memory corruption. Hence this patch makes rpcsvc_dump to return 0. Change-Id: I1b6f28969ee546c44d193d3d33debccb65585b69 BUG: 903113 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* protocol/client: Avoid double free of framePranith Kumar K2013-02-041-2/+1
| | | | | | | | | | | | | | | When client_submit_request fails it calls cbk. The cleanups should happen only in cbk. The code committed as part of http://review.gluster.org/4357 violates this. Also found that clnt_release_reopen_fd violates this as well. This patch fixes these issue. Change-Id: Ic02ba278724b03c65c00b686c39fd7846122618a BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: remove extra call to glusterd_volume_compute_cksum()Krutika Dhananjay2013-02-041-6/+0
| | | | | | | | | | | | | In the commit phase of volume create, checksum on volinfo is computed twice - once in the call to glusterd_store_volinfo() and once, further down, in the same function glusterd_op_create_volume(). Change-Id: I36f9426943cd48937d4946b4b4ef09f19f31d888 BUG: 812356 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4463 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: log changes in volume create and delete codepathKrutika Dhananjay2013-02-044-152/+215
| | | | | | | | | | | | | | | | | | | | Making log changes involving two commands as they both share sections of code (like the part where the volume metadata is cleaned up in vol delete in case of success; and in vol create in case of failure). * Most of the changes are of the 's/THIS/this' kind. * Changed some of the log messages to give as much information as available in case of failure. * Changed log levels in some of the log messages. Change-Id: I10242511fe9400a07ab04717464d748d9172dd85 BUG: 812356 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4462 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* group-virt: Change profile to include remote-dio and exclude posix-aio.Vijay Bellur2013-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | remote-dio enables filtering O_DIRECT in the client xlator. This has been found to be useful for improving performance when there are multiple VMs talking to an image store. Aggregated throughput results for a single thread iozone run from multiple VMs and a single host can be seen below: ------------------------------------------------- No. of VMs | remote-dio on | remote-dio off | ------------------------------------------------- 2 | 400 MB/s | 202 MB/s | 4 | 650 MB/s | 410 MB/s | -------------------------------------------------- posix-aio has not been found to improve performance consistently with VM image workload. Hence not including that in the default virt profile. Change-Id: I592f68b95a955036f1a985352d2f4950ced1deef BUG: 907301 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4460 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* glusterd: "volume heal info" doesn't report output properlyVenkatesh Somyajulu2013-02-044-33/+134
| | | | | | | | | | | | Problem: "volume heal info" doesn't reports files to be healed when gluster* processes on one of the storage node is not running Change-Id: Iff7d41407014624e4da9b70d710039ac14b48291 BUG: 880898 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4371 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: Separate log file directory for Mountbroker sessionsVenky Shankar2013-02-042-1/+33
| | | | | | | | | | | | | | | | | | | | | ... so that a mountbroker session which is initiated b/w master and slave does not use the same log file if it's started after a normal geo-rep session b/w master and slave. This results in EPERM as the log file is owned by root and the geo-rep slave process (now running as a non privileged user) does not have access to it. Also, having separate log file directory for mountbroker sessions looks clean. NOTE: geo-rep's client mount log file location remains unchanged. Change-Id: Ic7a732e250aee5393b9c3f6ebf6dfe2c310b7fe4 BUG: 893960 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/4407 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Indexed node information in dict to retain consistency.Avra Sengupta2013-02-041-39/+55
| | | | | | | | | | | | | | | | | | | | | | Problem: -------- Depending on the response time from different nodes, the response dict for rebalance status was populated in a FIFO manner, and hence the output for the CLI was never consistent. Fix: ---- Irrespective of the response time of the nodes, we now index the entries in the response dict for rebalance status, in reference to the peerlist. So, the order of the entries and hence the CLI output is always consistent. Change-Id: Ica7e89e5d95aa9860a6f3c7eff58ca2052e05bd6 BUG: 888390 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4416 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Made changes to verify if any of the bricks crashedKrishnan Parthasarathi2013-02-042-0/+8
| | | | | | | | | | | Change-Id: I9da3b8a490159b1090a803b74d0058be0d884c94 BUG: 905864 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4461 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <raghavendra@gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* object-storage: yield during directory tree walksPeter Portante2013-02-041-10/+15
| | | | | | | | | | | | | | | | | | | Have the co-routine (greenlet) yield during long running directory tree walks to avoid starving out other greenlets that might be available to run. A directory walk involves statting every file in the tree to get it size. For large numbers of files, this can get expensive. So we yield after every stat call, and after processing every directory. Change-Id: I07f1dfeef6a09b5817e0c237ecc748c491d52a31 BUG: 894674 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4380 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Mohammed Junaid <junaid@redhat.com>
* cluster/dht: Correct min_free_disk behaviourRaghavendra Talur2013-02-044-27/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Files were being created in subvol which had less than min_free_disk available even in the cases where other subvols with more space were available. Solution: Changed the logic to look for subvol which has more space available. In cases where all the subvols have lesser than Min_free_disk available , the one with max space and atleast one inode is available. Known Issue: Cannot ensure that first file that is created right after min-free-value is crossed on a brick will get created in other brick because disk usage stat takes some time to update in glusterprocess. Will fix that as part of another bug. Change-Id: If3ae0bf5a44f8739ce35b3ee3f191009ddd44455 BUG: 858488 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/4420 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/stripe: Mount issues with Stripe xlatorVarun Shastry2013-02-033-20/+46
| | | | | | | | | | | | | | | | | | | Problem: * 'CONNECTING' is taken as CHILD_UP. * Sending notifications (default_notify()) for all the events individually while mounting. Solution: * Consider Child up only after the event CHILD_UP is received. * Send a single notification for all the children's events only while mounting. Change-Id: I1b7de127e12f5bfb8f80702dbdce02019e138bc8 BUG: 885072 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4356 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/server: upon server_connection_put, set xl_private of the transport toRaghavendra Bhat2013-02-031-2/+10
| | | | | | | | | | | | | | | | | NULL Suppose the get_xlator_by_name returns NULL and the connection is put back then update the xl_private of the transport by setting to NULL. Otherwise server_connection_put would have freed the connection object and xl_private of the transport would still be pointing to the same location which is freed, thus leading to a segfault when the location is accessed. Change-Id: Id47e0edde3073b09765338c730847ba3095df9e2 BUG: 901457 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4411 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: do not try to take LOCK in forgetRaghavendra Bhat2013-02-031-7/+3
| | | | | | | | | | | LOCK attempt in wb_forget is unnecessary Change-Id: Ibdedc23d0c829c34aedd6fc5bc0e0a584b832514 BUG: 903566 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4423 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: do dict unref after sending reply to cliKrutika Dhananjay2013-02-0311-49/+5
| | | | | | | | | | | | | | | | | This patch channelizes dict unrefs of dictionaries created from the cli req during volume ops to one common function - glusterd_to_cli() - which is guaranteed to be called irrespective of whether the command succeeds or fails. This patch also removes extra unrefs at a few places. Change-Id: Ic8ba7166387b5dfd1f5ae860539e1b7093a94662 BUG: 861044 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4003 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* locks: Protected racy (read) access of ext_listKrishnan Parthasarathi2013-02-033-10/+129
| | | | | | | | | | Change-Id: Ibf639695ebd99c11c6960c9be82c0cee71b50744 BUG: 905864 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4458 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: Fixed regexp matcher for existing mount pointsKrishnan Parthasarathi2013-02-031-1/+1
| | | | | | | | | | Change-Id: I58d237a3d2f4caa7f3865c2e4899c472f7457450 BUG: 906887 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4457 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: ignore EEXIST error in mkdir to avoid GFID mismatchAnand Avati2013-02-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In dht_mkdir_cbk, EEXIST error is treated like a true error. Because of this the following sequence of events can happen, eventually resulting in GFID mismatch and (and possibly leaked locks and hang, in the presence of replicate.) The issue exists when many clients concurrently attempt creation of directory and subdirectory (e.g mkdir -p /mnt/gluster/dir1/subdir) 0. First mkdir happens by one client on the hashed subvolume. Only one client wins the race. Others racing mkdirs get EEXIST. Yet other "laggers" in the race encounter the just-created directory in lookup() on the hash dir. 1. At least one "lagger" lookup() notices that there are missing directories on other subvolumes (which the "winner" mkdir is yet to create), and starts off self-heal of the directory. 2. At least on some subvolumes, self-heal's mkdir wins the race against the "winner" mkdir and creates the directory first. This causes the "winner" mkdir to experience EEXIST error on those subvolumes. 3. On other subvolumes where "winner" mkdir won the race, self-heal experiences EEXIST error, but self-heal is properly translating that into a success (but mkdir code path is not -- which is the bug.) 4. Both mkdir and self-heal assign hash layouts to the just created directory. But self-heal distributes hash range across N (total) subvolumes, whereas mkdir distributes hash range across N - M (where M is the number of subvolumes where mkdir lost the race). Both the clients "cache" their respective layouts in the near future for all future creates inside them (evidence in logs) 5. During the creation of the subdirectory, two clients race again. Ideally winner performs mkdir() on the hashed subvolume and proceeds to create other dirs, loser experiences EEXIST error on the hashed subvolume and backs off. But in this case, because the two clients have different layout views of the parent directory (because of different hash splits and assignements), the hashed subvolumes for the new directory can end up being different. Therefore, both clients now win the race (they were never fighting against each other on a common server), assigning different GFIDs to the directory on their respective (different) subvolumes. Some of the remaining subvolumes get GFID1, others GFID2. Conclusion/Fix: Making mkdir translate EEXIST error as success (just the way self-heal is already rightly doing) will bring back truth to the design claim that concurrent mkdir/self-heals perform deterministic + idempotent operations. This will prevent the differing "hash views" by different clients and thereby also avoid GFID mismatch by forcing all clients to have a "fair race", because the hashed subvolume for all will be the same (and thereby avoiding leaked locks and hangs.) Change-Id: I84592fb9b8a3f739a07e2afb23b33758a0a9a157 BUG: 907072 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4459 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* gfapi: Mark fs->init status done in glfs_init_done for the case of ↵Mohammed Junaid2013-02-031-4/+15
| | | | | | | | | | | | | | | | glfs_init_async. This seen when we call glfs_init_async. The glfs_init_done function, calls the call-back function without assigning 1 to fs->init. The problem occurs when we call glfs_read or a similar api next time which checks if fs->init is 1 and will enter into an infinite wait if it is zero. Change-Id: I34a3d1652c80e737f5b05082a3fbb6e5978b14cd BUG: 839950 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.org/4445 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* socket: restructure disconnect/poll-thread interactionsJeff Darcy2013-02-032-38/+102
| | | | | | | | | Change-Id: I792c28f52068e4ed666069b740739662685160bc BUG: 906401 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4456 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: identify local address by searching network interfaces.Jeff Darcy2013-02-031-19/+78
| | | | | | | | | | | | | | using bind(3) to identify local address fails when net.ipv4.ip_nonlocal_bind (i.e, /proc/sys/net/ipv4/ip_nonlocal_bind) is set to 1. Change-Id: I7047b6fb94ef0df10b78673fab34dbd169344fec BUG: 890587 Original-author: JulesWang <w.jq0722@gmail.com> Signed-off-by: JulesWang <w.jq0722@gmail.com> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4437 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Made volume-status use synctask frameworkKrishnan Parthasarathi2013-02-035-44/+65
| | | | | | | | | Change-Id: Id4062799104e5831467ced65a43bfe377b6163f4 BUG: 852147 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4297 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Added syncop version of BRICK_OPKrishnan Parthasarathi2013-02-031-28/+242
| | | | | | | | | | | | - Made rsp dict available to all glusterd's STAGE/BRICK/COMMIT OP. Change-Id: I5d825d0670d0f1aa8a0603f2307b3600ff6ccfe4 BUG: 852147 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4296 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Moved node rsp functions to glusterd-utils.cKrishnan Parthasarathi2013-02-035-385/+410
| | | | | | | | | | Change-Id: Ib4c4794563a5a694fab16f17c642f788399462f6 BUG: 852147 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4295 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Removed start-unlock event injection in 'synctask' codepathKrishnan Parthasarathi2013-02-032-22/+46
| | | | | | | | | | Change-Id: I87e02c95d0b650dab7f9ee86c96b2e09ada50109 BUG: 862834 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4118 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: added logging of changelog for split-brain in glustershd.log fileVenkatesh Somyajula2013-02-034-10/+68
| | | | | | | | | | Change-Id: Iaf119f839cb2113b8f8efb7bf7636d471b6541bf BUG: 866440 Signed-off-by: Venkatesh Somyajula <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4385 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* test: Removed "for" loop of check_xattr function.Venkatesh Somyajulu2013-02-031-26/+36
| | | | | | | | | | Change-Id: I902a5f86d72df3efb45dba09eaa2e8be8b65edf6 BUG: 802417 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4435 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Tests: util to check if replace brick completedPranith Kumar K2013-02-031-0/+14
| | | | | | | | | Change-Id: I7748395395454765a35e34611d11f58dd4ef3efb BUG: 857549 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4450 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* Tests: Basic pump test casePranith Kumar K2013-02-031-0/+44
| | | | | | | | | Change-Id: I94666debd5ec271ce5404a77efc421c12928e134 BUG: 857549 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4451 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* test: test re-opens of open-fdsPranith Kumar K2013-02-031-0/+48
| | | | | | | | | Change-Id: Ic99c7f3cf1f6a381b0fc1b2ca1acc19f5fe75523 BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4387 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Added util functionsPranith Kumar K2013-02-031-6/+50
| | | | | | | | | | | | | Added functions to extract gfid, gfid-str function to check if a file is open deleting gfid-link of a file Change-Id: If2f39f43a6631cddb68b4ba7febcd3cf66f399ee BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4386 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: Periodically attempt reopensPranith Kumar K2013-02-036-93/+265
| | | | | | | | | | | | | | | | | | | | | | If the brick is taken down and the hard disk is replaced and the brick is brought back up, the re-opens of the open-fds will fail because the file is not present on the brick. Re-opens are not attempted even if the files are re-created by self-heal until the brick is brought down after the files are re-created and brought back up. This is a problem with a VM-store in a replica-setup. Until the fd is re-opened the writes will never happen on the brick where the hard-disk is replaced. To handle this situation gracefully, client xlator is enhanced to perform finodelk, fxattrop, writev, readv using anonymous fds if the file is yet to be re-opened. If the fop succeeds then client xlator attempts re-open. Change-Id: I1cc6d1bbf8227cd996868ab2ed0a57fb05e00017 BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4358 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* protocol/client: Add fdctx back to saved-list after reopenPranith Kumar K2013-02-034-451/+76
| | | | | | | | | Change-Id: I01caa1b51570359e6e3ffe1ffb7279cbdb0b0c64 BUG: 821056 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4357 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/dht: stack wind with cookiev3.4.0qa8Varun Shastry2013-01-314-29/+79
| | | | | | | | | | | | | | | Default_fops uses stack_wind_tail. It winds without creating the frame leading into wrong subvol return in the cookie. To avoid the problem caused by the same, we're getting the subvol by passing the cookie. Change-Id: I51ee79b22c89e4fb0b89e9a0bc3ac96c5b469f8f BUG: 893338 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4388 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* fuse-bridge: fix some breakages from lock migration patchAnand Avati2013-01-304-24/+31
| | | | | | | | | | | | | | | | | | | | | - do not attempt lock migration if no locks were ever acquired on an fd. - fix fd_lk_ctx_t ref leak during fd migration - remove spurious fd_unref() (probably added to compensate for the fd_ref leak in syncop_open_cbk) - remove @newfdptr out-param which makes fd ref management really tricky (and currently refs were unmanaged for the out-param). Instead acquire ref and unref within lock migration function. Change-Id: I4cc9c451f0df4c051612bd1fa7bef11e801570e4 BUG: 808400 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4453 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>