summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-dentry.c
Commit message (Collapse)AuthorAgeFilesLines
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: Re-validate root inode on every path resolutionShehjar Tikoo2009-09-241-0/+23
| | | | | | | | | | | | | | 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: Move DHT root-lookup workaround to initShehjar Tikoo2009-07-201-15/+0
| | | | | | | | | | | | | | | The workaround for the DHT requirement for a lookup on / needs to be done only once when the xlator graph is inited. Doing it on every path's lookup results in a major performance penalty when using distribute subvolumes upwards of 16, as reported by Avati. Ref: bug 152 Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 152 (libglusterfsclient: DHT workaround is a major performance bottleneck) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=152
* libglusterfsclient: Simplify inode and stat cachingShehjar Tikoo2009-06-031-55/+13
| | | | | | | | | There is a mechanism for caching the inode numbers got from a lookup and a struct stat got from a stat or fstat but I wasnt sure if it worked. This commit simplifies cache updates and checks and the accompanying tests have made sure that the cache does work. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* libglusterfsclient: __do_path_resolve: Fix pathname resolution bugShehjar Tikoo2009-05-181-1/+1
| | | | | | | | | | | In __do_path_resolve, we need to use the new_loc.path as the input for resolution rather than the resolved variable, simply because we're not interested in resolving the names that have been resolved, as pointed out by the variable name 'resolved'. Instead, we need to resolve new_loc, which stores the next component in the path to be looked up. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Fix segfault on non-NULL loc->nameShehjar Tikoo2009-04-171-3/+3
| | | | | | | | | | | | The gf_log message actually assumes that loc->name will have a valid non-NULL name in it, whereas if the loc_t being passed to it was actually created on a function stack, i.e. a local function variable and was then passed down the code path to do_path_resolve without ever initing it or zeroing the structure, its possible that the name member has a non-NULL but corrupted address. This leads to a segfault. Whereas, we know loc->path will always have the full path. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Remove spurious strcmpShehjar Tikoo2009-04-081-6/+0
| | | | | | | | | | | This strcmp existed because of assumptions that do not hold true since the change in libglusterfsclient internals recently. This is another step in fixing the seg-fault on glusterfs_create. Patch adapted from Raghu's original fix to the problem. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Resolve path on empty cachesShehjar Tikoo2009-04-081-17/+11
| | | | | | | | | | | | | | | | | The earlier case was that the explicit lookups to the server were being sent only when the parent inode was NULL. This situation breaks when the parent inode is available in the i- or d-cache but the child dirent is not. In such a case, no explicit lookups were being sent to get the missing child dirent. Now, explicit path lookup happens even if the inode for parent or basename is not found in the caches. This also fixes a seg-fault occuring during glusterfs_open, in my test case, but one that could occur almost anywhere lookup code is used. Patch adapted from Raghu's original patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - fix bug in __do_path_resolveRaghavendra G2009-04-031-22/+26
| | | | | | | | - add argument lookup_basename to __do_path_resolve which indicates whether to lookup basename(path). This is necessary for apis like glusterfs_get, which dont want basename(path) to be looked up by libgf_client_lookup_path. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - move lookup timeout related code to ↵Raghavendra G2009-04-031-14/+64
| | | | | | | | | | libgf_client_path_lookup - this simplifies the resolution of path to inode, the apis which receive path as argument just need to call libgf_client_path_lookup for path->inode translation. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - fix indentationRaghavendra G2009-04-031-13/+20
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - change implementation of glusterfs_getRaghavendra G2009-04-031-10/+22
| | | | | | - remove redundent lookups happening in glusterfs_get. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient code changesRaghavendra G2009-04-031-0/+385
- add dentry support to libglusterfsclient. - changes related to using array, to store context in inode instead of dictionary. - code changes related to cleanup of libglusterfsclient interface. - added glusterfs_mkdir and glusterfs_rmdir - other changes in libglusterfsclient to make it work with code changes in other parts of glusterfs. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>