summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
Commit message (Collapse)AuthorAgeFilesLines
* protocol/server: enhance trace loggingAnand Avati2009-11-293-85/+206
| | | | | | | | | | add logging of fop name, callid number and make logging more friendly Signed-off-by: Anand V. Avati <avati@blackhole.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
* protocol/server: fix improper validation of fd in server_rchecksumAnand Avati2009-11-281-6/+0
| | | | | | | | | | state->fd validation should be done _after_ resolve_and_resume() Signed-off-by: Anand V. Avati <avati@blackhole.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
* protocol/server: Introduce option trace to log requests and replies in ↵Pavan Sondur2009-11-264-6/+176
| | | | | | | | | | normal log. Signed-off-by: Pavan Vilas Sondur <pavan@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
* protocol/server: Get all fops to use the new 'resolve_and_resume' path in ↵Pavan Sondur2009-11-262-277/+299
| | | | | | | | | | server/protocol. Signed-off-by: Pavan Vilas Sondur <pavan@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
* 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
* protocol/server: Changed logging level of message on deep resolutionVijay Bellur2009-11-261-1/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@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
* 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/server: add debug messages.Raghavendra G2009-11-181-0/+12
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 369 (Samba does not work with booster.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=369
* 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/server: fix leak of xattrop dictionaryAnand Avati2009-10-291-1/+3
| | | | | | | 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
* protocol/server, mount/fuse: Handle returned inode in create properlyVikas Gorur2009-10-291-0/+19
| | | | | | | | | | | Check if linked_inode is different from returned inode in create, and if so, make the fd point to the correct inode. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 347 (Assertion failed: inode->ref) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=347
* 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/server: resolver fixesAnand Avati2009-10-281-5/+12
| | | | | | | | | | 1. do not set ENOENT for RESOLVE_MAY case 2. set op_ret to -1 and op_errno to EINVAL when request has neither of entry, inode or fd handles 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
* protocol/server: touchup loc only if inode/entry resolution was successfulAnand Avati2009-10-261-2/+4
| | | | | | | 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
* protocol/server: fix assignment of inode number in server_readlinkAnand Avati2009-10-261-1/+1
| | | | | | | 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
* protocol/server: deep resolution supportAnand Avati2009-10-233-59/+188
| | | | | | | | | | | | | | when requested ino/gen is not available in the inode table cache, then use the path presented by the client to lookup entries with the hope that the requested ino/gen gets populated into the cache. re-perform regular search after finishing the deep component lookup 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
* protocol/server: send fresh lookups on revalidate failuresAnand Avati2009-10-231-1/+23
| | | | | | | | | also unlink non existent dentries in lookup_cbk 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
* whitespace fixesAnand Avati2009-10-231-3105/+3105
| | | | | | | 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
* protocol/server: generation number and dentry resolutionAnand Avati2009-10-207-3028/+1680
| | | | | | | | | | - handle generation number in protocol - rewrite server dentry resolution code for inode cache miss 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
* 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-132-3/+6
| | | | | | | | | 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
* protocol/server: Set preparent and postparent in the response struct.Vikas Gorur2009-10-121-1/+17
| | | | | | | 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
* 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-078-8/+8
| | | | 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
* server: Support readdirp fopShehjar Tikoo2009-10-061-0/+109
| | | | | | | 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
* 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