summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
Commit message (Collapse)AuthorAgeFilesLines
* booster, libglusterfsclient: Support samba specific relative pathsShehjar Tikoo2009-10-302-166/+173
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 158 (libglusterfsclient: Applications are restricted to using absolute paths) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=158
* libglusterfsclient: don't do inode_link on root inode.Raghavendra G2009-10-301-1/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 348 (touch on booster segfaults) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=348
* booster: seperate out the implementations of readdir and readdir64.Raghavendra G2009-10-262-2/+2
| | | | | | | | | | | | - readdir and readdir64 should not call same procedure booster_readdir in their implementation, since the layout of dirent structures returned by libc implementations of readdir and readdir64 is different (readdir returns struct dirent *, where as readdir64 returns struct dirent64 *). Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 333 (ls on paths not on virtual mounts report wrong directory contents) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=333
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-074-4/+4
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Port directory reading to readdirp fopShehjar Tikoo2009-10-061-9/+6
| | | | | | | 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
* libglusterfsclient: Remove redundant fchown and fchmodShehjar Tikoo2009-10-011-78/+0
| | | | | | | 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
* libglusterfsclient: Use fsetattr for fchownShehjar Tikoo2009-10-011-1/+7
| | | | | | | 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
* libglusterfsclient: Use fsetattr for fchmodShehjar Tikoo2009-10-011-1/+5
| | | | | | | 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
* libglusterfsclient: Support fsetattr fopShehjar Tikoo2009-10-011-0/+41
| | | | | | | 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
* libglusterfsclient: Remove redundant chown codeShehjar Tikoo2009-10-011-38/+0
| | | | | | | 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
* libglusterfsclient: Remove redundant chmod codeShehjar Tikoo2009-10-011-37/+0
| | | | | | | 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
* libglusterfsclient: Remove redundant utimens codeShehjar Tikoo2009-10-011-42/+0
| | | | | | | 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
* libglusterfsclient: Use setattr for utimeShehjar Tikoo2009-10-011-8/+13
| | | | | | | 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
* libglusterfsclient: Use setattr for utimesShehjar Tikoo2009-10-011-7/+9
| | | | | | | 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
* libglusterfsclient: Use setattr for chownShehjar Tikoo2009-10-011-1/+6
| | | | | | | 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
* libglusterfsclient: Use setattr for chmodShehjar Tikoo2009-10-011-1/+5
| | | | | | | 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
* libglusterfsclient: Support setattr fopShehjar Tikoo2009-10-011-0/+40
| | | | | | | 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
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-011-34/+58
| | | | | | | 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
* libglusterfsclient: don't destroy the iobuf pool during fini.Raghavendra G2009-09-281-1/+1
| | | | | | | | | | | | | - some of the iobufs in pool will be cached by io-cache and hence refcount will not be zero. Hence the assertion of ref being zero in __iobuf_arena_destroy fails. Commenting out iobuf_pool_destroy during fini, till we introduce proper cleanup in all translators, thereby allowing io-cache to release the buffers it has held. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 283 (booster aborts complaining the refcount of iobuf is not zero during glusterfs_umount_all.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=283
* libglusterfsclient: traverse the vmplist during fini only if any entries are ↵Raghavendra G2009-09-281-5/+8
| | | | | | | | | | | | mounted. - the vmplist.list is inited only during mounting of first entry. Hence doing a list traversal when no vmpentries are present, results in a segfault. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 282 (segfault of applications using booster observed when the application does not mount any vmps.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=282
* libglusterfsclient: Support TRACE loglevelShehjar Tikoo2009-09-241-1/+4
| | | | | | | 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
* libglusterfsclient: Wait for all call pools to be destroyedShehjar Tikoo2009-09-241-0/+34
| | | | | | | | | | | | This ensures that the process using libglusterfsclient does not exit before all the fops and calls have been replied to. It helps to ensure that the backends are in a sane state when the program exits. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 279 (File written with booster results in self-heal after dd exits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=279
* libglusterfsclient: Clean up fini and umount code pathsShehjar Tikoo2009-09-241-19/+5
| | | | | | | | | | | | | | | | | | | This patch cleans up the umount and fini paths in preparation to support waiting for unwind of all pending call frames. Two misc fixes are: 1. Fix to avoid deadlock in _libgf_umount by using _libgf_vmp_search_entry instead of libgf_vmp_search_exact_entry since the latter tries to take a lock already help by _libgf_umount. 2. Avoid a crash in _libgf_umount by deleting the vmp entry from the list before it gets freed. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 279 (File written with booster results in self-heal after dd exits) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=279
* libglusterfsclient: Reduce logging aggressiveness to TRACEShehjar Tikoo2009-09-241-18/+18
| | | | | | | 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
* libglusterfsclient: Re-validate root inode on every path resolutionShehjar Tikoo2009-09-242-0/+24
| | | | | | | | | | | | | | If the root inode's is outdated, send a revalidate on it. A revalidate on root inode also reduces the window in which an op will fail over distribute because the layout of the root directory did not get constructed when we sent the lookup on root in glusterfs_init. That can happen when not all children of a distribute volume were up at the time of glusterfs_init. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 256 (revalidates should be sent on '/' in libglusterfsclient.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=256
* libglusterfsclient: Fix build warningsShehjar Tikoo2009-09-221-18/+20
| | | | | | | 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
* 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
* 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
* 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
* 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_realpath.Raghavendra 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
* 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
* libglusterfsclient: don't use pointer returned by basename while freeing ↵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
* libglusterfsclient: Sync access to VMP list on new entry additionShehjar Tikoo2009-08-171-9/+9
| | | | | | | | | | | | | | | | | | | Some weeks back, I'd separated the big lock into vmplock and mountlock. See commit 304e4274ca9b0339539581c5413e3339078c1182 in mainline. At that time, we did not have a solution to the problem of when to init the vmplist in a thread-safe manner, since there was no lock to protect the vmplock specifically, and that when libgf_vmp_map_ghandle was called inside glusterfs_mount so the "lock" was already being held. Now that we have separate mount and vmp locks, the accesses can be synced correctly. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 211 (libglusterfsclient: Race condition against vmplist in libgf_vmp_map_ghandle) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=211
* libglusterfsclient: Enhance VMP search loggingShehjar Tikoo2009-08-171-6/+8
| | | | | | | 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
* libglusterfsclient: Use components for VMP searchesShehjar Tikoo2009-08-171-21/+109
| | | | | | | | | | | | | | | | Till now, we've been doing a character by character comparison between a given path and the VMP, to search for the glusterfs handle for the given path. This does not work for all cases and has been a known bug. This commit changes the byte-by-byte comparison into a more accurate component based comparison to fix search failures. 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: Bind fd on fd creation code pathsShehjar Tikoo2009-07-312-3/+9
| | | | | | | | | | | | | | When an fd_t is fd_create'd, we need to call fd_bind on it to ensure that any fd_lookup on the inode gets us this fd. We're not doing this so translators like write-behind were not able to order path-based requests at all resulting in some fops like stat, which could be issued after a writev, overtaking a previous writev which is still being written-behind. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 179 (fileop reports miscompares on read tests) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=179
* libglusterfsclient: Invalidate iattr cache on readsShehjar Tikoo2009-07-311-4/+2
| | | | | | | | | | | Earlier we have invalidated the iattr cache on writes. Now we need to do so for reads also, so that we are not updating the iattr cache with 0-filled stat received from io-cache. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 180 (fileop fails at chmod with stale file handle error over unfs3) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=180
* libglusterfsclient: Use iobufs for storing application write dataShehjar Tikoo2009-07-302-18/+85
| | | | | | | | | | | | | | | | | | | | | Till now we've been creating an iovec, storing references in it to the application data and simply passing it on to the translator tree. This means that the buffer being passed to the translators is not at all associated with the memory ref'd by the iobref argument to write fop. This is a problem when write-behind is a translator in the tree since it assumes that the memory in the iovecs passed to write fops is already refcounted by the iobref and so it simply copies the address of the application data. The problem is that the application can continue using this buffer, free it or over-write it destroying the data that write-behind may write at a later time. The solution involves copying the application's write buffer into an iobuf which will be referred to by the iobref. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 178 (libglusterfsclient: Data corruption on using write-behind in translator tree) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=178
* libglusterfsclient: Fix solaris build errorShehjar Tikoo2009-07-281-2/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 115 (./configure adds libglusterfsclient when it shouldn't) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=115
* libglusterfsclient: Workaround for local memory corruptionShehjar Tikoo2009-07-271-1/+1
| | | | | | | | | | | | There seems to a reproduceable corruption specifically of the libglusterfs_client_local_t that is allocated for the read call. Therefore, the subsequent access to fd inside local leads to a segfault. This is a temporary fix. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 164 (libglusterfsclient: Segfault due to memory corruption of frame local in libgf_client_read) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=164