summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
Commit message (Collapse)AuthorAgeFilesLines
* add an extra check for loc->parent when loc->ino is not 1Amar Tumballi2009-11-261-1/+1
| | | | | | | | | | | | This extra check is needed only in case where setup is "server -> chain -> client", where for the root inode, inode->ino is not updated in the first lookup call, hence used to crash. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 377 (segfault in protocol/client with chaining) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=377
* changed the log level of failure case in client_setvolume_cbkAmar Tumballi2009-11-261-1/+1
| | | | | | | | | | | It *should* be an error when a handshake fails. Its hard to debug it otherwise Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 26 (Version mismatch not handled correctly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=26
* Added boundaries for each fops, mops and cbks.Harshavardhana Ranganath2009-11-261-6/+7
| | | | | | | | Signed-off-by: Harshavardhana <harsha@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 366 (Infinite loop with centralized logging.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=366
* protocol/client: Make log message print both generation number and inode number.Vikas Gorur2009-11-251-4/+6
| | | | | | | | Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* Check for other return values as well from call to inode_path.Pavan Sondur2009-11-191-2/+2
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* protocol/client: Changed default ping-timeout to 42Vijay Bellur2009-11-191-2/+2
| | | | | | | | | | | | | This change is necessary to avoid frequent disconnections between client and server under load. A disconnect-connect sequence is costly in terms of clean up and re-building of context, self-heals etc. This value should be optimal for most use cases. Users requiring a lower ping-timeout value need to configure it explicitly. Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 384 (Increase default timeout in client protocol) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=384
* protocol/client: preserve open/create flags in fdctx for reopeningAnand Avati2009-11-132-0/+8
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* protoocl/client: file directory reopen supportAnand Avati2009-11-132-117/+631
| | | | | | | | | | | | reopen files and directories which were open before a disconnection after reconnecting. operations on files/directories which could not be opened continue to return EBADFD Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* protocol/client: whitespace cleanupAnand Avati2009-11-132-3631/+3631
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
* protocol/client: Support for TCP_NODELAYVijay Bellur2009-10-291-0/+4
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 344 (Add support for TCP NODELAY in master) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=344
* protocol/client: incoroporate generation numbersAnand Avati2009-10-181-52/+105
| | | | | | | | | | protocol/client uses the new inode_ctx_{get,put}2 API to store both inode and generation number in context Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* posix/client/server: Send postparent in lookup even if lookup fails on the ↵Vikas Gorur2009-10-131-2/+3
| | | | | | | | | entry itself. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* assign client_readdirp to .readdirp in protocol/client & fix 2 other bugs in ↵Pavan Sondur2009-10-071-0/+1
| | | | | | | | | call_stub Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 305 (Readdirp crashes in client protocol) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=305
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-074-4/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* client: Support readdirp fopShehjar Tikoo2009-10-061-0/+91
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* client: NFS-friendly logic changesShehjar Tikoo2009-10-011-22/+93
| | | | | | | 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-011-4/+5
| | | | | | | 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-011-431/+150
| | | | | | | 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/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
* 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/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
* 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
* 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
* 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/client - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-1/+1
| | | | 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-291-5/+5
| | | | | | | | | 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>
* 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>
* Implemented LOG MOP in client-protocol.Vikas Gorur2009-06-111-0/+61
| | | | 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-071-0/+10
| | | | | | 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
|
* 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
|
* 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>
* 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>
* 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>