summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
Commit message (Collapse)AuthorAgeFilesLines
* protocol/server: use properly filled loc_t for performing revalidatesAnand Avati2010-01-231-4/+2
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 567 (crash in server_lookup_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=567
* fail revalidate properlyAnand Avati2009-10-091-1/+4
| | | | | | | | | | | fail revalidate calls if inoode number has changed for the basename at the server side. This is a temporary workaround for most of the cases till inode-gen is merged Avati Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-078-8/+8
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client: access glusterfs context from the ctx member of xlator objectRaghavendra G2009-09-221-1/+1
| | | | | | | | | | - A global context pointer cannot be used with libglusterfsclient, since there can be many contexts in a single process. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 271 (applications using booster protocol/client crash in client_setvolume_cbk.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=271
* client-protocol: fix race-condition encountered while accessing fdctxRaghavendra G2009-09-221-47/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In protocol/client, fdctx is accessed by two sets of procedures, protocol_client_mark_fd_bad falls in one set whereas the other set consists of all fops which receive fd as an argument. The way these fdctxs are got is different in these two sets. While in the former set, fdctx is accessed through conf->saved_fds, which is a list of fdctxs of fds representing opened/created files. In the latter set, fdctxs are got directly from fd through fd_ctx_get(). Now there can be race conditions between two threads executing one procedure from these two sets. As an example let us consider following scenario: A flush operation is timed out and polling thread executing protocol_client_mark_fd_bad, fuse thread executing client_release. This can happen because, immediately a reply for flush is written to fuse, a release on the same fd can be sent to glusterfs and the polling thread still might be doing cleanup. Consider following set of events: 1. fuse thread does fd_ctx_get (fd). 2. polling thread gets the same fdctx but through conf->saved_fds. 3. Now both threads go ahead and does list_del (fdctx) and eventually free fdctx. In other situations the same set events might occur and the threads executing fops other than flush in the second set might be accessing a fdctx freed in protocol_client_mark_fd_bad. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 127 (race-condition in accessing fdctx in protocol/client) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=127
* protocol/server: server_stub_resume should check for failure of lookup when ↵Raghavendra G2009-09-131-1/+2
| | | | | | | | | oldloc.parent is NULL. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 215 (crash on ib-verbs in 2.0.6-rc4) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=215
* protocol/client: 'connecting' event is properly notified.Amar Tumballi2009-08-202-4/+23
| | | | | | | | | | | when there are no servers available to client, and transport init is not successful, send 'connecting' event once to parent so it doesn't hand in there. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 224 (Client hangs if none of the servers are up) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=224
* in server_rename if we do_path_lookup on the newloc and parent directory is ↵Krishna Srinivas2009-08-191-24/+28
| | | | | | not found, the server crashes. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* added log message when server fails to send the reply frameAmar Tumballi2009-08-171-4/+8
| | | | | | | | | | | | | As of now, if a frame submit fails on server, there are no logs, and clients will have missing frames (which leads to 'hangs'). Supporting situation like this very tricky without proper log messages. As a step to make our log message lean and meaningful, this log is important. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 190 (missing frames due to larger reply message size.. (ib-verbs)) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=190
* protocol/client: fixed registration of saved_fdsAnand Avati2009-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In client_open_cbk, client_opendir_cbk the list_add_tail macros were invoked with wrong ordered arguments, causing the existing registered fd list to get unlinked from the saved_fds list. The effects of this is far fetched - when transport disconnects, open fds are no more marked bad as they are not reachable from the saved_fds list. After reconnection, resumed access on this fd causes reference to invalid fds on the server. It could appear in the form of 'unresolved fd' error, readdir happening on a file fd, files reading from other files, etc. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 192 (sefault in posix-readdir) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=192 BUG: 126 (Immediate segfault when used for rootfs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=126 BUG: 173 ([ glusterfs 2.0.6rc1 ] - "server SEG fault") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=173 BUG: 194 (Apache+Booster results in inconsistent download size using wget) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=194
* server-lookup: added path info from header to log messageAmar Tumballi2009-08-041-3/+4
| | | | | | | | | | | | in the previous commit, the path info was removed to prevent the segfault, which instead could have been provided from request header directly. More specific information is required for debugging, and hence adding the path log. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 189 (segfault in server-lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=189
* logging related bug fix in server_lookup()Amar Tumballi2009-08-041-4/+3
| | | | | | | | | | | | When 'dict_unserialize' failed, the log message was trying to print 'state->loc.path' and 'state->ino', which gets filled in later stages in flow. Caused segmentation fault when there was a failure. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 189 (segfault in server-lookup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=189
* server-protocol: fix in server-loc-fill()Amar Tumballi2009-07-281-3/+0
| | | | | | | | | | | | to continue with 'hashed' inode, even if inode_path() on the inode fails. This will is needed for few lock operations, to unlock the lock held on inode. (ie, it fixes 'rm -rf *' hang issue, seen from multiple clients). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* protocol/server: add checks for updatation of loc->parent in entrylk() or ↵Basavanagowda Kanur2009-07-271-3/+6
| | | | | | | | | | | | | inodelk(). entrylk() and inodelk() should try to update loc->parent only if parent is not-NULL. because it is not an error to have loc->parent == NULL for entrylk() and inodelk() operations. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 162 (Replication segfaults with many nodes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=162
* server: don't check for 'loc->parent' in entrylk and inodelk callsAmar Tumballi2009-07-171-4/+2
| | | | | | | | | | | | the lock operation on entry or inode is going to happen on only one inode, and it doesn't need dentry (with info on parent) for the lock operation to complete. Hence, in server_{inode,entry}lk() calls after server_loc_fill, we -should not- be checking for parent inode. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* protocol/server: use translated flags in protocol/server open and create fopsAnand Avati2009-07-071-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client: use translated flags in protocol/client open and create fopsAnand Avati2009-07-071-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* 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>