| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
glusterfs_rmdir code path wasnt implemented completely. Here is an
attempt to complete it.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
| |
- remove redundent lookups happening in glusterfs_get.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
implementation is changed to hold inode->lock.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|
|
|
|
| |
updated copyright header to include 2009.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
|
|
|