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/server/src/server-resolve.c | |
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/server/src/server-resolve.c')
-rw-r--r-- | xlators/protocol/server/src/server-resolve.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c index 1a489f6ef4c..e7c1cc85fd5 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); |