diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 14:01:29 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:45 -0700 |
commit | 4432f46fa75bf62a6a8e9295f9792a73589f924b (patch) | |
tree | 38a07fdf8b1dd3175452330cdaacdb8422e52291 /xlators/protocol | |
parent | 2c400f60cad3ac0b9dbf1be06b48675d40fcc824 (diff) |
gfid: server resolver changes to use gfid instead of ino/gen
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 30 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 8 |
2 files changed, 8 insertions, 30 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 1a489f6ef..e7c1cc85f 100644 --- a/xlators/protocol/server/src/server-resolve.c +++ b/xlators/protocol/server/src/server-resolve.c @@ -330,7 +330,7 @@ resolve_entry_simple (call_frame_t *frame) this = frame->this; resolve = state->resolve_now; - parent = inode_get (state->itable, resolve->par, 0); + parent = inode_find (state->itable, resolve->pargfid); if (!parent) { /* simple resolution is indecisive. need to perform deep resolution */ @@ -349,16 +349,6 @@ resolve_entry_simple (call_frame_t *frame) goto out; } -// if (parent->ino != 1 && parent->generation != resolve->gen) { - if (0) { - /* simple resolution is decisive - request was for a - stale handle */ - resolve->op_ret = -1; - resolve->op_errno = ENOENT; - ret = -1; - goto out; - } - /* expected @parent was found from the inode cache */ state->loc_now->parent = inode_ref (parent); @@ -445,11 +435,7 @@ resolve_inode_simple (call_frame_t *frame) state = CALL_STATE (frame); resolve = state->resolve_now; - if (resolve->type == RESOLVE_EXACT) { - inode = inode_get (state->itable, resolve->ino, resolve->gen); - } else { - inode = inode_get (state->itable, resolve->ino, 0); - } + inode = inode_find (state->itable, resolve->gfid); if (!inode) { resolve->op_ret = -1; @@ -458,14 +444,6 @@ resolve_inode_simple (call_frame_t *frame) goto out; } -// if (inode->ino != 1 && inode->generation != resolve->gen) { - if (0) { - resolve->op_ret = -1; - resolve->op_errno = ENOENT; - ret = -1; - goto out; - } - ret = 0; state->loc_now->inode = inode_ref (inode); @@ -545,11 +523,11 @@ server_resolve (call_frame_t *frame) server_resolve_fd (frame); - } else if (resolve->par) { + } else if (!uuid_is_null (resolve->pargfid)) { server_resolve_entry (frame); - } else if (resolve->ino) { + } else if (!uuid_is_null (resolve->gfid)) { server_resolve_inode (frame); diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index ddcc423fd..c370dbe8a 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -2886,7 +2886,7 @@ server_create (rpcsvc_request_t *req) goto out; } - state->dict = params; + state->params = params; params->extra_free = buf; @@ -4090,7 +4090,7 @@ server_mknod (rpcsvc_request_t *req) goto out; } - state->dict = params; + state->params = params; params->extra_free = buf; @@ -4179,7 +4179,7 @@ server_mkdir (rpcsvc_request_t *req) goto out; } - state->dict = params; + state->params = params; params->extra_free = buf; @@ -4614,7 +4614,7 @@ server_symlink (rpcsvc_request_t *req) goto out; } - state->dict = params; + state->params = params; params->extra_free = buf; |