summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-11-16 15:39:29 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 03:44:32 -0800
commit14f4e023822a22e0a4902acfd28c8f5ea8c94ccd (patch)
tree580ae84b87adf7f7ce83d6a409c303aa49ba4220
parent217842180858afff79d06c24389752299c5ed716 (diff)
core: remove 'ino' variable from 'inode_t' structure
Change-Id: I0f078d1753db65d2f2e0380d1b0450c114cf40dd BUG: 3518 Reviewed-on: http://review.gluster.com/522 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--libglusterfs/src/inode.c34
-rw-r--r--libglusterfs/src/inode.h3
-rw-r--r--xlators/cluster/afr/src/afr-common.c3
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c1
-rw-r--r--xlators/cluster/afr/src/afr-self-heald.c2
-rw-r--r--xlators/cluster/dht/src/dht-helper.c5
-rw-r--r--xlators/cluster/stripe/src/stripe.c1
-rw-r--r--xlators/debug/trace/src/trace.c3
-rw-r--r--xlators/features/locks/src/common.c4
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c17
-rw-r--r--xlators/features/marker/src/marker.c34
-rw-r--r--xlators/features/quota/src/quota.c229
-rw-r--r--xlators/features/quota/src/quota.h2
-rw-r--r--xlators/features/trash/src/trash.c2
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c8
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c20
-rw-r--r--xlators/nfs/server/src/mount3.c4
-rw-r--r--xlators/nfs/server/src/nfs-common.c7
-rw-r--r--xlators/nfs/server/src/nfs-fops.c44
-rw-r--r--xlators/nfs/server/src/nfs3.c2
-rw-r--r--xlators/performance/io-cache/src/io-cache.c4
-rw-r--r--xlators/performance/quick-read/src/quick-read.c16
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c148
-rw-r--r--xlators/protocol/client/src/client-helpers.c8
-rw-r--r--xlators/protocol/client/src/client3_1-fops.c5
-rw-r--r--xlators/protocol/server/src/server-helpers.c35
-rw-r--r--xlators/protocol/server/src/server-resolve.c8
-rw-r--r--xlators/protocol/server/src/server.h5
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c342
29 files changed, 438 insertions, 558 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 3239878b35d..1f9da30c480 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -223,8 +223,8 @@ __is_dentry_cyclic (dentry_t *dentry)
gf_log (dentry->inode->table->name, GF_LOG_CRITICAL,
"detected cyclic loop formation during inode linkage."
- " inode (%"PRId64"/%s) linking under itself as %s",
- inode->ino, uuid_utoa (inode->gfid), name);
+ " inode (%s) linking under itself as %s",
+ uuid_utoa (inode->gfid), name);
}
return ret;
@@ -275,7 +275,7 @@ __inode_hash (inode_t *inode)
static dentry_t *
-__dentry_search_for_inode (inode_t *inode, ino_t par, const char *name)
+__dentry_search_for_inode (inode_t *inode, uuid_t pargfid, const char *name)
{
dentry_t *dentry = NULL;
dentry_t *tmp = NULL;
@@ -285,8 +285,15 @@ __dentry_search_for_inode (inode_t *inode, ino_t par, const char *name)
return NULL;
}
+ /* earlier, just the ino was sent, which could have been 0, now
+ we deal with gfid, and if sent gfid is null or 0, no need to
+ continue with the check */
+ if (!pargfid || uuid_is_null (pargfid))
+ return NULL;
+
list_for_each_entry (tmp, &inode->dentry_list, inode_list) {
- if (tmp->parent->ino == par && !strcmp (tmp->name, name)) {
+ if ((uuid_compare (tmp->parent->gfid, pargfid) == 0) &&
+ !strcmp (tmp->name, name)) {
dentry = tmp;
break;
}
@@ -392,7 +399,7 @@ __inode_unref (inode_t *inode)
if (!inode)
return NULL;
- if (inode->ino == 1)
+ if (__is_root_gfid(inode->gfid))
return inode;
GF_ASSERT (inode->ref);
@@ -756,7 +763,6 @@ __inode_link (inode_t *inode, inode_t *parent, const char *name,
return NULL;
uuid_copy (inode->gfid, iatt->ia_gfid);
- inode->ino = iatt->ia_ino;
inode->ia_type = iatt->ia_type;
old_inode = __inode_find (table, inode->gfid);
@@ -872,7 +878,7 @@ __inode_unlink (inode_t *inode, inode_t *parent, const char *name)
if (!inode || !parent || !name)
return;
- dentry = __dentry_search_for_inode (inode, parent->ino, name);
+ dentry = __dentry_search_for_inode (inode, parent->gfid, name);
/* dentry NULL for corrupted backend */
if (dentry)
@@ -955,7 +961,7 @@ __dentry_search_arbit (inode_t *inode)
inode_t *
-inode_parent (inode_t *inode, ino_t par, const char *name)
+inode_parent (inode_t *inode, uuid_t pargfid, const char *name)
{
inode_t *parent = NULL;
inode_table_t *table = NULL;
@@ -970,8 +976,8 @@ inode_parent (inode_t *inode, ino_t par, const char *name)
pthread_mutex_lock (&table->lock);
{
- if (par && name) {
- dentry = __dentry_search_for_inode (inode, par, name);
+ if (pargfid && !uuid_is_null (pargfid) && name) {
+ dentry = __dentry_search_for_inode (inode, pargfid, name);
} else {
dentry = __dentry_search_arbit (inode);
}
@@ -1018,11 +1024,11 @@ __inode_path (inode_t *inode, const char *name, char **bufp)
}
}
- if ((inode->ino != 1) &&
+ if (!__is_root_gfid (inode->gfid) &&
(i == 0)) {
gf_log (table->name, GF_LOG_WARNING,
- "no dentry for non-root inode %"PRId64": %s",
- inode->ino, uuid_utoa (inode->gfid));
+ "no dentry for non-root inode : %s",
+ uuid_utoa (inode->gfid));
ret = -ENOENT;
goto out;
}
@@ -1059,7 +1065,7 @@ __inode_path (inode_t *inode, const char *name, char **bufp)
}
out:
- if (inode->ino == 1 && !name) {
+ if (__is_root_gfid (inode->gfid) && !name) {
ret = 1;
if (buf) {
GF_FREE (buf);
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h
index a632ff5e965..df415286b20 100644
--- a/libglusterfs/src/inode.h
+++ b/libglusterfs/src/inode.h
@@ -96,7 +96,6 @@ struct _inode {
gf_lock_t lock;
uint64_t nlookup;
uint32_t ref; /* reference count on this inode */
- ino_t ino; /* inode number in the storage (persistent) */
ia_type_t ia_type; /* what kind of file */
struct list_head fd_list; /* list of open files on this inode */
struct list_head dentry_list; /* list of directory entries for this inode */
@@ -121,7 +120,7 @@ void
inode_unlink (inode_t *inode, inode_t *parent, const char *name);
inode_t *
-inode_parent (inode_t *inode, ino_t par, const char *name);
+inode_parent (inode_t *inode, uuid_t pargfid, const char *name);
inode_t *
inode_ref (inode_t *inode);
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 5c085b611a3..99305b718fa 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -44,6 +44,7 @@
#include "compat.h"
#include "byte-order.h"
#include "statedump.h"
+#include "inode.h"
#include "fd.h"
@@ -1807,7 +1808,7 @@ afr_set_root_inode_on_first_lookup (afr_local_t *local, xlator_t *this,
afr_private_t *priv = NULL;
GF_ASSERT (inode);
- if (inode->ino != 1)
+ if (!__is_root_gfid (inode->gfid))
goto out;
if (!afr_is_fresh_lookup (&local->loc, this))
goto out;
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 2d7f98a2a7d..ca669b684f4 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -70,7 +70,6 @@ afr_build_parent_loc (loc_t *parent, loc_t *child)
parent->inode = inode_ref (child->parent);
parent->parent = inode_parent (parent->inode, 0, NULL);
- parent->ino = parent->inode->ino;
if (!uuid_is_null (child->pargfid))
uuid_copy (parent->gfid, child->pargfid);
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c
index afddf62c2e4..d0cd2f02d26 100644
--- a/xlators/cluster/afr/src/afr-self-heald.c
+++ b/xlators/cluster/afr/src/afr-self-heald.c
@@ -501,8 +501,6 @@ afr_build_root_loc (inode_t *inode, loc_t *loc)
loc->path = "/";
loc->name = "";
loc->inode = inode;
- loc->ino = 1;
- loc->inode->ino = 1;
loc->inode->ia_type = IA_IFDIR;
memset (loc->inode->gfid, 0, 16);
loc->inode->gfid[15] = 1;
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index d8138067ee5..01d11ee68f1 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -117,7 +117,6 @@ dht_filter_loc_subvol_key (xlator_t *this, loc_t *loc, loc_t *new_loc,
new_loc->path = ((new_path) ? new_path:
gf_strdup (loc->path));
new_loc->name = new_name;
- new_loc->ino = loc->ino;
new_loc->inode = inode_ref (loc->inode);
new_loc->parent = inode_ref (loc->parent);
}
@@ -368,8 +367,8 @@ dht_subvol_get_hashed (xlator_t *this, loc_t *loc)
if (!layout) {
gf_log (this->name, GF_LOG_DEBUG,
- "layout missing path=%s parent=%"PRId64,
- loc->path, loc->parent->ino);
+ "layout missing path=%s parent=%s",
+ loc->path, uuid_utoa (loc->parent->gfid));
goto out;
}
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index 4faa0a828d8..925687534c7 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -4205,7 +4205,6 @@ unlock:
if (!inode)
goto out;
- loc.ino = inode->ino = local_entry->d_ino;
loc.inode = inode;
loc.parent = local->fd->inode;
ret = inode_path (local->fd->inode, local_entry->d_name, &path);
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
index 943009dafc2..88e413c1d71 100644
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -2215,8 +2215,7 @@ trace_forget (xlator_t *this, inode_t *inode)
he should know about 'forget' too */
if (trace_fop_names[GF_FOP_LOOKUP].enabled) {
gf_log (this->name, GF_LOG_INFO,
- "gfid=%s ino=%"PRIu64,
- uuid_utoa (inode->gfid), inode->ino);
+ "gfid=%s", uuid_utoa (inode->gfid));
}
return 0;
}
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index ab1542b62e4..f6b9c331575 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -176,8 +176,8 @@ pl_print_lockee (char *str, int size, fd_t *fd, loc_t *loc)
ipath = NULL;
}
- snprintf (str, size, "ino=%llu, fd=%p, path=%s",
- (unsigned long long) inode->ino, fd,
+ snprintf (str, size, "gfid=%s, fd=%p, path=%s",
+ uuid_utoa (inode->gfid), fd,
ipath ? ipath : "<nul>");
if (ipath)
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index 10746254ded..03a8d78ba16 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -41,7 +41,6 @@ mq_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- loc->ino = inode->ino;
}
if (parent)
@@ -78,7 +77,7 @@ mq_inode_loc_fill (const char *parent_gfid, inode_t *inode, loc_t *loc)
if ((!inode) || (!loc))
return ret;
- if ((inode) && (inode->ino == 1)) {
+ if ((inode) && __is_root_gfid (inode->gfid)) {
loc->parent = NULL;
goto ignore_parent;
}
@@ -397,22 +396,18 @@ mq_get_contribution_from_loc (xlator_t *this, loc_t *loc)
if (ret < 0) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
"cannot get marker-quota context from inode "
- "(ino: %"PRId64", gfid:%s, path:%s)",
- loc->inode->ino,
- uuid_utoa (loc->inode->gfid),
- loc->path);
+ "(gfid:%s, path:%s)",
+ uuid_utoa (loc->inode->gfid), loc->path);
goto err;
}
contribution = mq_get_contribution_node (loc->parent, ctx);
if (contribution == NULL) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
- "inode (ino:%"PRId64", gfid:%s, path:%s ) has"
- " no contribution towards parent (ino:%"PRId64
- ", gfid:%s)", loc->inode->ino,
+ "inode (gfid:%s, path:%s) has "
+ "no contribution towards parent (gfid:%s)",
uuid_utoa (loc->inode->gfid),
- loc->path, loc->parent->ino,
- uuid_utoa (loc->parent->gfid));
+ loc->path, uuid_utoa (loc->parent->gfid));
goto err;
}
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 35b77fe6fab..52ff6e08e3d 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -65,7 +65,6 @@ marker_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- loc->ino = inode->ino;
}
if (parent)
@@ -101,7 +100,7 @@ marker_inode_loc_fill (inode_t *inode, loc_t *loc)
if ((!inode) || (!loc))
return ret;
- if ((inode) && (inode->ino == 1)) {
+ if ((inode) && __is_root_gfid (inode->gfid)) {
loc->parent = NULL;
goto ignore_parent;
}
@@ -921,9 +920,8 @@ marker_rename_done (call_frame_t *frame, void *cookie, xlator_t *this,
}
gf_log (this->name, GF_LOG_WARNING,
- "inodelk (UNLOCK) failed on path:%s, inode (ino:%"PRId64
- ", gfid:%s)(%s)", local->parent_loc.path,
- local->parent_loc.inode->ino,
+ "inodelk (UNLOCK) failed on path:%s (gfid:%s) (%s)",
+ local->parent_loc.path,
uuid_utoa (local->parent_loc.inode->gfid),
strerror (op_errno));
}
@@ -948,7 +946,6 @@ marker_rename_done (call_frame_t *frame, void *cookie, xlator_t *this,
if (newloc.name)
newloc.name++;
newloc.parent = inode_ref (local->loc.parent);
- newloc.ino = oplocal->loc.inode->ino;
mq_rename_update_newpath (this, &newloc);
@@ -983,9 +980,8 @@ marker_rename_release_newp_lock (call_frame_t *frame, void *cookie,
}
gf_log (this->name, GF_LOG_WARNING,
- "inodelk (UNLOCK) failed on path:%s, inode (ino:%"PRId64
- ", gfid:%s)(%s)", oplocal->parent_loc.path,
- oplocal->parent_loc.inode->ino,
+ "inodelk (UNLOCK) failed on %s (gfid:%s) (%s)",
+ oplocal->parent_loc.path,
uuid_utoa (oplocal->parent_loc.inode->gfid),
strerror (op_errno));
}
@@ -1110,7 +1106,6 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (newloc.name)
newloc.name++;
newloc.parent = inode_ref (local->loc.parent);
- newloc.ino = oplocal->loc.inode->ino;
STACK_WIND_COOKIE (frame, marker_rename_release_oldp_lock,
frame->cookie, FIRST_CHILD(this),
@@ -1170,9 +1165,8 @@ marker_do_rename (call_frame_t *frame, void *cookie, xlator_t *this,
if ((op_ret < 0) && (op_errno != ENOATTR)) {
local->err = op_errno;
gf_log (this->name, GF_LOG_WARNING,
- "fetching contribution values from %s (ino:%"PRId64", "
- "gfid:%s) failed (%s)", local->loc.path,
- local->loc.inode->ino,
+ "fetching contribution values from %s (gfid:%s) "
+ "failed (%s)", local->loc.path,
uuid_utoa (local->loc.inode->gfid),
strerror (op_errno));
goto err;
@@ -1223,9 +1217,8 @@ marker_get_newpath_contribution (call_frame_t *frame, void *cookie,
if ((op_ret < 0) && (op_errno != ENOATTR)) {
local->err = op_errno;
gf_log (this->name, GF_LOG_WARNING,
- "fetching contribution values from %s (ino:%"PRId64", "
- "gfid:%s) failed (%s)", oplocal->loc.path,
- oplocal->loc.inode->ino,
+ "fetching contribution values from %s (gfid:%s) "
+ "failed (%s)", oplocal->loc.path,
uuid_utoa (oplocal->loc.inode->gfid),
strerror (op_errno));
goto err;
@@ -1282,10 +1275,8 @@ marker_get_oldpath_contribution (call_frame_t *frame, void *cookie,
if (op_ret < 0) {
local->err = op_errno;
gf_log (this->name, GF_LOG_WARNING,
- "cannot hold inodelk on %s (ino:%"PRId64", gfid:%s)"
- "(%s)",
+ "cannot hold inodelk on %s (gfid:%s) (%s)",
local->next_lock_on->path,
- local->next_lock_on->inode->ino,
uuid_utoa (local->next_lock_on->inode->gfid),
strerror (op_errno));
goto lock_err;
@@ -1345,9 +1336,8 @@ marker_rename_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->err = op_errno;
gf_log (this->name, GF_LOG_WARNING,
- "cannot hold inodelk on %s (ino:%"PRId64", gfid:%s)"
- "(%s)", loc->path, loc->inode->ino,
- uuid_utoa (loc->inode->gfid),
+ "cannot hold inodelk on %s (gfid:%s) (%s)",
+ loc->path, uuid_utoa (loc->inode->gfid),
strerror (op_errno));
goto err;
}
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 3ff3d1bded9..3b219c643d5 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -23,7 +23,7 @@
int32_t
quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
- char *name, ino_t par);
+ char *name, uuid_t par);
struct volume_options options[];
int
@@ -37,7 +37,6 @@ quota_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- loc->ino = inode->ino;
}
if (parent) {
@@ -81,7 +80,7 @@ quota_inode_loc_fill (inode_t *inode, loc_t *loc)
this = THIS;
- if ((inode) && (inode->ino == 1)) {
+ if ((inode) && __is_root_gfid (inode->gfid)) {
loc->parent = NULL;
goto ignore_parent;
}
@@ -89,8 +88,7 @@ quota_inode_loc_fill (inode_t *inode, loc_t *loc)
parent = inode_parent (inode, 0, NULL);
if (!parent) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot find parent for inode (ino:%"PRId64", "
- "gfid:%s)", inode->ino,
+ "cannot find parent for inode (gfid:%s)",
uuid_utoa (inode->gfid));
goto err;
}
@@ -99,8 +97,7 @@ ignore_parent:
ret = inode_path (inode, NULL, &resolvedpath);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot construct path for inode (ino:%"PRId64", "
- "gfid:%s)", inode->ino,
+ "cannot construct path for inode (gfid:%s)",
uuid_utoa (inode->gfid));
goto err;
}
@@ -155,7 +152,7 @@ err:
quota_dentry_t *
-__quota_dentry_new (quota_inode_ctx_t *ctx, char *name, ino_t par)
+__quota_dentry_new (quota_inode_ctx_t *ctx, char *name, uuid_t par)
{
quota_dentry_t *dentry = NULL;
GF_UNUSED int32_t ret = 0;
@@ -170,7 +167,7 @@ __quota_dentry_new (quota_inode_ctx_t *ctx, char *name, ino_t par)
goto err;
}
- dentry->par = par;
+ uuid_copy (dentry->par, par);
list_add_tail (&dentry->next, &ctx->parents);
err:
@@ -224,8 +221,7 @@ quota_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ctx = (quota_inode_ctx_t *)(unsigned long)value;
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context is not present in inode (ino:%"PRId64", "
- "gfid:%s)", local->validate_loc.inode->ino,
+ "quota context is not present in inode (gfid:%s)",
uuid_utoa (local->validate_loc.inode->gfid));
op_errno = EINVAL;
goto unwind;
@@ -302,7 +298,7 @@ quota_timeout (struct timeval *tv, int32_t timeout)
int32_t
quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
- char *name, ino_t par)
+ char *name, uuid_t par)
{
int32_t ret = -1;
inode_t *_inode = NULL, *parent = NULL;
@@ -315,6 +311,7 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
int32_t validate_count = 0, link_count = 0;
uint64_t value = 0;
char just_validated = 0;
+ uuid_t trav_uuid = {0,};
GF_VALIDATE_OR_GOTO ("quota", this, out);
GF_VALIDATE_OR_GOTO (this->name, frame, out);
@@ -345,6 +342,8 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
}
UNLOCK (&local->lock);
+ uuid_copy (trav_uuid, par);
+
do {
if (ctx != NULL) {
LOCK (&ctx->lock);
@@ -373,23 +372,22 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this,
}
}
- if (_inode->ino == 1) {
+ if (__is_root_gfid (_inode->gfid)) {
break;
}
- parent = inode_parent (_inode, par, name);
+ parent = inode_parent (_inode, trav_uuid, name);
if (name != NULL) {
name = NULL;
- par = 0;
+ uuid_clear (trav_uuid);
}
if (parent == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot find parent for inode (ino:%"PRId64", "
- "gfid:%s), hence aborting enforcing "
- "quota-limits and continuing with the fop",
- _inode->ino, uuid_utoa (_inode->gfid));
+ "cannot find parent for inode (gfid:%s), hence "
+ "aborting enforcing quota-limits and continuing"
+ " with the fop", uuid_utoa (_inode->gfid));
}
inode_unref (_inode);
@@ -442,9 +440,8 @@ validate:
ret = quota_inode_loc_fill (_inode, &local->validate_loc);
if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot fill loc for inode (ino:%"PRId64", "
- "gfid:%s), hence aborting quota-checks and "
- "continuing with the fop", _inode->ino,
+ "cannot fill loc for inode (gfid:%s), hence "
+ "aborting quota-checks and continuing with fop",
uuid_utoa (_inode->gfid));
local->validate_count--;
}
@@ -538,8 +535,8 @@ __quota_init_inode_ctx (inode_t *inode, int64_t limit, xlator_t *this,
ret = __inode_ctx_put (inode, this, (uint64_t )(long)ctx);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot set quota context in inode (ino:%"PRId64", "
- "gfid:%s)", inode->ino, uuid_utoa (inode->gfid));
+ "cannot set quota context in inode (gfid:%s)",
+ uuid_utoa (inode->gfid));
}
out:
return ret;
@@ -600,8 +597,7 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
buf, &ctx, 1);
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING, "cannot create quota "
- "context in inode(ino:%"PRId64", gfid:%s)",
- local->loc.inode->ino,
+ "context in inode(gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
@@ -631,8 +627,9 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
list_for_each_entry (dentry, &ctx->parents, next) {
- if ((strcmp (dentry->name, local->loc.name) == 0)
- && (local->loc.parent->ino == dentry->par)) {
+ if ((strcmp (dentry->name, local->loc.name) == 0) &&
+ (uuid_compare (local->loc.parent->gfid,
+ dentry->par) == 0)) {
found = 1;
break;
}
@@ -641,15 +638,13 @@ quota_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!found) {
dentry = __quota_dentry_new (ctx,
(char *)local->loc.name,
- local->loc.parent->ino);
+ local->loc.parent->gfid);
if (dentry == NULL) {
/*
gf_log (this->name, GF_LOG_WARNING,
"cannot create a new dentry (par:%"
PRId64", name:%s) for inode(ino:%"
PRId64", gfid:%s)",
- local->loc.parent->ino,
- local->loc.inode->ino,
uuid_utoa (local->loc.inode->gfid));
*/
op_ret = -1;
@@ -736,12 +731,14 @@ err:
void
-quota_update_size (xlator_t *this, inode_t *inode, char *name, ino_t par,
+quota_update_size (xlator_t *this, inode_t *inode, char *name, uuid_t par,
int64_t delta)
{
- inode_t *_inode = NULL, *parent = NULL;
- uint64_t value = 0;
- quota_inode_ctx_t *ctx = NULL;
+ inode_t *_inode = NULL;
+ inode_t *parent = NULL;
+ uint64_t value = 0;
+ quota_inode_ctx_t *ctx = NULL;
+ uuid_t trav_uuid = {0,};
GF_VALIDATE_OR_GOTO ("quota", this, out);
GF_VALIDATE_OR_GOTO (this->name, inode, out);
@@ -751,6 +748,7 @@ quota_update_size (xlator_t *this, inode_t *inode, char *name, ino_t par,
_inode = inode_ref (inode);
+ uuid_copy (trav_uuid, par);
do {
if ((ctx != NULL) && (ctx->limit >= 0)) {
LOCK (&ctx->lock);
@@ -760,22 +758,21 @@ quota_update_size (xlator_t *this, inode_t *inode, char *name, ino_t par,
UNLOCK (&ctx->lock);
}
- if (_inode->ino == 1) {
+ if (__is_root_gfid (_inode->gfid)) {
break;
}
- parent = inode_parent (_inode, par, name);
+ parent = inode_parent (_inode, trav_uuid, name);
if (parent == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot find parent for inode (ino:%"PRId64", "
- "gfid:%s), hence aborting size updation of "
- "parents",
- _inode->ino, uuid_utoa (_inode->gfid));
+ "cannot find parent for inode (gfid:%s), hence "
+ "aborting size updation of parents",
+ uuid_utoa (_inode->gfid));
}
if (name != NULL) {
name = NULL;
- par = 0;
+ uuid_clear (trav_uuid);
}
inode_unref (_inode);
@@ -823,9 +820,8 @@ quota_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
- uuid_utoa (local->loc.inode->gfid));
+ "quota context not set in %s (gfid:%s)",
+ local->loc.path, uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -907,8 +903,7 @@ quota_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = quota_inode_ctx_get (fd->inode, -1, this, NULL, NULL, &ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64", "
- "gfid:%s)", fd->inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -1091,8 +1086,8 @@ quota_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = quota_inode_ctx_get (inode, -1, this, NULL, buf, &ctx, 1);
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING, "cannot create quota "
- "context in inode(ino:%"PRId64", gfid:%s)",
- inode->ino, uuid_utoa (inode->gfid));
+ "context in inode(gfid:%s)",
+ uuid_utoa (inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
goto unwind;
@@ -1103,13 +1098,11 @@ quota_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ctx->buf = *buf;
dentry = __quota_dentry_new (ctx, (char *)local->loc.name,
- local->loc.parent->ino);
+ local->loc.parent->gfid);
if (dentry == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot create a new dentry (par:%"
- PRId64", name:%s) for inode(ino:%"
- PRId64", gfid:%s)", local->loc.parent->ino,
- local->loc.name, local->loc.inode->ino,
+ "cannot create a new dentry (name:%s) for "
+ "inode(gfid:%s)", local->loc.name,
uuid_utoa (local->loc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
@@ -1234,14 +1227,13 @@ quota_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
quota_update_size (this, local->loc.inode, (char *)local->loc.name,
- local->loc.parent->ino,
+ local->loc.parent->gfid,
(-(ctx->buf.ia_blocks * 512)));
out:
@@ -1308,8 +1300,8 @@ quota_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = quota_inode_ctx_get (inode, -1, this, NULL, NULL, &ctx, 0);
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING, "cannot find quota "
- "context in inode(ino:%"PRId64", gfid:%s)",
- inode->ino, uuid_utoa (inode->gfid));
+ "context in %s (gfid:%s)", local->loc.path,
+ uuid_utoa (inode->gfid));
op_ret = -1;
op_errno = EINVAL;
goto out;
@@ -1318,15 +1310,14 @@ quota_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&ctx->lock);
{
list_for_each_entry (dentry, &ctx->parents, next) {
- if ((strcmp (dentry->name, local->loc.name) == 0)
- && (local->loc.parent->ino == dentry->par)) {
+ if ((strcmp (dentry->name, local->loc.name) == 0) &&
+ (uuid_compare (local->loc.parent->gfid,
+ dentry->par) == 0)) {
found = 1;
gf_log (this->name, GF_LOG_WARNING,
- "new entry being linked (par:%"
- PRId64", name:%s) for inode (ino:%"
- PRId64", gfid:%s) is already present "
- "in inode-dentry-list", dentry->par,
- dentry->name, local->loc.inode->ino,
+ "new entry being linked (name:%s) for "
+ "inode (gfid:%s) is already present "
+ "in inode-dentry-list", dentry->name,
uuid_utoa (local->loc.inode->gfid));
break;
}
@@ -1335,15 +1326,11 @@ quota_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (!found) {
dentry = __quota_dentry_new (ctx,
(char *)local->loc.name,
- local->loc.parent->ino);
+ local->loc.parent->gfid);
if (dentry == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot create a new dentry (par:%"
- PRId64", name:%s) for inode(ino:%"
- PRId64", gfid:%s)",
- local->loc.parent->ino,
- local->loc.name,
- local->loc.inode->ino,
+ "cannot create a new dentry (name:%s) "
+ "for inode(gfid:%s)", local->loc.name,
uuid_utoa (local->loc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
@@ -1427,9 +1414,8 @@ quota_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", oldloc->inode?oldloc->inode->ino:0,
- oldloc->inode?uuid_utoa (oldloc->inode->gfid):"0");
+ "quota context not set in inode (gfid:%s)",
+ oldloc->inode ? uuid_utoa (oldloc->inode->gfid) : "0");
op_errno = EINVAL;
goto err;
}
@@ -1510,8 +1496,7 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING, "quota context not"
- "set in inode(ino:%"PRId64", gfid:%s)",
- local->oldloc.inode->ino,
+ "set in inode(gfid:%s)",
uuid_utoa (local->oldloc.inode->gfid));
op_ret = -1;
op_errno = EINVAL;
@@ -1527,19 +1512,19 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
* should be changed to set a new context in newloc->inode.
*/
list_for_each_entry (dentry, &ctx->parents, next) {
- if ((strcmp (dentry->name, local->oldloc.name) == 0)
- && (local->oldloc.parent->ino == dentry->par)) {
+ if ((strcmp (dentry->name, local->oldloc.name) == 0) &&
+ (uuid_compare (local->oldloc.parent->gfid,
+ dentry->par) == 0)) {
old_dentry = dentry;
- } else if ((strcmp (dentry->name, local->newloc.name)
- == 0) && (local->oldloc.parent->ino
- == dentry->par)) {
+ } else if ((strcmp (dentry->name,
+ local->newloc.name) == 0) &&
+ (uuid_compare (local->oldloc.parent->gfid,
+ dentry->par) == 0)) {
new_dentry_found = 1;
gf_log (this->name, GF_LOG_WARNING,
- "new entry being linked (par:%"
- PRId64", name:%s) for inode (ino:%"
- PRId64", gfid:%s) is already present "
- "in inode-dentry-list", dentry->par,
- dentry->name, local->newloc.inode->ino,
+ "new entry being linked (name:%s) for "
+ "inode (gfid:%s) is already present "
+ "in inode-dentry-list", dentry->name,
uuid_utoa (local->newloc.inode->gfid));
break;
}
@@ -1550,22 +1535,17 @@ quota_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
} else {
gf_log (this->name, GF_LOG_WARNING,
"dentry corresponding to the path just renamed "
- "(par:%"PRId64", name:%s) is not present",
- local->oldloc.inode->ino, local->oldloc.name);
+ "(name:%s) is not present", local->oldloc.name);
}
if (!new_dentry_found) {
dentry = __quota_dentry_new (ctx,
(char *)local->newloc.name,
- local->newloc.parent->ino);
+ local->newloc.parent->gfid);
if (dentry == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot create a new dentry (par:%"
- PRId64", name:%s) for inode(ino:%"
- PRId64", gfid:%s)",
- local->newloc.parent->ino,
- local->newloc.name,
- local->newloc.inode->ino,
+ "cannot create a new dentry (name:%s) "
+ "for inode(gfid:%s)", local->newloc.name,
uuid_utoa (local->newloc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
@@ -1658,11 +1638,9 @@ quota_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)",
- oldloc->inode ? oldloc->inode->ino:0,
+ "quota context not set in inode (gfid:%s)",
oldloc->inode ? uuid_utoa (oldloc->inode->gfid)
- :"0");
+ : "0");
op_errno = EINVAL;
goto err;
}
@@ -1725,8 +1703,7 @@ quota_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 1);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -1736,13 +1713,11 @@ quota_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ctx->buf = *buf;
dentry = __quota_dentry_new (ctx, (char *)local->loc.name,
- local->loc.parent->ino);
+ local->loc.parent->gfid);
if (dentry == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot create a new dentry (par:%"
- PRId64", name:%s) for inode(ino:%"
- PRId64", gfid:%s)", local->loc.parent->ino,
- local->loc.name, local->loc.inode->ino,
+ "cannot create a new dentry (name:%s) for "
+ "inode(gfid:%s)", local->loc.name,
uuid_utoa (local->loc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
@@ -1876,8 +1851,7 @@ quota_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -1952,8 +1926,7 @@ quota_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2093,8 +2066,7 @@ quota_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_DEBUG,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2161,8 +2133,7 @@ quota_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2226,8 +2197,7 @@ quota_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2295,8 +2265,7 @@ quota_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2361,8 +2330,7 @@ quota_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2426,8 +2394,7 @@ quota_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_DEBUG,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2498,8 +2465,7 @@ quota_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&ctx, 0);
if (ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "quota context not set in inode (ino:%"PRId64
- ", gfid:%s)", local->loc.inode->ino,
+ "quota context not set in inode (gfid:%s)",
uuid_utoa (local->loc.inode->gfid));
goto out;
}
@@ -2561,8 +2527,7 @@ quota_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = quota_inode_ctx_get (inode, -1, this, NULL, buf, &ctx, 1);
if ((ret == -1) || (ctx == NULL)) {
gf_log (this->name, GF_LOG_WARNING, "cannot create quota "
- "context in inode(ino:%"PRId64", gfid:%s)",
- inode->ino, uuid_utoa (inode->gfid));
+ "context in inode (gfid:%s)", uuid_utoa (inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
goto unwind;
@@ -2573,13 +2538,11 @@ quota_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ctx->buf = *buf;
dentry = __quota_dentry_new (ctx, (char *)local->loc.name,
- local->loc.parent->ino);
+ local->loc.parent->gfid);
if (dentry == NULL) {
gf_log (this->name, GF_LOG_WARNING,
- "cannot create a new dentry (par:%"
- PRId64", name:%s) for inode(ino:%"
- PRId64", gfid:%s)", local->loc.parent->ino,
- local->loc.name, local->loc.inode->ino,
+ "cannot create a new dentry (name:%s) for "
+ "inode(gfid:%s)", local->loc.name,
uuid_utoa (local->loc.inode->gfid));
op_ret = -1;
op_errno = ENOMEM;
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index b1e7d2192f5..9b94d592077 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -125,7 +125,7 @@
struct quota_dentry {
char *name;
- ino_t par;
+ uuid_t par;
struct list_head next;
};
typedef struct quota_dentry quota_dentry_t;
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
index 396c1c904e4..42ee79a9691 100644
--- a/xlators/features/trash/src/trash.c
+++ b/xlators/features/trash/src/trash.c
@@ -991,7 +991,6 @@ trash_truncate_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local->newloc.name = gf_strdup (loc_newname);
local->newloc.path = gf_strdup (local->newpath);
local->newloc.inode = inode_new (local->loc.inode->table);
- local->newloc.ino = local->newloc.inode->ino;
local->newfd = fd_create (local->newloc.inode, frame->root->pid);
flags = O_CREAT|O_EXCL|O_WRONLY;
@@ -1411,7 +1410,6 @@ trash_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
local->newloc.path = local->newpath;
local->loc.inode = inode_ref (fd->inode);
- local->loc.ino = fd->inode->ino;
local->loc.path = pathbuf;
local->fop_offset = offset;
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 54d09e6b260..0c91dd78797 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -247,8 +247,8 @@ fuse_lookup_resume (fuse_state_t *state)
if (state->loc.inode) {
gf_log ("glusterfs-fuse", GF_LOG_TRACE,
- "%"PRIu64": LOOKUP %s(%"PRId64")", state->finh->unique,
- state->loc.path, state->loc.inode->ino);
+ "%"PRIu64": LOOKUP %s(%s)", state->finh->unique,
+ state->loc.path, uuid_utoa (state->loc.inode->gfid));
state->is_revalidate = 1;
} else {
gf_log ("glusterfs-fuse", GF_LOG_TRACE,
@@ -1000,8 +1000,8 @@ void
fuse_readlink_resume (fuse_state_t *state)
{
gf_log ("glusterfs-fuse", GF_LOG_TRACE,
- "%"PRIu64" READLINK %s/%"PRId64, state->finh->unique,
- state->loc.path, state->loc.inode->ino);
+ "%"PRIu64" READLINK %s/%s", state->finh->unique,
+ state->loc.path, uuid_utoa (state->loc.inode->gfid));
FUSE_FOP (state, fuse_readlink_cbk, GF_FOP_READLINK,
readlink, &state->loc, 4096);
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index f40d1d6a50e..f0e9fb60296 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -244,7 +244,7 @@ fuse_ino_to_inode (uint64_t ino, xlator_t *fuse)
uint64_t
inode_to_fuse_nodeid (inode_t *inode)
{
- if (!inode || inode->ino == 1)
+ if (!inode || __is_root_gfid (inode->gfid))
return 1;
return (unsigned long) inode;
@@ -259,6 +259,7 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
inode_t *parent = NULL;
int32_t ret = -1;
char *path = NULL;
+ uuid_t null_gfid = {0,};
/* resistance against multiple invocation of loc_fill not to get
reference leaks via inode_search() */
@@ -279,8 +280,8 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
ret = inode_path (parent, name, &path);
if (ret <= 0) {
gf_log ("glusterfs-fuse", GF_LOG_DEBUG,
- "inode_path failed for %"PRId64"/%s",
- (parent)?parent->ino:0, name);
+ "inode_path failed for %s/%s",
+ (parent)?uuid_utoa (parent->gfid):"0", name);
goto fail;
}
loc->path = path;
@@ -293,23 +294,24 @@ fuse_loc_fill (loc_t *loc, fuse_state_t *state, ino_t ino,
parent = loc->parent;
if (!parent) {
- parent = inode_parent (inode, par, name);
+ parent = fuse_ino_to_inode (par, state->this);
+ if (!parent) {
+ parent = inode_parent (inode, null_gfid, NULL);
+ }
+
loc->parent = parent;
}
ret = inode_path (inode, NULL, &path);
if (ret <= 0) {
gf_log ("glusterfs-fuse", GF_LOG_DEBUG,
- "inode_path failed for %"PRId64,
- (inode)?inode->ino:0);
+ "inode_path failed for %s",
+ (inode) ? uuid_utoa (inode->gfid) : "0");
goto fail;
}
loc->path = path;
}
- if (inode)
- loc->ino = inode->ino;
-
if (loc->path) {
loc->name = strrchr (loc->path, '/');
if (loc->name)
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index 89634af94c8..1b9fcfd103e 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -353,8 +353,8 @@ mnt3svc_mount_inode (rpcsvc_request_t *req, struct mount3_state *ms,
ret = nfs_inode_loc_fill (exportinode, &exportloc);
if (ret < 0) {
gf_log (GF_MNT, GF_LOG_ERROR, "Loc fill failed for export inode"
- ": ino %"PRIu64", volume: %s",
- exportinode->ino, xl->name);
+ ": gfid %s, volume: %s",
+ uuid_utoa (exportinode->gfid), xl->name);
goto err;
}
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c
index 1c0fb175591..61dfeacf122 100644
--- a/xlators/nfs/server/src/nfs-common.c
+++ b/xlators/nfs/server/src/nfs-common.c
@@ -158,8 +158,6 @@ nfs_loc_wipe (loc_t *loc)
inode_unref (loc->inode);
loc->inode = NULL;
}
-
- loc->ino = 0;
}
@@ -168,8 +166,6 @@ nfs_loc_copy (loc_t *dst, loc_t *src)
{
int ret = -1;
- dst->ino = src->ino;
-
if (src->inode)
dst->inode = inode_ref (src->inode);
@@ -211,7 +207,6 @@ nfs_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path)
if (inode) {
loc->inode = inode_ref (inode);
- loc->ino = inode->ino;
}
if (parent)
@@ -250,7 +245,7 @@ nfs_inode_loc_fill (inode_t *inode, loc_t *loc)
if ((!inode) || (!loc))
return ret;
- if ((inode) && (inode->ino == 1))
+ if ((inode) && __is_root_gfid (inode->gfid))
goto ignore_parent;
parent = inode_parent (inode, 0, NULL);
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c
index 95a657a1280..d9b419c4e16 100644
--- a/xlators/nfs/server/src/nfs-fops.c
+++ b/xlators/nfs/server/src/nfs-fops.c
@@ -152,21 +152,22 @@ err:
* for us to determine in the callback whether to funge the ino in the stat buf
* with 1 for the parent.
*/
-#define nfs_fop_save_root_ino(locl, loc) \
- do { \
- if ((loc)->ino == 1) \
- (locl)->rootinode = 1; \
- else if (((loc)->parent) && ((loc)->parent->ino == 1)) \
- (locl)->rootparentinode = 1; \
- } while (0) \
+#define nfs_fop_save_root_ino(locl, loc) \
+ do { \
+ if (((loc)->inode) && \
+ __is_root_gfid ((loc)->inode->gfid)) \
+ (locl)->rootinode = 1; \
+ else if (((loc)->parent) && \
+ __is_root_gfid ((loc)->parent->gfid)) \
+ (locl)->rootparentinode = 1; \
+ } while (0)
/* Do the same for an fd */
-#define nfs_fop_save_root_fd_ino(locl, fdesc) \
- do { \
- if ((fdesc)->inode->ino == 1) \
- (locl)->rootinode = 1; \
- } while (0) \
-
+#define nfs_fop_save_root_fd_ino(locl, fdesc) \
+ do { \
+ if (__is_root_gfid ((fdesc)->inode->gfid)) \
+ (locl)->rootinode = 1; \
+ } while (0)
/* Use the state saved by the previous macro to funge the ino in the appropriate
@@ -200,14 +201,15 @@ err:
/* If the newly created, inode's parent is root, we'll need to funge the ino
* in the parent attr when we receive them in the callback.
*/
-#define nfs_fop_newloc_save_root_ino(locl, newloc) \
- do { \
- if ((newloc)->ino == 1) \
- (locl)->newrootinode = 1; \
- else if (((newloc)->parent) && ((newloc)->parent->ino == 1)) \
- (locl)->newrootparentinode = 1; \
- } while (0) \
-
+#define nfs_fop_newloc_save_root_ino(locl, newloc) \
+ do { \
+ if (((newloc)->inode) && \
+ __is_root_gfid ((newloc)->inode->gfid)) \
+ (locl)->newrootinode = 1; \
+ else if (((newloc)->parent) && \
+ __is_root_gfid ((newloc)->parent->gfid)) \
+ (locl)->newrootparentinode = 1; \
+ } while (0)
#define nfs_fop_newloc_restore_root_ino(locl, fopret, preattr, postattr, prepar, postpar) \
do { \
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 751f00670a5..900321000b2 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -740,7 +740,7 @@ nfs3_getattr_resume (void *carg)
* sent. AND, this causes a problem for stat-prefetch in that it
* expects even the root inode to have been looked up.
*/
- if (cs->resolvedloc.inode->ino == 1)
+ if (__is_root_gfid (cs->resolvedloc.inode->gfid))
ret = nfs_lookup (cs->nfsx, cs->vol, &nfu, &cs->resolvedloc,
nfs3svc_getattr_lookup_cbk, cs);
else
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 8b32a4f0637..009e7cf28e1 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1045,8 +1045,8 @@ ioc_dispatch_requests (call_frame_t *frame, ioc_inode_t *ioc_inode, fd_t *fd,
need_validate = 0;
gf_log (frame->this->name, GF_LOG_TRACE,
"sending validate request for "
- "inode(%"PRId64") at offset=%"PRId64"",
- fd->inode->ino, trav_offset);
+ "inode(%s) at offset=%"PRId64"",
+ uuid_utoa (fd->inode->gfid), trav_offset);
ret = ioc_cache_validate (frame, ioc_inode, fd, trav);
if (ret == -1) {
ioc_inode_lock (ioc_inode);
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 1d7a04e9554..fb12b24c04c 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -94,7 +94,6 @@ qr_loc_fill (loc_t *loc, inode_t *inode, char *path)
loc->inode = inode_ref (inode);
loc->path = gf_strdup (path);
- loc->ino = inode->ino;
path_copy = gf_strdup (path);
if (path_copy == NULL) {
@@ -397,8 +396,8 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
op_errno = EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"cannot set quick-read context in "
- "inode (ino:%"PRId64" gfid:%s)",
- inode->ino, inode->gfid);
+ "inode (gfid:%s)",
+ uuid_utoa (inode->gfid));
goto unlock;
}
} else {
@@ -408,8 +407,8 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
op_errno = EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"cannot find quick-read context in "
- "inode (ino:%"PRId64" gfid:%s)",
- inode->ino, uuid_utoa (inode->gfid));
+ "inode (gfid:%s)",
+ uuid_utoa (inode->gfid));
goto unlock;
}
}
@@ -586,8 +585,7 @@ qr_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
op_errno = EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"cannot find quick-read context in fd (%p) opened on "
- "inode (ino:%"PRId64" gfid: %s", fd, fd->inode->ino,
- uuid_utoa (fd->inode->gfid));
+ "inode (gfid: %s)", fd, uuid_utoa (fd->inode->gfid));
goto out;
}
@@ -700,8 +698,8 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
op_errno = EINVAL;
gf_log (this->name, GF_LOG_WARNING,
"cannot set quick-read context in "
- "fd (%p) opened on inode (ino:%"PRId64" gfid:%s)", fd,
- fd->inode->ino, uuid_utoa (fd->inode->gfid));
+ "fd (%p) opened on inode (gfid:%s)", fd,
+ uuid_utoa (fd->inode->gfid));
goto unwind;
}
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index c98a2076b8c..563da9e7267 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -110,8 +110,7 @@ sp_update_inode_ctx (xlator_t *this, inode_t *inode, int32_t *op_ret,
gf_log (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", inode->ino,
- uuid_utoa (inode->gfid));
+ "(gfid:%s)", uuid_utoa (inode->gfid));
goto out;
}
@@ -172,9 +171,9 @@ sp_check_and_create_inode_ctx (xlator_t *this, inode_t *inode,
gf_log_callingfn (this->name, GF_LOG_WARNING,
"stat-prefetch context is "
"present in inode "
- "(ino:%"PRId64" gfid:%s) "
+ "(gfid:%s) "
"when it is supposed to be "
- "not present", inode->ino,
+ "not present",
uuid_utoa (inode->gfid));
}
} else {
@@ -182,9 +181,9 @@ sp_check_and_create_inode_ctx (xlator_t *this, inode_t *inode,
gf_log_callingfn (this->name, GF_LOG_WARNING,
"stat-prefetch context is "
"not present in inode "
- "(ino:%"PRId64" gfid:%s)"
+ "(gfid:%s)"
" when it is supposed to be "
- "present", inode->ino,
+ "present",
uuid_utoa (inode->gfid));
}
@@ -277,8 +276,7 @@ sp_process_inode_ctx (call_frame_t *frame, xlator_t *this, loc_t *loc,
if (inode_ctx == NULL) {
gf_log_callingfn (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
- uuid_utoa (loc->inode->gfid));
+ "(gfid:%s)", uuid_utoa (loc->inode->gfid));
*can_wind = 1;
*need_unwind = 0;
op_errno = 0;
@@ -752,9 +750,8 @@ __sp_put_cache (xlator_t *this, fd_t *fd, sp_cache_t *cache)
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"cannot set stat-prefetch context in fd (%p) "
- "opened on inode (ino:%"PRId64" gfid:%s)",
- fd, fd->inode->ino,
- uuid_utoa (fd->inode->gfid));
+ "opened on inode (gfid:%s)",
+ fd, uuid_utoa (fd->inode->gfid));
sp_fd_ctx_free (fd_ctx);
goto out;
}
@@ -1048,8 +1045,7 @@ sp_lookup_helper (call_frame_t *frame,xlator_t *this, loc_t *loc,
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
- uuid_utoa (loc->inode->gfid));
+ "(gfid:%s)", uuid_utoa (loc->inode->gfid));
op_errno = EINVAL;
goto unwind;
}
@@ -1133,9 +1129,9 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req)
if (inode_ctx == NULL) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_WARNING,
- "cannot create stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s)(%s)", loc->inode->ino,
- loc->inode->gfid, strerror (op_errno));
+ "cannot create stat-prefetch context in inode "
+ "(gfid:%s)(%s)",
+ uuid_utoa (loc->inode->gfid), strerror (op_errno));
goto unwind;
}
@@ -1322,8 +1318,7 @@ sp_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_log (this->name, GF_LOG_WARNING,
"creation of stat-prefetch cache "
"for fd (%p) opened on inode "
- "(ino:%"PRId64", gfid:%s) failed", fd,
- fd->inode->ino,
+ "(gfid:%s) failed", fd,
uuid_utoa (fd->inode->gfid));
goto unlock;
}
@@ -1333,8 +1328,7 @@ sp_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
sp_cache_free (cache);
gf_log (this->name, GF_LOG_WARNING,
"cannot store cache in fd (%p) opened "
- "on inode (ino:%"PRId64", gfid:%s)", fd,
- fd->inode->ino,
+ "on inode (gfid:%s)", fd,
uuid_utoa (fd->inode->gfid));
goto unlock;
}
@@ -1384,8 +1378,7 @@ sp_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
if (ret < 0) {
op_errno = -ret;
gf_log (this->name, GF_LOG_WARNING, "cannot construct path on "
- "which fd (%p) is opened (fd.inode.ino = %"PRId64", "
- "fd.inode.gfid = %s) (%s)", fd, fd->inode->ino,
+ "which fd (%p) is opened (gfid = %s) (%s)", fd,
uuid_utoa (fd->inode->gfid), strerror (op_errno));
goto unwind;
}
@@ -1498,8 +1491,7 @@ sp_fd_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"cannot set stat-prefetch context in fd (%p) opened on "
- "inode (ino:%"PRId64", gfid:%s)", fd, fd->inode->ino,
- uuid_utoa (fd->inode->gfid));
+ "inode (gfid:%s)", fd, uuid_utoa (fd->inode->gfid));
sp_fd_ctx_free (fd_ctx);
op_errno = ENOMEM;
}
@@ -1526,8 +1518,7 @@ sp_open_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
- uuid_utoa (loc->inode->gfid));
+ "(gfid:%s)", uuid_utoa (loc->inode->gfid));
op_errno = EINVAL;
goto unwind;
}
@@ -1653,9 +1644,8 @@ sp_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&looked_up, buf, NULL, &op_errno);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "updating stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s) (path: %s) failed (%s)",
- local->loc.inode->ino,
+ "updating stat-prefetch context in inode "
+ "(gfid:%s) (path: %s) failed (%s)",
uuid_utoa (local->loc.inode->gfid), local->loc.path,
strerror (op_errno));
goto out;
@@ -1683,8 +1673,7 @@ sp_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"cannot set stat-prefetch context in fd (%p) opened on "
- "inode (ino:%"PRId64", gfid:%s)", fd, fd->inode->ino,
- uuid_utoa (fd->inode->gfid));
+ "inode (gfid:%s)", fd, uuid_utoa (fd->inode->gfid));
sp_fd_ctx_free (fd_ctx);
op_errno = ENOMEM;
}
@@ -1740,9 +1729,9 @@ sp_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
if (inode_ctx == NULL) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_WARNING,
- "cannot create stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s)(%s)", loc->inode->ino,
- loc->inode->gfid, strerror (op_errno));
+ "cannot create stat-prefetch context in inode "
+ "(gfid:%s)(%s)", uuid_utoa (loc->inode->gfid),
+ strerror (op_errno));
goto out;
}
@@ -1776,8 +1765,7 @@ sp_opendir_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
- uuid_utoa (loc->inode->gfid));
+ "(gfid:%s)", uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -1898,9 +1886,8 @@ sp_new_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
&looked_up, buf, NULL, &op_errno);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "updating stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s) (path: %s) failed (%s)",
- local->loc.inode->ino,
+ "updating stat-prefetch context in inode "
+ "(gfid:%s) (path: %s) failed (%s)",
uuid_utoa (local->loc.inode->gfid), local->loc.path,
strerror (op_errno));
goto out;
@@ -1967,9 +1954,9 @@ sp_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
if (inode_ctx == NULL) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_WARNING,
- "cannot create stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s)(%s)", loc->inode->ino,
- loc->inode->gfid, strerror (op_errno));
+ "cannot create stat-prefetch context in inode "
+ "(gfid:%s)(%s)", uuid_utoa (loc->inode->gfid),
+ strerror (op_errno));
goto out;
}
@@ -2033,9 +2020,9 @@ sp_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
if (inode_ctx == NULL) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_WARNING,
- "cannot create stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s)(%s)", loc->inode->ino,
- loc->inode->gfid, strerror (op_errno));
+ "cannot create stat-prefetch context in inode "
+ "(gfid:%s)(%s)", uuid_utoa (loc->inode->gfid),
+ strerror (op_errno));
goto out;
}
@@ -2102,9 +2089,8 @@ sp_symlink (call_frame_t *frame, xlator_t *this, const char *linkpath,
if (inode_ctx == NULL) {
op_errno = ENOMEM;
gf_log (this->name, GF_LOG_WARNING,
- "cannot create stat-prefetch context in inode (ino:%"
- PRId64", gfid:%s)(%s)", loc->inode->ino,
- loc->inode->gfid, strerror (op_errno));
+ "%s: cannot create stat-prefetch context (gfid:%s)(%s)",
+ loc->path, loc->inode->gfid, strerror (op_errno));
goto out;
}
@@ -2153,8 +2139,7 @@ sp_link_helper (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
ret = inode_ctx_get (oldloc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", oldloc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (oldloc->inode->gfid));
goto unwind;
}
@@ -2258,8 +2243,7 @@ sp_truncate_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -2350,8 +2334,7 @@ sp_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset)
ret = fd_ctx_get (fd, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "stat-prefetch context not "
- "set in fd (%p) opened on inode (ino:%"PRId64", "
- "gfid:%s", fd, fd->inode->ino,
+ "set in fd (%p) opened on inode (gfid:%s)", fd,
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -2399,8 +2382,7 @@ sp_setattr_helper (call_frame_t *frame, xlator_t *this,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
op_errno = EINVAL;
goto unwind;
@@ -2502,8 +2484,7 @@ sp_readlink_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -2612,8 +2593,7 @@ sp_unlink_helper (call_frame_t *frame, xlator_t *this, loc_t *loc)
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -2707,8 +2687,7 @@ sp_rmdir_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags)
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -2820,8 +2799,7 @@ sp_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
ret = fd_ctx_get (fd, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "stat-prefetch context not "
- "set in fd (%p) opened on inode (ino:%"PRId64", "
- "gfid:%s", fd, fd->inode->ino,
+ "set in fd (%p) opened on inode (gfid:%s)", fd,
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -2859,8 +2837,7 @@ sp_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector,
ret = fd_ctx_get (fd, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "stat-prefetch context not "
- "set in fd (%p) opened on inode (ino:%"PRId64", "
- "gfid:%s", fd, fd->inode->ino,
+ "set in fd (%p) opened on inode (gfid:%s)", fd,
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -2898,8 +2875,7 @@ sp_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags)
ret = fd_ctx_get (fd, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "stat-prefetch context not "
- "set in fd (%p) opened on inode (ino:%"PRId64", "
- "gfid:%s", fd, fd->inode->ino,
+ "set in fd (%p) opened on inode (gfid:%s)", fd,
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -2942,8 +2918,7 @@ sp_rename_helper (call_frame_t *frame, xlator_t *this, loc_t *oldloc,
ret = inode_ctx_get (oldloc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", oldloc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (oldloc->inode->gfid));
goto unwind;
}
@@ -3104,8 +3079,7 @@ sp_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,loc_t *newloc)
&op_errno);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "processing stat-prefetch "
- "context in inode (ino:%"PRId64", gfid:%s) (path:%s) "
- "failed (%s)", oldloc->inode->ino,
+ "context in inode (gfid:%s) (path:%s) failed (%s)",
uuid_utoa (oldloc->inode->gfid), oldloc->path,
strerror (op_errno));
goto out;
@@ -3130,8 +3104,7 @@ sp_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,loc_t *newloc)
if (inode_ctx == NULL) {
gf_log (this->name, GF_LOG_WARNING,
"stat-prefetch context not set in inode"
- " (ino:%"PRId64", gfid:%s) (path:%s)",
- oldloc->inode->ino,
+ " (gfid:%s) (path:%s)",
uuid_utoa (oldloc->inode->gfid),
oldloc->path);
goto out;
@@ -3192,8 +3165,7 @@ sp_setxattr_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3282,8 +3254,7 @@ sp_removexattr_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3380,8 +3351,7 @@ sp_getxattr_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3475,8 +3445,7 @@ sp_xattrop_helper (call_frame_t *frame, xlator_t *this, loc_t *loc,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3566,8 +3535,7 @@ sp_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = fd_ctx_get (fd, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING, "stat-prefetch context not "
- "set in fd (%p) opened on inode (ino:%"PRId64", "
- "gfid:%s", fd, fd->inode->ino,
+ "set in fd (%p) opened on inode (gfid:%s", fd,
uuid_utoa (fd->inode->gfid));
goto unwind;
}
@@ -3611,8 +3579,7 @@ sp_stat_helper (call_frame_t *frame, xlator_t *this, loc_t *loc)
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3696,8 +3663,7 @@ sp_access_helper (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask)
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3782,8 +3748,7 @@ sp_inodelk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
@@ -3872,8 +3837,7 @@ sp_entrylk_helper (call_frame_t *frame, xlator_t *this, const char *volume,
ret = inode_ctx_get (loc->inode, this, &value);
if (ret == -1) {
gf_log (this->name, GF_LOG_WARNING,
- "stat-prefetch context not set in inode "
- "(ino:%"PRId64" gfid:%s)", loc->inode->ino,
+ "stat-prefetch context not set in inode (gfid:%s)",
uuid_utoa (loc->inode->gfid));
goto unwind;
}
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c
index 22d4f1a9f56..2a12573e2bb 100644
--- a/xlators/protocol/client/src/client-helpers.c
+++ b/xlators/protocol/client/src/client-helpers.c
@@ -79,8 +79,8 @@ this_fd_set_ctx (fd_t *file, xlator_t *this, loc_t *loc, clnt_fd_ctx_t *ctx)
if (ret >= 0) {
if (loc)
gf_log (this->name, GF_LOG_INFO,
- "%s (%"PRId64"): trying duplicate remote fd set. ",
- loc->path, loc->inode->ino);
+ "%s (%s): trying duplicate remote fd set. ",
+ loc->path, uuid_utoa (loc->inode->gfid));
else
gf_log (this->name, GF_LOG_INFO,
"%p: trying duplicate remote fd set. ", file);
@@ -90,8 +90,8 @@ this_fd_set_ctx (fd_t *file, xlator_t *this, loc_t *loc, clnt_fd_ctx_t *ctx)
if (ret < 0) {
if (loc)
gf_log (this->name, GF_LOG_WARNING,
- "%s (%"PRId64"): failed to set remote fd",
- loc->path, loc->inode->ino);
+ "%s (%s): failed to set remote fd",
+ loc->path, uuid_utoa (loc->inode->gfid));
else
gf_log (this->name, GF_LOG_WARNING,
"%p: failed to set remote fd", file);
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c
index fe58786f78d..2d5e621d449 100644
--- a/xlators/protocol/client/src/client3_1-fops.c
+++ b/xlators/protocol/client/src/client3_1-fops.c
@@ -2216,9 +2216,8 @@ client3_1_lookup_cbk (struct rpc_req *req, struct iovec *iov, int count,
ret = dict_unserialize (buf, rsp.dict.dict_len, &xattr);
if (ret < 0) {
gf_log (frame->this->name, GF_LOG_WARNING,
- "%s (%"PRId64"): failed to "
- "unserialize dictionary",
- local->loc.path, inode->ino);
+ "%s (%s): failed to unserialize dictionary",
+ local->loc.path, uuid_utoa (inode->gfid));
op_errno = EINVAL;
goto out;
}
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index 33ec45b6f43..600d73cce81 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -345,8 +345,7 @@ do_lock_table_cleanup (xlator_t *this, server_connection_t *conn,
} else {
gf_log (this->name, GF_LOG_INFO, "finodelk "
- "released on ino %"PRId64" with gfid %s",
- locker->fd->inode->ino,
+ "released on inode with gfid %s",
uuid_utoa (locker->fd->inode->gfid));
}
@@ -393,7 +392,8 @@ do_lock_table_cleanup (xlator_t *this, server_connection_t *conn,
} else {
gf_log (this->name, GF_LOG_INFO, "fentrylk "
- "released on ino %lu", locker->fd->inode->ino);
+ "released on inode with gfid %s",
+ uuid_utoa (locker->fd->inode->gfid));
}
STACK_WIND (tmp_frame, server_nop_cbk, bound_xl,
@@ -486,9 +486,8 @@ do_fd_cleanup (xlator_t *this, server_connection_t *conn, call_frame_t *frame,
GF_FREE (path);
} else {
- gf_log (this->name, GF_LOG_INFO, "fd cleanup on "
- "ino %"PRId64" with gfid %s",
- fd->inode->ino,
+ gf_log (this->name, GF_LOG_INFO, "fd cleanup on"
+ " inode with gfid %s",
uuid_utoa (fd->inode->gfid));
}
@@ -666,8 +665,7 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn)
} else {
gf_log (this->name, GF_LOG_INFO, "finodelk "
- "released on ino %"PRId64 "with gfid %s",
- locker->fd->inode->ino,
+ "released on inode with gfid %s",
uuid_utoa (locker->fd->inode->gfid));
}
@@ -714,8 +712,7 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn)
} else {
gf_log (this->name, GF_LOG_INFO, "fentrylk "
- "released on ino %"PRId64" and gfid= %s",
- locker->fd->inode->ino,
+ "released on inode with gfid %s",
uuid_utoa (locker->fd->inode->gfid));
}
@@ -1108,15 +1105,6 @@ server_print_resolve (char *str, int size, server_resolve_t *resolve)
if (resolve->fd_no != -1)
filled += snprintf (str + filled, size - filled,
"fd=%"PRId64",", (uint64_t) resolve->fd_no);
- if (resolve->ino)
- filled += snprintf (str + filled, size - filled,
- "ino=%"PRIu64",", (uint64_t) resolve->ino);
- if (resolve->par)
- filled += snprintf (str + filled, size - filled,
- "par=%"PRIu64",", (uint64_t) resolve->par);
- if (resolve->gen)
- filled += snprintf (str + filled, size - filled,
- "gen=%"PRIu64",", (uint64_t) resolve->gen);
if (resolve->bname)
filled += snprintf (str + filled, size - filled,
"bname=%s,", resolve->bname);
@@ -1217,15 +1205,6 @@ server_resolve_is_empty (server_resolve_t *resolve)
if (resolve->fd_no != -1)
return 0;
- if (resolve->ino != 0)
- return 0;
-
- if (resolve->gen != 0)
- return 0;
-
- if (resolve->par != 0)
- return 0;
-
if (resolve->path != 0)
return 0;
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index 550a1b8ee5c..50ae9231c33 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -76,8 +76,6 @@ prepare_components (call_frame_t *frame)
resolve->components = components;
components[0].basename = "";
- components[0].ino = 1;
- components[0].gen = 0;
components[0].inode = state->itable->root;
i = 1;
@@ -405,9 +403,9 @@ resolve_entry_simple (call_frame_t *frame)
}
if (resolve->type == RESOLVE_NOT) {
- gf_log (this->name, GF_LOG_DEBUG, "inode (pointer: %p ino:%"
- PRIu64") found for path (%s) while type is RESOLVE_NOT",
- inode, inode->ino, resolve->path);
+ gf_log (this->name, GF_LOG_DEBUG, "inode (pointer: %p gfid:%s"
+ " found for path (%s) while type is RESOLVE_NOT",
+ inode, uuid_utoa (inode->gfid), resolve->path);
resolve->op_ret = -1;
resolve->op_errno = EEXIST;
ret = -1;
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h
index 807b87a3578..17de0e8d50d 100644
--- a/xlators/protocol/server/src/server.h
+++ b/xlators/protocol/server/src/server.h
@@ -114,17 +114,12 @@ typedef enum {
struct resolve_comp {
char *basename;
- ino_t ino;
- uint64_t gen;
inode_t *inode;
};
typedef struct {
server_resolve_type_t type;
uint64_t fd_no;
- ino_t ino;
- uint64_t gen;
- ino_t par;
u_char gfid[16];
u_char pargfid[16];
char *path;
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index a23efaadd39..60444061d86 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -97,9 +97,9 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.dict.dict_len = dict_serialized_length (dict);
if (rsp.dict.dict_len < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to get serialized "
+ "%s (%s): failed to get serialized "
"length of reply dict",
- state->loc.path, state->loc.inode->ino);
+ state->loc.path, uuid_utoa (state->loc.inode->gfid));
op_ret = -1;
op_errno = EINVAL;
rsp.dict.dict_len = 0;
@@ -117,8 +117,8 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = dict_serialize (dict, rsp.dict.dict_val);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to serialize reply dict",
- state->loc.path, state->loc.inode->ino);
+ "%s (%s): failed to serialize reply dict",
+ state->loc.path, uuid_utoa (state->loc.inode->gfid));
op_ret = -1;
op_errno = -ret;
rsp.dict.dict_len = 0;
@@ -141,7 +141,7 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.stat, stbuf);
- if (inode->ino != 1) {
+ if (!__is_root_gfid (inode->gfid)) {
link_inode = inode_link (inode, state->loc.parent,
state->loc.name, stbuf);
inode_lookup (link_inode);
@@ -149,7 +149,7 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
} else {
if (state->is_revalidate && op_errno == ENOENT) {
- if (state->loc.inode->ino != 1) {
+ if (!__is_root_gfid (state->loc.inode->gfid)) {
inode_unlink (state->loc.inode,
state->loc.parent,
state->loc.name);
@@ -163,10 +163,10 @@ out:
if (op_ret) {
gf_log (this->name,
((op_errno == ENOENT) ? GF_LOG_TRACE : GF_LOG_INFO),
- "%"PRId64": LOOKUP %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": LOOKUP %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -214,10 +214,10 @@ server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_proto_flock_from_flock (&rsp.flock, lock);
} else if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": LK %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": LK %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -247,17 +247,18 @@ server_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret >= 0) {
if (state->flock.l_type == F_UNLCK)
gf_del_locker (conn->ltable, state->volume,
- &state->loc, NULL, frame->root->lk_owner, GF_FOP_INODELK);
+ &state->loc, NULL, frame->root->lk_owner,
+ GF_FOP_INODELK);
else
gf_add_locker (conn->ltable, state->volume,
&state->loc, NULL, frame->root->pid,
frame->root->lk_owner, GF_FOP_INODELK);
} else if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": INODELK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": INODELK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -296,10 +297,10 @@ server_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
frame->root->lk_owner, GF_FOP_INODELK);
} else if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FINODELK %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FINODELK %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -335,10 +336,10 @@ server_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
frame->root->lk_owner, GF_FOP_ENTRYLK);
} else if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": ENTRYLK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": ENTRYLK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -373,11 +374,11 @@ server_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
frame->root->lk_owner, GF_FOP_ENTRYLK);
} else if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FENTRYLK %"PRId64" (%"PRId64") "
+ "%"PRId64": FENTRYLK %"PRId64" (%s) "
" ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -403,10 +404,10 @@ server_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.op_errno = gf_errno_to_error (op_errno);
if (op_ret)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": ACCESS %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": ACCESS %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gf_common_rsp);
@@ -444,10 +445,10 @@ server_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.postparent, postparent);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RMDIR %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": RMDIR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -552,10 +553,10 @@ server_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSYNCDIR %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FSYNCDIR %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -586,10 +587,10 @@ server_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
} else {
/* (op_ret == 0) is valid, and means EOF, don't log for that */
gf_log (this->name, (op_ret) ? GF_LOG_INFO : GF_LOG_TRACE,
- "%"PRId64": READDIR %"PRId64" (%"PRId64") ==> %"PRId32
+ "%"PRId64": READDIR %"PRId64" (%s) ==> %"PRId32
" (%s)", frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
unwind:
rsp.op_ret = op_ret;
@@ -642,10 +643,10 @@ server_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
fd_ref (fd); // on behalf of the client
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": OPENDIR %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": OPENDIR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
req = frame->local;
@@ -675,10 +676,10 @@ server_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.op_errno = gf_errno_to_error (op_errno);
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": REMOVEXATTR %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": REMOVEXATTR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gf_common_rsp);
@@ -702,9 +703,9 @@ server_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
len = dict_serialized_length (dict);
if (len < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to get serialized length of "
- "reply dict",
- state->loc.path, state->resolve.ino);
+ "%s (%s): failed to get serialized length of "
+ "reply dict", state->loc.path,
+ uuid_utoa (state->resolve.gfid));
op_ret = -1;
op_errno = EINVAL;
len = 0;
@@ -722,8 +723,8 @@ server_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = dict_serialize (dict, rsp.dict.dict_val);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to serialize reply dict",
- state->loc.path, state->resolve.ino);
+ "%s (%s): failed to serialize reply dict",
+ state->loc.path, uuid_utoa (state->resolve.gfid));
op_ret = -1;
op_errno = EINVAL;
len = 0;
@@ -767,9 +768,9 @@ server_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
len = dict_serialized_length (dict);
if (len < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to get serialized "
+ "%s (%s): failed to get serialized "
"length of reply dict",
- state->loc.path, state->resolve.ino);
+ state->loc.path, uuid_utoa (state->resolve.gfid));
op_ret = -1;
op_errno = EINVAL;
len = 0;
@@ -785,8 +786,8 @@ server_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = dict_serialize (dict, rsp.dict.dict_val);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to serialize reply dict",
- state->loc.path, state->resolve.ino);
+ "%s (%s): failed to serialize reply dict",
+ state->loc.path, uuid_utoa (state->resolve.gfid));
op_ret = -1;
op_errno = -ret;
len = 0;
@@ -830,10 +831,10 @@ server_setxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SETXATTR %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": SETXATTR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gf_common_rsp);
@@ -857,10 +858,10 @@ server_fsetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSETXATTR %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FSETXATTR %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gf_common_rsp);
@@ -886,15 +887,12 @@ server_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE(frame);
if (op_ret == 0) {
- stbuf->ia_ino = state->loc.inode->ino;
stbuf->ia_type = state->loc.inode->ia_type;
+ /* TODO: log gfid of the inodes */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": RENAME_CBK (%"PRId64") %"PRId64"/%s "
- "==> %"PRId64"/%s",
- frame->root->unique, state->loc.inode->ino,
- state->loc.parent->ino, state->loc.name,
- state->loc2.parent->ino, state->loc2.name);
+ "%"PRId64": RENAME_CBK %s ==> %s",
+ frame->root->unique, state->loc.name, state->loc2.name);
inode_rename (state->itable,
state->loc.parent, state->loc.name,
@@ -911,10 +909,10 @@ server_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RENAME %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": RENAME %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_rename_rsp);
@@ -940,10 +938,10 @@ server_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE(frame);
if (op_ret == 0) {
+ /* TODO: log gfid of the inodes */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": UNLINK_CBK %"PRId64"/%s (%"PRId64")",
- frame->root->unique, state->loc.parent->ino,
- state->loc.name, state->loc.inode->ino);
+ "%"PRId64": UNLINK_CBK %s",
+ frame->root->unique, state->loc.name);
inode_unlink (state->loc.inode, state->loc.parent,
state->loc.name);
@@ -959,10 +957,10 @@ server_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": UNLINK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": UNLINK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -999,10 +997,10 @@ server_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_unref (link_inode);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SYMLINK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": SYMLINK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1031,7 +1029,6 @@ server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE(frame);
if (op_ret == 0) {
- stbuf->ia_ino = state->loc.inode->ino;
gf_stat_from_iatt (&rsp.stat, stbuf);
gf_stat_from_iatt (&rsp.preparent, preparent);
@@ -1045,10 +1042,10 @@ server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": LINK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": LINK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_link_rsp);
@@ -1077,10 +1074,10 @@ server_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.poststat, postbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": TRUNCATE %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": TRUNCATE %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1108,10 +1105,10 @@ server_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.stat, stbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSTAT %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FSTAT %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1141,10 +1138,10 @@ server_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.poststat, postbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FTRUNCATE %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FTRUNCATE %"PRId64" (%s)==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1169,10 +1166,10 @@ server_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE(frame);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FLUSH %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FLUSH %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1203,10 +1200,10 @@ server_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&(rsp.poststat), postbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSYNC %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FSYNC %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1235,10 +1232,10 @@ server_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.poststat, postbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": WRITEV %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": WRITEV %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1269,10 +1266,10 @@ server_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.size = op_ret;
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READV %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": READV %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, vector, count, iobref,
@@ -1304,10 +1301,10 @@ server_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RCHECKSUM %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": RCHECKSUM %"PRId64" (%s)==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_rchecksum_rsp);
@@ -1335,10 +1332,10 @@ server_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
fd_ref (fd);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": OPEN %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": OPEN %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
req = frame->local;
@@ -1370,10 +1367,11 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
state = CALL_STATE (frame);
if (op_ret >= 0) {
+ /* TODO: log gfid too */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": CREATE %"PRId64"/%s (%"PRId64")",
- frame->root->unique, state->loc.parent->ino,
- state->loc.name, stbuf->ia_ino);
+ "%"PRId64": CREATE %s (%s)",
+ frame->root->unique, state->loc.name,
+ uuid_utoa (inode->gfid));
link_inode = inode_link (inode, state->loc.parent,
state->loc.name, stbuf);
@@ -1412,10 +1410,10 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.postparent, postparent);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": CREATE %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": CREATE %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
out:
@@ -1453,10 +1451,10 @@ server_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
rsp.path = (char *)buf;
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READLINK %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": READLINK %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
if (!rsp.path)
@@ -1487,10 +1485,10 @@ server_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.stat, stbuf);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": STAT %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": STAT %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1521,10 +1519,10 @@ server_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.statpost, statpost);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SETATTR %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": SETATTR %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
}
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
@@ -1549,10 +1547,9 @@ server_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
gf_stat_from_iatt (&rsp.statpost, statpost);
} else {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSETATTR %"PRId64" (%"PRId64") ==> "
- "%"PRId32" (%s)",
+ "%"PRId64": FSETATTR %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0,
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
op_ret, strerror (op_errno));
}
@@ -1582,10 +1579,10 @@ server_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "%"PRId64": XATTROP %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": XATTROP %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
goto out;
}
@@ -1593,9 +1590,10 @@ server_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
len = dict_serialized_length (dict);
if (len < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to get serialized length"
+ "%s (%s): failed to get serialized length"
" for reply dict",
- state->loc.path, state->loc.inode->ino);
+ state->loc.path,
+ uuid_utoa (state->loc.inode->gfid));
op_ret = -1;
op_errno = EINVAL;
len = 0;
@@ -1611,8 +1609,9 @@ server_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = dict_serialize (dict, rsp.dict.dict_val);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "%s (%"PRId64"): failed to serialize reply dict",
- state->loc.path, state->loc.inode->ino);
+ "%s (%s): failed to serialize reply dict",
+ state->loc.path,
+ uuid_utoa (state->loc.inode->gfid));
op_ret = -1;
op_errno = -ret;
len = 0;
@@ -1626,10 +1625,10 @@ out:
rsp.dict.dict_len = len;
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": XATTROP %s (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": XATTROP %s (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->loc.path,
- state->loc.inode ? state->loc.inode->ino : 0,
- op_ret, strerror (op_errno));
+ state->loc.inode ? uuid_utoa (state->loc.inode->gfid) :
+ "--", op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_xattrop_rsp);
@@ -1655,10 +1654,10 @@ server_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_DEBUG,
- "%"PRId64": FXATTROP %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FXATTROP %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
goto out;
}
@@ -1666,9 +1665,10 @@ server_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
len = dict_serialized_length (dict);
if (len < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "fd - %"PRId64" (%"PRId64"): failed to get "
+ "fd - %"PRId64" (%s): failed to get "
"serialized length for reply dict",
- state->resolve.fd_no, state->fd->inode->ino);
+ state->resolve.fd_no,
+ uuid_utoa (state->fd->inode->gfid));
op_ret = -1;
op_errno = EINVAL;
len = 0;
@@ -1684,9 +1684,9 @@ server_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = dict_serialize (dict, rsp.dict.dict_val);
if (ret < 0) {
gf_log (this->name, GF_LOG_ERROR,
- "fd - %"PRId64" (%"PRId64"): failed to "
- "serialize reply dict",
- state->resolve.fd_no, state->fd->inode->ino);
+ "fd - %"PRId64" (%s): failed to serialize "
+ "reply dict", state->resolve.fd_no,
+ uuid_utoa (state->fd->inode->gfid));
op_ret = -1;
op_errno = -ret;
len = 0;
@@ -1700,10 +1700,10 @@ out:
rsp.dict.dict_len = len;
if (op_ret == -1)
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FXATTROP %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
+ "%"PRId64": FXATTROP %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
server_submit_reply (frame, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gfs3_fxattrop_rsp);
@@ -1737,11 +1737,10 @@ server_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
} else {
/* (op_ret == 0) is valid, and means EOF, don't log for that */
gf_log (this->name, (op_ret) ? GF_LOG_INFO : GF_LOG_TRACE,
- "%"PRId64": READDIRP %"PRId64" (%"PRId64") ==>"
- "%"PRId32" (%s)",
+ "%"PRId64": READDIRP %"PRId64" (%s) ==> %"PRId32" (%s)",
frame->root->unique, state->resolve.fd_no,
- state->fd ? state->fd->inode->ino : 0, op_ret,
- strerror (op_errno));
+ state->fd ? uuid_utoa (state->fd->inode->gfid) : "--",
+ op_ret, strerror (op_errno));
}
out:
@@ -2914,10 +2913,10 @@ server_create (rpcsvc_request_t *req)
&params);
if (ret < 0) {
gf_log (state->conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize req-buffer to dictionary",
frame->root->unique, state->resolve.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto out;
}
@@ -3520,10 +3519,10 @@ server_setxattr (rpcsvc_request_t *req)
ret = dict_unserialize (buf, args.dict.dict_len, &dict);
if (ret < 0) {
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize request buffer to dictionary",
frame->root->unique, state->loc.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto err;
}
@@ -3605,10 +3604,10 @@ server_fsetxattr (rpcsvc_request_t *req)
ret = dict_unserialize (buf, args.dict.dict_len, &dict);
if (ret < 0) {
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize request buffer to dictionary",
frame->root->unique, state->loc.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto err;
}
dict->extra_free = buf;
@@ -3687,9 +3686,10 @@ server_fxattrop (rpcsvc_request_t *req)
ret = dict_unserialize (buf, args.dict.dict_len, &dict);
if (ret < 0) {
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "fd - %"PRId64" (%"PRId64"): failed to unserialize "
+ "fd - %"PRId64" (%s): failed to unserialize "
"request buffer to dictionary",
- state->resolve.fd_no, state->fd->inode->ino);
+ state->resolve.fd_no,
+ uuid_utoa (state->fd->inode->gfid));
goto fail;
}
dict->extra_free = buf;
@@ -3770,9 +3770,10 @@ server_xattrop (rpcsvc_request_t *req)
ret = dict_unserialize (buf, args.dict.dict_len, &dict);
if (ret < 0) {
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "fd - %"PRId64" (%"PRId64"): failed to unserialize "
+ "fd - %"PRId64" (%s): failed to unserialize "
"request buffer to dictionary",
- state->resolve.fd_no, state->fd->inode->ino);
+ state->resolve.fd_no,
+ uuid_utoa (state->fd->inode->gfid));
goto fail;
}
dict->extra_free = buf;
@@ -4191,10 +4192,10 @@ server_mknod (rpcsvc_request_t *req)
&params);
if (ret < 0) {
gf_log (state->conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize req-buffer to dictionary",
frame->root->unique, state->resolve.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto out;
}
@@ -4289,10 +4290,10 @@ server_mkdir (rpcsvc_request_t *req)
&params);
if (ret < 0) {
gf_log (state->conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize req-buffer to dictionary",
frame->root->unique, state->resolve.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto out;
}
@@ -4735,10 +4736,10 @@ server_symlink (rpcsvc_request_t *req)
&params);
if (ret < 0) {
gf_log (state->conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize req-buffer to dictionary",
frame->root->unique, state->resolve.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto out;
}
@@ -4965,8 +4966,9 @@ server_lk (rpcsvc_request_t *req)
break;
default:
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "fd - %"PRId64" (%"PRId64"): Unknown lock type: %"PRId32"!",
- state->resolve.fd_no, state->fd->inode->ino, state->type);
+ "fd - %"PRId64" (%s): Unknown lock type: %"PRId32"!",
+ state->resolve.fd_no,
+ uuid_utoa (state->fd->inode->gfid), state->type);
break;
}
@@ -5101,10 +5103,10 @@ server_lookup (rpcsvc_request_t *req)
&xattr_req);
if (ret < 0) {
gf_log (conn->bound_xl->name, GF_LOG_ERROR,
- "%"PRId64": %s (%"PRId64"): failed to "
+ "%"PRId64": %s (%s): failed to "
"unserialize req-buffer to dictionary",
frame->root->unique, state->resolve.path,
- state->resolve.ino);
+ uuid_utoa (state->resolve.gfid));
goto out;
}