summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
Commit message (Collapse)AuthorAgeFilesLines
...
* server: NFS-friendly logic changesShehjar Tikoo2009-10-011-1/+19
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-013-44/+73
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: Introduce setattr and fsetattr fopsShehjar Tikoo2009-10-013-1012/+404
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* protocol/server: Implement rchecksum.Vikas Gorur2009-09-221-1/+80
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client: Implement rchecksum.Vikas Gorur2009-09-221-0/+71
| | | | 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
* Dumop inodectx addedVijay Bellur2009-09-161-1/+27
| | | | | | | | | | Added dumpop inodectx. Support for dumop inodectx added in dht, locks and client-protocol. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* Changed prototype for inode_table_dump() and inode_dump().Vijay Bellur2009-09-161-1/+39
| | | | | | | | | | Changed prototype for inode_table_dump() and inode_dump() Added support for dumpop inode in mount/fuse and protocol/server Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* protocol/client: Support for dumpop priv.Vijay Bellur2009-09-161-0/+56
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* 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>
* TAKE2[PATCH BUG:213 1/1] Support for Process State DumpVijay Bellur2009-08-191-0/+81
| | | | | | | | | Support for process state dump. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* 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
* fix build warnings in 'server-protocol'Amar Tumballi2009-07-202-26/+47
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 130 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=130
* fix build warnings in 'client-protocol'Amar Tumballi2009-07-201-7/+19
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 130 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=130
* server: don't check for 'loc->parent' in entrylk and inodelk callsAmar Tumballi2009-07-161-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>
* protocol/server - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-7/+7
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* protocol/client - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* server protocol forget cleanupAmar Tumballi2009-07-011-71/+4
| | | | | | | | | as client now doesn't send forget at all to server, it should take care of forgetting the inode when there is a successful unlink and rmdir fops. also cleaned up unwanted forget fop's code. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* cleanup client_forgetAmar Tumballi2009-07-012-179/+2
| | | | | | | | | | | upon detailed inspection of 'forget' behavior, it became evident that forgets from client should not goto server side, as server keeps its own purging mechanism to forget its inodes. if client sends all forget to server, many highly used required inodes may get freed up (it will surely effect io-cache buffers on server side) 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>
* 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>
* client: Replace saved_fds dict with listShehjar Tikoo2009-06-152-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-151-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>
* Implemented LOG MOP in server-protocol.Vikas Gorur2009-06-111-0/+28
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Implemented LOG MOP in client-protocol.Vikas Gorur2009-06-111-0/+61
| | | | 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>
* THIS: protocol/client now uses xlator_notify for setting THISAnand V. Avati2009-05-221-12/+9
| | | | 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>