summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2013-05-15 15:54:29 +0530
committerVijay Bellur <vbellur@redhat.com>2013-06-18 23:27:20 -0700
commit1d6f6a65d76f0e8dc9b62fdae305b6246ce268c5 (patch)
tree7282967fb32a2f417ed93c852832fd49a7c314d1 /xlators
parent78a2e27ec7d85ed5e915817c9bcc080919791b7b (diff)
protocol/server: print connection-id in fop failure logs.
Currently we have tuple (server-xlator-name, callid) for identifying a call. However it does not uniquely identify the operation when there are multiple clients (since operations from all clients go through same server). Adding connection-id resolves this ambiguity. Also printing connection-id helps diagnose failures associated with connection state (like fds, locks). Change-Id: I13563bd06ee9b72fc1a10d239f77db5183658573 BUG: 963540 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/5011 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/server/src/server-rpc-fops.c472
1 files changed, 275 insertions, 197 deletions
diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c
index ff9ed338aa6..1dcfc789015 100644
--- a/xlators/protocol/server/src/server-rpc-fops.c
+++ b/xlators/protocol/server/src/server-rpc-fops.c
@@ -31,17 +31,20 @@ server_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct statvfs *buf,
dict_t *xdata)
{
- gfs3_statfs_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
+ gfs3_statfs_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
+ conn = SERVER_CONNECTION (frame);
+
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
- "%"PRId64": STATFS (%s)",
+ "(conn:%s) %"PRId64": STATFS (%s)", conn->id,
frame->root->unique, strerror (op_errno));
goto out;
}
@@ -67,16 +70,18 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *stbuf, dict_t *xdata,
struct iatt *postparent)
{
- rpcsvc_request_t *req = NULL;
- server_state_t *state = NULL;
- inode_t *root_inode = NULL;
- inode_t *link_inode = NULL;
- loc_t fresh_loc = {0,};
- gfs3_lookup_rsp rsp = {0,};
- uuid_t rootgfid = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_state_t *state = NULL;
+ inode_t *root_inode = NULL;
+ inode_t *link_inode = NULL;
+ loc_t fresh_loc = {0,};
+ gfs3_lookup_rsp rsp = {0,};
+ uuid_t rootgfid = {0,};
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
if (state->is_revalidate == 1 && op_ret == -1) {
state->is_revalidate = 2;
@@ -137,16 +142,17 @@ out:
if (state->resolve.bname) {
gf_log (this->name, ((op_errno == ENOENT) ?
GF_LOG_TRACE : GF_LOG_INFO),
- "%"PRId64": LOOKUP %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": LOOKUP %s (%s/%s) ==> "
+ "(%s)",conn->id, frame->root->unique,
+ state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname,
strerror (op_errno));
} else {
gf_log (this->name, ((op_errno == ENOENT) ?
GF_LOG_TRACE : GF_LOG_INFO),
- "%"PRId64": LOOKUP %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": LOOKUP %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
}
@@ -166,21 +172,25 @@ server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct gf_flock *lock,
dict_t *xdata)
{
- gfs3_lk_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
- server_state_t *state = NULL;
+ gfs3_lk_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
+
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": LK %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn: %s) %"PRId64": LK %"PRId64" (%s) ==> "
+ "(%s)", conn->id, frame->root->unique,
+ state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
}
@@ -237,8 +247,8 @@ server_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": INODELK %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": INODELK %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
}
@@ -287,8 +297,9 @@ server_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FINODELK %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FINODELK %"PRId64" (%s) "
+ "==> (%s)", conn->id, frame->root->unique,
+ state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
}
@@ -336,8 +347,8 @@ server_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": ENTRYLK %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": ENTRYLK %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
}
@@ -386,7 +397,8 @@ server_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
if ((op_errno != ENOSYS) && (op_errno != EAGAIN)) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FENTRYLK %"PRId64" (%s) ==>(%s)",
+ "(conn:%s) %"PRId64": FENTRYLK %"PRId64" (%s) "
+ "==>(%s)", conn->id,
frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
@@ -420,20 +432,22 @@ int
server_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- gf_common_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
- server_state_t *state = NULL;
+ gf_common_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": ACCESS %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": ACCESS %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -456,21 +470,23 @@ server_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_rmdir_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *parent = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_rmdir_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *parent = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RMDIR %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": RMDIR %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -509,21 +525,23 @@ server_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_mkdir_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *link_inode = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_mkdir_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *link_inode = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": MKDIR %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": MKDIR %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -556,21 +574,23 @@ server_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_mknod_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *link_inode = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_mknod_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *link_inode = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": MKNOD %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": MKNOD %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -601,20 +621,22 @@ int
server_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- gf_common_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gf_common_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSYNCDIR %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FSYNCDIR %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -637,21 +659,23 @@ server_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, gf_dirent_t *entries,
dict_t *xdata)
{
- gfs3_readdir_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
- int ret = 0;
+ gfs3_readdir_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ int ret = 0;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READDIR %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": READDIR %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -700,8 +724,8 @@ server_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": OPENDIR %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": OPENDIR %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -727,19 +751,22 @@ int
server_removexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- gf_common_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
- server_state_t *state = NULL;
+ gf_common_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": REMOVEXATTR %s (%s) of key %s ==> (%s)",
+ "(conn:%s) %"PRId64": REMOVEXATTR %s (%s) of key %s "
+ "==> (%s)", conn->id,
frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
state->name, strerror (op_errno));
@@ -762,19 +789,22 @@ int
server_fremovexattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- gf_common_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
+ gf_common_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret == -1) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FREMOVEXATTR %"PRId64" (%s) (%s) ==> (%s)",
+ "(conn:%s) %"PRId64": FREMOVEXATTR %"PRId64" (%s) (%s) "
+ "==> (%s)", conn->id,
frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), state->name,
strerror (op_errno));
@@ -798,12 +828,14 @@ server_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict,
dict_t *xdata)
{
- gfs3_getxattr_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
- server_state_t *state = NULL;
+ gfs3_getxattr_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
+ server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -813,8 +845,8 @@ server_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
(op_errno == ENODATA) ||
(op_errno == ENOENT)) ?
GF_LOG_DEBUG : GF_LOG_INFO),
- "%"PRId64": GETXATTR %s (%s) (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": GETXATTR %s (%s) (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
state->name, strerror (op_errno));
goto out;
@@ -843,12 +875,14 @@ server_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict,
dict_t *xdata)
{
- gfs3_fgetxattr_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_fgetxattr_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -856,7 +890,8 @@ server_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == -1) {
gf_log (this->name, ((op_errno == ENOTSUP) ?
GF_LOG_DEBUG : GF_LOG_INFO),
- "%"PRId64": FGETXATTR %"PRId64" (%s) (%s) ==> (%s)",
+ "(conn:%s) %"PRId64": FGETXATTR %"PRId64" (%s) (%s) "
+ "==> (%s)", conn->id,
frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
state->name, strerror (op_errno));
@@ -886,15 +921,17 @@ static int
_gf_server_log_setxattr_failure (dict_t *d, char *k, data_t *v,
void *tmp)
{
- server_state_t *state = NULL;
- call_frame_t *frame = NULL;
+ server_state_t *state = NULL;
+ call_frame_t *frame = NULL;
+ server_connection_t *conn = NULL;
frame = tmp;
+ conn = SERVER_CONNECTION (frame);
state = CALL_STATE(frame);
gf_log (THIS->name, GF_LOG_INFO,
- "%"PRId64": SETXATTR %s (%s) ==> %s",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": SETXATTR %s (%s) ==> %s",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid), k);
return 0;
}
@@ -942,15 +979,17 @@ static int
_gf_server_log_fsetxattr_failure (dict_t *d, char *k, data_t *v,
void *tmp)
{
- call_frame_t *frame = NULL;
- server_state_t *state = NULL;
+ call_frame_t *frame = NULL;
+ server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
frame = tmp;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
gf_log (THIS->name, GF_LOG_INFO,
- "%"PRId64": FSETXATTR %"PRId64" (%s) ==> %s",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FSETXATTR %"PRId64" (%s) ==> %s",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), k);
return 0;
@@ -1001,16 +1040,18 @@ server_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *prenewparent, struct iatt *postnewparent,
dict_t *xdata)
{
- gfs3_rename_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
- inode_t *tmp_inode = NULL;
- inode_t *tmp_parent = NULL;
- char oldpar_str[50] = {0,};
- char newpar_str[50] = {0,};
+ gfs3_rename_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ inode_t *tmp_inode = NULL;
+ inode_t *tmp_parent = NULL;
+ char oldpar_str[50] = {0,};
+ char newpar_str[50] = {0,};
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -1019,7 +1060,8 @@ server_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
uuid_utoa_r (state->resolve.gfid, oldpar_str);
uuid_utoa_r (state->resolve2.gfid, newpar_str);
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RENAME %s (%s/%s) -> %s (%s/%s) ==> (%s)",
+ "(conn:%s) %"PRId64": RENAME %s (%s/%s) -> %s (%s/%s) "
+ "==> (%s)", conn->id,
frame->root->unique, state->loc.path,
oldpar_str, state->resolve.bname, state->loc2.path,
newpar_str, state->resolve2.bname, strerror (op_errno));
@@ -1030,7 +1072,7 @@ server_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* TODO: log gfid of the inodes */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": RENAME_CBK %s ==> %s",
+ "(conn:%s) %"PRId64": RENAME_CBK %s ==> %s", conn->id,
frame->root->unique, state->loc.name, state->loc2.name);
/* Before renaming the inode, we have to get the inode for the
@@ -1084,13 +1126,15 @@ server_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_unlink_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *parent = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_unlink_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *parent = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -1098,8 +1142,8 @@ server_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret) {
gf_log (this->name, (op_errno == ENOENT)?
GF_LOG_DEBUG:GF_LOG_ERROR,
- "%"PRId64": UNLINK %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": UNLINK %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -1107,7 +1151,7 @@ server_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* TODO: log gfid of the inodes */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": UNLINK_CBK %s",
+ "(conn:%s) %"PRId64": UNLINK_CBK %s", conn->id,
frame->root->unique, state->loc.name);
inode_unlink (state->loc.inode, state->loc.parent,
@@ -1140,21 +1184,23 @@ server_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_symlink_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *link_inode = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_symlink_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *link_inode = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SYMLINK %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": SYMLINK %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -1188,15 +1234,17 @@ server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent, dict_t *xdata)
{
- gfs3_link_rsp rsp = {0,};
- server_state_t *state = NULL;
- inode_t *link_inode = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_link_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ inode_t *link_inode = NULL;
+ rpcsvc_request_t *req = NULL;
char gfid_str[50] = {0,};
char newpar_str[50] = {0,};
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
@@ -1206,9 +1254,10 @@ server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
uuid_utoa_r (state->resolve2.pargfid, newpar_str);
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": LINK %s (%s) -> %s/%s ==> (%s)",
- frame->root->unique, state->loc.path, gfid_str,
- newpar_str, state->resolve2.bname, strerror (op_errno));
+ "(conn:%s) %"PRId64": LINK %s (%s) -> %s/%s ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
+ gfid_str, newpar_str, state->resolve2.bname,
+ strerror (op_errno));
goto out;
}
@@ -1237,20 +1286,22 @@ server_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf, dict_t *xdata)
{
- gfs3_truncate_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_truncate_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": TRUNCATE %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": TRUNCATE %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1275,9 +1326,10 @@ server_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *stbuf,
dict_t *xdata)
{
- gfs3_fstat_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_fstat_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
@@ -1287,8 +1339,8 @@ server_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSTAT %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FSTAT %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1312,20 +1364,22 @@ server_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf, dict_t *xdata)
{
- gfs3_ftruncate_rsp rsp = {0};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_ftruncate_rsp rsp = {0};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FTRUNCATE %"PRId64" (%s)==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FTRUNCATE %"PRId64" (%s)==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1349,20 +1403,22 @@ int
server_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *xdata)
{
- gf_common_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gf_common_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FLUSH %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FLUSH %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1384,20 +1440,22 @@ server_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf, dict_t *xdata)
{
- gfs3_fsync_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_fsync_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSYNC %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FSYNC %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1422,9 +1480,10 @@ server_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
struct iatt *postbuf, dict_t *xdata)
{
- gfs3_write_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_write_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
@@ -1434,8 +1493,8 @@ server_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": WRITEV %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": WRITEV %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1462,12 +1521,14 @@ server_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
struct iovec *vector, int32_t count,
struct iatt *stbuf, struct iobref *iobref, dict_t *xdata)
{
- gfs3_read_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_read_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
#ifdef GF_TESTING_IO_XDATA
{
@@ -1484,8 +1545,8 @@ server_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READV %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": READV %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1511,20 +1572,22 @@ server_rchecksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
uint32_t weak_checksum, uint8_t *strong_checksum,
dict_t *xdata)
{
- gfs3_rchecksum_rsp rsp = {0,};
- rpcsvc_request_t *req = NULL;
+ gfs3_rchecksum_rsp rsp = {0,};
+ rpcsvc_request_t *req = NULL;
server_state_t *state = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": RCHECKSUM %"PRId64" (%s)==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": RCHECKSUM %"PRId64" (%s)==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid), strerror (op_errno));
goto out;
}
@@ -1566,8 +1629,8 @@ server_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": OPEN %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": OPEN %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1612,8 +1675,8 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": CREATE %s (%s/%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": CREATE %s (%s/%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.pargfid),
state->resolve.bname, strerror (op_errno));
goto out;
@@ -1621,8 +1684,8 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
/* TODO: log gfid too */
gf_log (state->conn->bound_xl->name, GF_LOG_TRACE,
- "%"PRId64": CREATE %s (%s)",
- frame->root->unique, state->loc.name,
+ "(conn:%s) %"PRId64": CREATE %s (%s)",
+ conn->id, frame->root->unique, state->loc.name,
uuid_utoa (stbuf->ia_gfid));
link_inode = inode_link (inode, state->loc.parent,
@@ -1679,20 +1742,22 @@ server_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, const char *buf,
struct iatt *stbuf, dict_t *xdata)
{
- gfs3_readlink_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_readlink_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READLINK %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": READLINK %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1721,20 +1786,22 @@ server_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *stbuf,
dict_t *xdata)
{
- gfs3_stat_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_stat_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": STAT %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": STAT %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1760,20 +1827,22 @@ server_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *statpre, struct iatt *statpost, dict_t *xdata)
{
- gfs3_setattr_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_setattr_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": SETATTR %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": SETATTR %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1799,20 +1868,22 @@ server_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
struct iatt *statpre, struct iatt *statpost, dict_t *xdata)
{
- gfs3_fsetattr_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_fsetattr_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FSETATTR %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FSETATTR %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1839,20 +1910,22 @@ server_xattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict,
dict_t *xdata)
{
- gfs3_xattrop_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_xattrop_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE (frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": XATTROP %s (%s) ==> (%s)",
- frame->root->unique, state->loc.path,
+ "(conn:%s) %"PRId64": XATTROP %s (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->loc.path,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1881,20 +1954,22 @@ server_fxattrop_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, dict_t *dict,
dict_t *xdata)
{
- gfs3_xattrop_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
+ gfs3_xattrop_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": FXATTROP %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": FXATTROP %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;
@@ -1920,23 +1995,26 @@ out:
int
server_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, dict_t *xdata)
+ int32_t op_ret, int32_t op_errno, gf_dirent_t *entries,
+ dict_t *xdata)
{
- gfs3_readdirp_rsp rsp = {0,};
- server_state_t *state = NULL;
- rpcsvc_request_t *req = NULL;
- int ret = 0;
+ gfs3_readdirp_rsp rsp = {0,};
+ server_state_t *state = NULL;
+ rpcsvc_request_t *req = NULL;
+ int ret = 0;
+ server_connection_t *conn = NULL;
req = frame->local;
state = CALL_STATE(frame);
+ conn = SERVER_CONNECTION (frame);
GF_PROTOCOL_DICT_SERIALIZE (this, xdata, (&rsp.xdata.xdata_val),
rsp.xdata.xdata_len, op_errno, out);
if (op_ret < 0) {
gf_log (this->name, GF_LOG_INFO,
- "%"PRId64": READDIRP %"PRId64" (%s) ==> (%s)",
- frame->root->unique, state->resolve.fd_no,
+ "(conn:%s) %"PRId64": READDIRP %"PRId64" (%s) ==> (%s)",
+ conn->id, frame->root->unique, state->resolve.fd_no,
uuid_utoa (state->resolve.gfid),
strerror (op_errno));
goto out;