summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
Commit message (Collapse)AuthorAgeFilesLines
* updated libglusterfsclient with IOBUF/IOBREFsAnand V. Avati2009-04-123-22/+25
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Complete support for rmdir fopShehjar Tikoo2009-04-081-4/+36
| | | | | | | glusterfs_rmdir code path wasnt implemented completely. Here is an attempt to complete it. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Create new directory inodeShehjar Tikoo2009-04-081-0/+1
| | | | | | | | Make sure we give an allocated inode in the loc so that the underlying callbacks are able to fill it with the relevant information about the directory being created. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Return ENOENT on missing ancestor componentShehjar Tikoo2009-04-081-0/+6
| | | | | | | | If any of the path's components, except the basename, are missing from the dentry cache and the corresponding lookup from the server also fails, return an ENOENT. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Return EEXIST on lookup success in glusterfs_mkdirShehjar Tikoo2009-04-081-4/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Perform explicit createShehjar Tikoo2009-04-081-4/+3
| | | | | | | | | | | We must create the file based on the O_CREATE in the flags instead of depending on the return status of the lookup. This works because we've already handled O_EXCL earlier and also handled a missing file(ENOENT) in case this was actually an open and not create. Adapted from Raghu's original patch. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Handle O_CREAT on lookup failureShehjar Tikoo2009-04-081-0/+15
| | | | | | | | | | | | | | | | | On lookup failure, if O_CREAT is required, then we must: 1. explicitly lookup the parent directory. 2. create a new inode for the new file being opened. This special case is required for file creation because: 1. We cannot depend on the previous lookup to have reliably looked up the parent inode. 2. inode for the new file does not exist in the itable. Patch adapted from Raghu's original fix. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient: Dont depend on ENOENTShehjar Tikoo2009-04-081-2/+2
| | | | | | | | | | Dont depend on the dentry and explicit lookup function, i.e. libgf_client_path_lookup(..), to return ENOENT on not finding a dentry. Just use op_ret = -1 as a lookup failure status. Patch adapted from Raghu's original fix. 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 segfault in glusterfs_openShehjar Tikoo2009-04-081-3/+3
| | | | | | | | | | | | libgf_client_loc_fill gets passed a name=NULL argument. So when this function returns the filled loc argument, this loc is actually missing the inode structure that was to be filled. The segfault actually occurs a few lines later when we try to access fd->flags but fd returned by fd_create is NULL because we'd passed a NULL inode to it, i.e. the loc->inode. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Fix an incorrect type-cast in libglusterfsclient.cVikas Gorur2009-04-061-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - reimplement glusterfs_fgetxattr and glusterfs_fsetxattrRaghavendra G2009-04-031-90/+137
| | | | | | | | - glusterfs_fgetxattr and glusterfs_fsetxattr earlier used lookup and setxattr fops for implementation. Change it to use fgetxattr and fsetxattr fops instead. 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-033-227/+181
| | | | | | | | | | 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-033-78/+155
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient - change implementation of glusterfs_getRaghavendra G2009-04-033-41/+49
| | | | | | - remove redundent lookups happening in glusterfs_get. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* libglusterfsclient code changesRaghavendra G2009-04-035-436/+1173
| | | | | | | | | | | | - 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>
* libglusterfsclient: Fix NULL argument bugShehjar Tikoo2009-03-261-0/+1
| | | | | | | | | | inode_ctx_get was being passed a xlator_t type that was initialized to NULL resulting in a EINVAL return from glusterfs_fstat. Reported on gluster-devel Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* code changes in the usage of inode_ctx_get and inode_ctx_put after their ↵Raghavendra G2009-03-051-29/+31
| | | | | | implementation is changed to hold inode->lock. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-263-3/+3
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Added all filesVikas Gorur2009-02-185-0/+3588