summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* booster: Fix build warningsShehjar Tikoo2009-09-221-14/+15
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 275 (libglusterfsclient: Generic build failure bug for libglusterfsclient and booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=275
* performance/quick-read: refine logic of qr_readv.Raghavendra G2009-09-221-3/+14
| | | | | | | | | | - An extra vector was being allocated when the number of bytes being read from cache were equal to the iobuf size. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 274 (Memory corruption in Apache running on booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=274
* performance/quick-read: optimizations to lookupRaghavendra G2009-09-221-24/+49
| | | | | | | | | | | - qr_lookup not to send request for file-content if the cache is already present during revalidates. - flush the cache in qr_lookup_cbk if the cache is not in sync with the file. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: make a comment more explicit.Raghavendra G2009-09-221-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: checking for qr_file in inode-context and creating ↵Raghavendra G2009-09-221-30/+45
| | | | | | | | | if not present should be atomic. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* performance/quick-read: refine the logic in qr_lookup.Raghavendra G2009-09-221-40/+54
| | | | | | | | | | | | | - a new size has to be set in xattr_req only if (quick-read is configured with a maximum file size limit && ((xattr_req does not have a request key for getting content) || (the size requested in xattr_req is not equal to configured size in quick-read))) Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 273 (Code review and optimize quick-read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=273
* protocol/client: access glusterfs context from the ctx member of xlator objectRaghavendra G2009-09-222-1/+8
| | | | | | | | | | - 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
* performance/write-behind: check for the presence of context only in fds not ↵Raghavendra G2009-09-221-6/+12
| | | | | | | | | opened on directories. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 260 (ls on booster VMP results in error: "File descriptor in bad state") URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=260
* 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
* performance/quick-read: access glusterfs_ctx from xlator instead of using ↵Raghavendra G2009-09-172-2/+1
| | | | | | | | | | | | | | glusterfs_get_ctx - since glusterfs_get_ctx gets the global context pointer, there can be problems in a multithreaded application running on libglusterfsclient doing multiple glusterfs_inits. Hence use context specific to the current xlator tree stored in each xlator object. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 240 (segmentation fault in qr_readv) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=240
* io-cache: fix table->max_pri to 1 as the lowest priorityAnand Avati2009-09-161-1/+2
| | | | | | | | | | | | | patch http://patches.gluster.com/patch/1319/ breaks when no priority is mentioned in the config. the patch makes ioc_get_priority() return 1 as the value when no priority is given, but ioc_get_priority_list() was still returning 0 as the max_pri (maximum priority) which would result in lru list heads not getting initialized Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 261 (support for disabling caching of certain files) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=261
* booster: use __REDIRECT macro to prevent creat being renamed to creat64.Raghavendra G2009-09-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - nm on libglusterfs-booster.so shows only creat64 defined but not creat. This behavior is observed due to following reasons. 1. Booster is compiled with _FILE_OFFSET_BITS=64. 2. fcntl.h when included with _FILE_OFFSET_BITS=64 defined, renames all occurences of creat to creat64 in the source code from the point of #include <fcntl.h>. fcntl.h should be included since booster.c uses many of the macros defined in that header and glusterfs (booster in turn) has to be compiled with _FILE_OFFSET_BITS=64 since glusterfs uses datatypes (off_t, stat etc) whose sizes vary depending on whether this macro is defined or not. Basically, this macro should be defined to provide portability across 32 and 64 bit architectures. The correct fix is to make glusterfs to use datatypes big enough to hold 64 bit variants as well as 32 bit variants (like int64_t replacing off_t) and not to define _FILE_OFFSET_BITS=64 at all. As a temporary work around, 1. we can implement creat functionality in a function with different name, say booster_false_creat 2. rename this function to creat using __REDIRECT macro. since this renaming happens after renaming of creat to creat64 (from the first __REDIRECT macro in fcntl.h), we will end up with creat symbol being defined in libglusterfs-booster.so Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 264 (creat is not resolved properly to the symbol defined in booster) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=264
* libglusterfsclient: NULL terminate the vmp entry during vmp_entry_init.Raghavendra G2009-09-151-2/+5
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 263 (files are not resolved to glusterfs when vmp is not terminated with a '/'.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=263
* booster: use appropriate conversion specifier during logging in close.Raghavendra G2009-09-151-1/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 262 (crash in booster close due to invalid conversion specifier during logging.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=262
* 2.0.6 patch for io-cache pattern-matched non-cachingStephan von Krawczynski2009-09-151-5/+23
| | | | | | | | | | | | | | | | | | Hello all, here is a small feature patch. Its intention is to give the user more control over the files performance/io-cache really caches. If the user knows exactly which files should be cached and which shouldn't there is currently no way to tell glusterfs _not_ to cache certain pattern. This patch allows you to disable caching by setting the priority of a pattern to "0". If you do not give any priority option it works just like before and caches everything. Honestly I am not totally sure that disabling caching works the way we did it, please comment. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 261 (support for disabling caching of certain files) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=261
* storage/posix: transform inode number in stat structureRaghavendra G2009-09-151-153/+489
| | | | | | | | | | - when export directory is configured to span across multiple mountpoints, the inode number has to be transformed in order to make it unique. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 254 (storage/posix has to do inode number transformation wherever it unwinds with a stat structure) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=254
* extras: Add LD_PRELOAD test toolShehjar Tikoo2009-09-155-0/+1089
| | | | | | | | | | | | | | This tool allows us to check the sanity of the LD_PRELOAD mechanism so that we can be sure that an application's syscalls will be redirected into booster when that library is LD_PRELOADed. In case of failed syscalls, this tool should be run first to see if the calls are redirected as required. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 251 (Improve booster debugging through ld-preload testing tool) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=251
* transport/ib-verbs: initialize fini member of new-transports created during ↵Raghavendra G2009-09-141-0/+2
| | | | | | | | | | | accepting client connections. - This bug used to cause a memory leak of 2 * sizeof(ib_verbs_private_t) for each new client connection. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 259 (Memory leak on server side when there are large number of disconnections from clients) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=259
* backporting quick read to 2.0Raghavendra G2009-09-146-1/+2363
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 238 (Backport quick-read to 2.0 release) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=238
* backport stat-prefetch from 2.1Raghavendra G2009-09-136-385/+1774
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 257 (Backport stat-prefetch to 2.0) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=257
* libglusterfsclient: Wait for time ample enough for all the children of ↵Raghavendra G2009-09-131-0/+11
| | | | | | | | | distribute to initialize before sending lookup on '/'. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 255 (libglusterfsclient should wait till all the children of distribute are initialized before sending first lookup on '/') URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=255
* 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
* booster: Fix fd_t leak in pread64Shehjar Tikoo2009-09-091-0/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 174 (booster: fd_ts, they are a leakin) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=174
* libglusterfsclient: Fix incorrect NULL check for fdShehjar Tikoo2009-09-091-1/+1
| | | | | | | | | We should check fdctx instead. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253
* libglusterfsclient: Handle CALLOC failure in libgf_client_lookupShehjar Tikoo2009-09-091-0/+7
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253
* libglusterfsclient: Handle CALLOC failure in libgf_init_vmpentryShehjar Tikoo2009-09-091-0/+18
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253
* libglusterfsclient: Add inode_ctx NULL check during iattr cache validationShehjar Tikoo2009-09-091-0/+6
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253
* libglusterfsclient: Enhance loggingShehjar Tikoo2009-09-091-43/+318
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 210 (libglusterfsclient: Enhance logging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=210
* booster: Enhance booster loggingShehjar Tikoo2009-09-093-71/+547
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 210 (libglusterfsclient: Enhance logging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=210
* cluster/afr: Check op_ret in afr_getxattr_cbk before accessing dictVikas Gorur2009-09-081-1/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 250 (Crash in replicate getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=250
* performance/write-behind: hold locks when accessing members of wb_file.Raghavendra G2009-09-081-17/+75
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 243 (Hold locks when accessing members of wb_file_t.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=243
* performance/write-behind: communicate back the errors in writes to servers ↵Raghavendra G2009-09-081-1/+12
| | | | | | | | | in the next immediate writes from application. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 242 (If any of the writes fail, write-behind should not wait till the fd is closed for reporting errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=242
* libglusterfsclient: handle intermediate path components which are symlinks ↵Raghavendra G2009-09-081-5/+10
| | | | | | | | | | | | | properly in glusterfs_glh_realpath. - while building the realpath, if the intermediate path happens to be a symbolic link, the content of link was being appended at dirname (path), instead of appending to intermediate path. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 237 (If any of the path component other than the last one, happens to be a symbolic link glusterfs_glh_realpath does not construct correct path.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=237
* libglusterfsclient: handle paths terminating with '/' properly in ↵Raghavendra G2009-09-081-1/+7
| | | | | | | | | libgf_trim_to_prev_dir. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 236 (Stack overflow due to infinite recursion in glusterfs_glh_realpath) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=236
* libglusterfsclient: handle failures in glusterfs_glh_realpathRaghavendra G2009-09-081-1/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 235 (Handle failures in glusterfs_glh_realpath appropriately) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=235
* libglusterfsclient: check for memory allocation failure in ↵Raghavendra G2009-09-081-0/+4
| | | | | | | | | glusterfs_glh_realpath. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 235 (Handle failures in glusterfs_glh_realpath appropriately) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=235
* libglusterfsclient: handle symlinks properly in glusterfs_glh_opendir.Raghavendra G2009-09-081-1/+1
| | | | | | | | | | - exclude symbolic links from set of filetypes to which ENOTDIR is returned, since a symbolic link can point to a directory. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 234 (Apache-2.2 on booster returns HTTP_FORBIDDEN for a directory which is present) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=234
* libglusterfsclient: fix to the way symbolic links are handled in ↵Raghavendra G2009-09-081-6/+17
| | | | | | | | | | | | | glusterfs_glh_realpath. - don't assume the content returned by readlink while constructing realpath of a symbolic link to contain vmp as part of the path. This is necessary in case of symbolic links which contain relative paths as targets. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 233 (Crash in Apache running on booster when a client tries to access a symbolic link) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=233
* storage/posix: Handle setgid bit on directories correctlyVikas Gorur2009-09-081-10/+108
| | | | | | | | | | | If a directory has the setgid bit set, then any entry created under it must have group ownership same as the directory. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 241 (Gluster not honouring SETGID flag) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=241
* ib-verbs: handle failure of ibv_create_qp gracefully.Raghavendra G2009-09-021-0/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 217 (crash in ib_verbs_create_qp) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=217
* libglusterfsclient: Compare compcount with path not maxentryShehjar Tikoo2009-09-021-0/+1
| | | | | | | | | | | | | | When searching for an exact entry we need to compare the component counts in the candidate VMP and the count in the path being searched. This is opposite to the current situation where we compare the component count in VMP and the component count in maxentry, which will always be same. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 209 (VMP parsing through fstab has issues) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=209
* libglusterfsclient: Enhance VMP searching logicShehjar Tikoo2009-09-021-1/+3
| | | | | | | | | | | | | Another attempt to enhance searching for VMP entries. There was a problem of returning the longest prefix match from all the VMPs without checking whether the number of matched components were same as the number of components in the candidate VMP. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 209 (VMP parsing through fstab has issues) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=209
* booster: Support backward compatible optionsShehjar Tikoo2009-09-021-0/+6
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 209 (VMP parsing through fstab has issues) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=209
* libglusterfsclient: return -1 with errno set to ENOSYS for apis which are ↵Raghavendra G2009-09-021-6/+12
| | | | | | | | | not implemented. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 229 (For apis which are not implemented return correct values with errno set appropriately) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=229
* libglusterfsclient: don't use pointer returned from basename to free ↵Raghavendra G2009-09-021-5/+5
| | | | | | | | | allocated memory. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 228 (Segmentation fault in glusterfs_getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=228
* changed booster fstab to parse the arguments same as mount.glusterfsAmar Tumballi2009-08-201-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 209 (VMP parsing through fstab has issues) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=209
* 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>
* Add BRANCH:release-2.0 tag. Master patches come without a BRANCH: tagAnand V. Avati2009-08-171-1/+1
|
* fuse: don't say "Success" when mount failsCsaba Henk2009-08-171-2/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 219 (Error message incorrect when fuse_mount() fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=219