diff options
author | Amar Tumballi <amar@gluster.com> | 2011-09-28 15:41:47 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-16 03:45:11 -0800 |
commit | 8c182c6bf700cdc8a7e2d4b75109ad0acee2e70d (patch) | |
tree | 29e4aa8bd05540c663bf935bc454476e93262590 /xlators | |
parent | 14f4e023822a22e0a4902acfd28c8f5ea8c94ccd (diff) |
core: remove 'ino' variable from 'loc_t' structure
Change-Id: I53b007fbdb42313d207d5d63fbfaaa6aaf033f95
BUG: 3518
Reviewed-on: http://review.gluster.com/523
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/pump.c | 5 | ||||
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 2 | ||||
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 35 |
3 files changed, 24 insertions, 18 deletions
diff --git a/xlators/cluster/afr/src/pump.c b/xlators/cluster/afr/src/pump.c index 9ad29c69b6d..aeb2ea7605e 100644 --- a/xlators/cluster/afr/src/pump.c +++ b/xlators/cluster/afr/src/pump.c @@ -649,9 +649,8 @@ pump_task (void *data) &iatt, &xattr_rsp, &parent); gf_log (this->name, GF_LOG_TRACE, - "lookup: ino=%"PRId64", path=%s", - loc.ino, - loc.path); + "lookup: path=%s gfid=%s", + loc.path, uuid_utoa (loc.inode->gfid)); ret = pump_check_and_update_status (this); if (ret < 0) { diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 81dbfbd0905..57e8470d67a 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -171,8 +171,6 @@ mq_loc_fill_from_name (xlator_t *this, loc_t *newloc, loc_t *oldloc, GF_VALIDATE_OR_GOTO ("marker", oldloc, out); GF_VALIDATE_OR_GOTO ("marker", name, out); - newloc->ino = ino; - newloc->inode = inode_new (oldloc->inode->table); if (!newloc->inode) { diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 0c91dd78797..1393a47a311 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -125,15 +125,15 @@ fuse_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this, state = frame->root->state; finh = state->finh; - if (!op_ret && state->loc.ino == 1) { + if (!op_ret && __is_root_gfid (state->loc.inode->gfid)) { buf->ia_ino = 1; } if (op_ret == 0) { gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": %s() %s => %"PRId64" (%"PRId64")", + "%"PRIu64": %s() %s => %"PRId64, frame->root->unique, gf_fop_list[frame->root->op], - state->loc.path, buf->ia_ino, state->loc.ino); + state->loc.path, buf->ia_ino); buf->ia_blksize = this->ctx->page_size; gf_fuse_stat2attr (buf, &feo.attr); @@ -1328,15 +1328,16 @@ fuse_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret == 0) { gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": %s -> %s => 0 (buf->ia_ino=%"PRId64" , loc->ino=%"PRId64")", + "%"PRIu64": %s -> %s => 0 (buf->ia_ino=%"PRId64")", frame->root->unique, state->loc.path, state->loc2.path, - buf->ia_ino, state->loc.ino); + buf->ia_ino); { /* ugly ugly - to stay blind to situation where rename happens on a new inode */ - buf->ia_ino = state->loc.ino; + /* TODO: can i remove below line */ + //buf->ia_ino = state->loc.ino; buf->ia_type = state->loc.inode->ia_type; } buf->ia_blksize = this->ctx->page_size; @@ -1363,16 +1364,25 @@ fuse_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, void fuse_rename_resume (fuse_state_t *state) { + char loc_uuid[64] = {0,}; + char loc2_uuid[64] = {0,}; + if (!state->loc.inode) { send_fuse_err (state->this, state->finh, ENOENT); free_fuse_state (state); return; } + uuid_utoa_r (state->loc.inode->gfid, loc_uuid); + if (state->loc2.inode) + uuid_utoa_r (state->loc2.inode->gfid, loc2_uuid); + else + strcpy (loc2_uuid, "0"); + gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": RENAME `%s (%"PRId64")' -> `%s (%"PRId64")'", - state->finh->unique, state->loc.path, state->loc.ino, - state->loc2.path, state->loc2.ino); + "%"PRIu64": RENAME `%s (%s)' -> `%s (%s)'", + state->finh->unique, state->loc.path, loc_uuid, + state->loc2.path, loc2_uuid); FUSE_FOP (state, fuse_rename_cbk, GF_FOP_RENAME, rename, &state->loc, &state->loc2); @@ -1438,9 +1448,9 @@ fuse_link_resume (fuse_state_t *state) state->loc.inode = inode_ref (state->loc2.inode); gf_log ("glusterfs-fuse", GF_LOG_TRACE, - "%"PRIu64": LINK() %s (%"PRId64") -> %s (%"PRId64")", - state->finh->unique, state->loc2.path, state->loc2.ino, - state->loc.path, state->loc.ino); + "%"PRIu64": LINK() %s -> %s", + state->finh->unique, state->loc2.path, + state->loc.path); FUSE_FOP (state, fuse_newentry_cbk, GF_FOP_LINK, link, &state->loc2, &state->loc); @@ -3041,7 +3051,6 @@ fuse_first_lookup (xlator_t *this) loc.path = "/"; loc.name = ""; - loc.ino = 1; loc.inode = fuse_ino_to_inode (1, this); loc.parent = NULL; |