summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
Commit message (Collapse)AuthorAgeFilesLines
* build warning fixesAmar Tumballi2009-06-301-2/+2
| | | | | | integer typecast warnings fixed Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client_xattrop: use dict_allocate_and_serialize during serializing xattrRaghavendra G2009-06-301-10/+7
| | | | | | | | - though the previous commit fixes bug #29, this patch fixes bugs arising in similar situations where xattrop is initiated by xlators other than afr. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client: Replace saved_fds dict with listShehjar Tikoo2009-06-302-158/+177
| | | | | | | | | | | Thhie change removes a huge inefficiency in file open path where every open resulted in dictionary operations in order to let the client maintain a list of fd_t's being used over a particular client context. Resolves: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=16 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfs: Turn fd-table O(1)Shehjar Tikoo2009-06-301-16/+16
| | | | | | | | | This commit reduces CPU usage of gf_fd_unused_get drastically by making it O(1) instead of O(n). Related to: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=16 Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Fix some trivial typos.Erick Tryzelaar2009-06-291-1/+1
| | | | | | | I noticed that there were some minor spelling mistakes/typos in some of the source files. This patch fixes the ones I've found. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* version check between client/server made more specific to protocol only.Amar Tumballi2009-06-292-9/+9
| | | | | | | | | This patch is a step towards giving compatibility between the versions of GlusterFS. Now onwards, the protocol-version won't depend on release versions. In general, multiple glusterfs versions can have common protocol-version. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* server-protocol: interpret the 'op' value properly when a packet is received.Amar Tumballi2009-06-231-4/+3
| | | | | | | | | Ref: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=35 The check done earlier was not handling the case when a 'op' is == MAX_VALUE (which is not defined), and used to skip to the next array (like gf_mops[MAX] == gf_cbks[0]) Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* check if the 'key' is the volume file name itself.Amar Tumballi2009-06-231-14/+34
| | | | | | | | With this patch, one can fetch any volumefile which is not pre-defined in volume file with 'option' in server protocol volume, instead clients can fetch the volume files based on the key name itself [From the confdir only] Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* server-helpers: cleanup connection only if there are no active transports.Raghavendra G2009-06-083-129/+194
| | | | | | | | | | | - thanks to Ioannis Aslanidis <iaslanidis@flumotion.com> for reporting. - breakup the server_connection_cleanup into smaller procedures. - do following operations in a single atomic operation. 1. conn->active_transports-- 2. collecting pointer to lock table and all fds if there are no active transports this will avoid any race conditions. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client-protocol: Fix memory corruption in client_lookupRaghavendra G2009-05-161-13/+7
| | | | | | | | - memory corruption was due to new members being added between allocation of buffer for serializing xattr_req dictionary and dict_serialize of xattr_req. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* protocol/client: indentation fixesAnand V. Avati2009-05-071-926/+737
|
* protocol/client: removed conf->childAnand V. Avati2009-05-072-603/+0
|
* transport shortcut b/w client and serverAnand V. Avati2009-05-072-0/+13
| | | | | | This patch makes the server pass back the transport pointer of the client. If the UUID matches, the client makes the local transport 'shortcut' with the remote transport (pointer received from server) The shortcut simulates a socket queue. Instead of serialized messages going over the network and getting queued in the tcp socket queue, the messages get queued in a transport specific queue picked by a polling thread.
* fix log message from transport-timeout to frame-timeoutAnand V. Avati2009-05-061-1/+1
|
* bug fix in server protocol segfault when the volume file key is NULLAmar Tumballi2009-04-301-0/+4
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* protocol/server indentation fixesAnand V. Avati2009-04-281-1532/+1048
|
* protocol/server log level fixesAnand V. Avati2009-04-281-117/+118
|
* protocol client log cleanupAnand V. Avati2009-04-282-31/+37
|
* Cleaned up log messages in client-protocol.Vikas Gorur2009-04-242-88/+97
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* rename transport-timeout to frame-timeout, and set default to 30mins2.0.0Anand V. Avati2009-04-242-16/+16
|
* 0-byte write guardAnand V. Avati2009-04-221-1/+2
| | | | | | guard server_writev from 0-byte writes from client where iobuf will be NULL. This is possible only via libglusterfsclient (not fuse) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fd leak fixAnand V. Avati2009-04-222-4/+7
| | | | | | | | | | | | | | steps: - server_finodelk uses req->volume pointer into state->volume - finodelk is queued by locks translator - c call returns from server_pollin and hdr is FREE'd - now state->volname is pointing to FREE'ed region (junk) - server_finodelk_cbk calls gf_add_locker - gf_add_locker remembers lock with junked path along with fd_ref - gf_del_locker from new server_finodelk cannot string match with junked volume thus lock is not deleted, hence fd_ref remains as a leak Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* client_protocol_reconnect - do not send notify of CHILD_DOWN event if errno ↵Anand V. Avati2009-04-201-1/+1
| | | | | | from transport_connect() was EINPROGRES This bug was racing between a CHILD_UP from poll thread resulting from the event_register() of the new socket called in fuse thread. CHILD_UP would sometimes overtake the CHILD_DOWN for EINPROGRESS. So replicate would receive CHILD_DOWN as the latest event. This resulted in self-heal not happening etc.
* Destroy old ping timer before setting new one.Vikas Gorur2009-04-171-1/+5
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* protocol/client - set remote inode number in inode context for root inode ↵Basavanagowda Kanur2009-04-171-23/+21
| | | | | | also, during lookup_cbk(). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* protocol/client - NULL check for loc->inode added in statfs(), before trying ↵Basavanagowda Kanur2009-04-171-8/+10
| | | | | | to retrieve remote inode number from loc->inode's context. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* logging enhances to commit d77279ef04ca75ab9715864274567d1ce0ce66a6Raghavendra G2009-04-162-11/+22
| | | | | | - logging made more relevent. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* eliminate this_ino_get(), this_ino_set(). handle inode_ctx_{get,set}() at ↵Basavanagowda Kanur2009-04-161-132/+290
| | | | | | | | | | the fop level itself. they used to log ambiguously and was of no use. logging is now more precise and will help in debugging, in case of errors. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* server-helpers: Add check for NULL connection arguement being passed in helpers.Raghavendra G2009-04-141-2/+23
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* client_readv_cbk - when op_ret is 0, iobuf comes NULL from transport, ↵Anand V. Avati2009-04-131-3/+5
| | | | | | handles this case Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* feature to disable volumefile's checksumAmar Tumballi2009-04-122-20/+47
| | | | | | | in server volume define, "option verify-volfile-checksum no" to disable the checksum feature. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update protocol/server with new readv writev prototypesAnand V. Avati2009-04-123-141/+118
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated protocol/client with new readv writev prototypesAnand V. Avati2009-04-123-125/+110
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* server-protocol - reimplement connection cleanup to happen in 2 phasesRaghavendra G2009-04-034-22/+206
| | | | | | | | | | | - first phase, which happens when POLLERR is received on transport, releases all locks, flushes all open fds. - second phase, which happens when both the transports of connection destroyed, destroys the containers like lock table, fd table along with the connection. - the first phase, clears up any references to transport held by translators like posix-locks(in the form of blocked locks) paving way for the second phase. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Enable glusterfs client to exit after a configured number of failed connects ↵Raghavendra G2009-04-011-1/+6
| | | | | | \ while fetching volume specification file from server Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add new type of option type INTERNET_ADDRESS for validationRaghavendra G2009-04-011-1/+1
| | | | | | | | - used to validate options like remote-host, bind-address. - Also validate options of translators created during fetch of volume specification file from remote server. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* memory leak (of header) when frame is attempted to be xfer'ed when transport ↵Anand V. Avati2009-03-281-0/+2
| | | | | | is disconnected Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* ping-pong timer: - share last_sent and last_received between channels so ↵Anand V. Avati2009-03-282-33/+29
| | | | | | that any activity ensures the remote host being alive (useful under heavy loads) - timer expiry disconnects both transports Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* when the both channels in client protocol is disconnected, fd's are marked ↵Amar Tumballi2009-03-211-35/+64
| | | | | | | | | as bad patch solves the problem of fds being valid even in the case of server disconnection, which causes operations on wrong fd when server comes back up. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add extra 'volume' parameter to inodelk/entrylk callsVikas Gorur2009-03-125-34/+91
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* ping timer will not timeout if we recently got POLLOUT on the socket i.e if ↵Krishna Srinivas2009-03-101-4/+4
| | | | | | ((cur - (sent|received)) < timeout) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* failover to any active transport when requested channel is not connectedAnand V. Avati2009-03-102-2/+30
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* added fgetxattr and fsetxattr FOPsVikas Gorur2009-03-072-1/+373
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Changed the default transport-timeout to 600Krishna Srinivas2009-03-051-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* create fuse thread after setvolume cbk happens, not only in case of successAmar Tumballi2009-03-031-13/+14
| | | | | | | | This patch fixes the 'hang' effect when client protocol fails to authenticate to servers (it may be problem with volume file, or server process would have not started yet). Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* volumefile modification awareness to make sure there are no inconsistencies.Amar Tumballi2009-02-273-88/+221
| | | | | | Complete (including feature to properly umount) in my sense. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-268-8/+8
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Ping timer does not timeout in case there is any activity (cbks) from the ↵Krishna Srinivas2009-02-252-8/+42
| | | | | | server side. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* per frame time out - i.e individual frames are unwound instead of the ↵Krishna Srinivas2009-02-253-41/+115
| | | | | | transport point itself being disconnected. timeout is configured using "transport-timeout". Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* default volume file option enhanced in server-protocolgAmar Tumballi2009-02-221-6/+11
| | | | | | Noticed that with current codebase, there is no proper method to have a default volume filename to choose in getspec() without printing a *lot* of warning messages. This patch tries to have a proper 'default' behavior. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>