diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/locks/src/common.c | 4 | ||||
-rw-r--r-- | xlators/features/locks/src/internal.c | 18 | ||||
-rw-r--r-- | xlators/features/locks/src/posix.c | 8 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 12 |
4 files changed, 23 insertions, 19 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index 92441bde0fe..1f10aa20cf1 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -139,8 +139,8 @@ posix_lock_to_flock (posix_lock_t *lock, struct flock *flock) flock->l_type = lock->fl_type; flock->l_start = lock->fl_start; - if (lock->fl_end == 0) - flock->l_len = LLONG_MAX; + if (lock->fl_end == LLONG_MAX) + flock->l_len = 0; else flock->l_len = lock->fl_end - lock->fl_start + 1; } diff --git a/xlators/features/locks/src/internal.c b/xlators/features/locks/src/internal.c index 817dab4a17e..6524721b453 100644 --- a/xlators/features/locks/src/internal.c +++ b/xlators/features/locks/src/internal.c @@ -181,9 +181,9 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, default: op_errno = ENOTSUP; - gf_log (this->name, GF_LOG_DEBUG, - "Lock command F_GETLK not supported for [f]inodelk " - "(cmd=%d)", + gf_log (this->name, GF_LOG_ERROR, + "Unexpected case in inodelk (cmd=%d). " + "Please file a bug report at http://bugs.gluster.com", cmd); goto unwind; } @@ -284,8 +284,8 @@ pl_finodelk (call_frame_t *frame, xlator_t *this, default: op_errno = ENOTSUP; gf_log (this->name, GF_LOG_ERROR, - "Lock command F_GETLK not supported for [f]inodelk " - "(cmd=%d)", + "Unexpected case in finodelk (cmd=%d). " + "Please file a bug report at http://bugs.gluster.com", cmd); goto unwind; } @@ -775,8 +775,8 @@ pl_entrylk (call_frame_t *frame, xlator_t *this, default: gf_log (this->name, GF_LOG_ERROR, - "Unexpected case in entrylk (cmd=%d). Please send" - "a bug report to gluster-devel@nongnu.org", cmd); + "Unexpected case in entrylk (cmd=%d). Please file" + "a bug report at http://bugs.gluster.com", cmd); goto out; } @@ -879,9 +879,9 @@ pl_fentrylk (call_frame_t *frame, xlator_t *this, break; default: - gf_log (this->name, GF_LOG_DEBUG, + gf_log (this->name, GF_LOG_ERROR, "Unexpected case in fentrylk (cmd=%d). " - "Please send a bug report to gluster-devel@nongnu.org", + "Please file a bug report at http://bugs.gluster.com", cmd); goto out; } diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 144c8fedffb..d672beaebc3 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -715,7 +715,7 @@ pl_forget (xlator_t *this, pl_inode = pl_inode_get (this, inode); if (!list_empty (&pl_inode->rw_list)) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_DEBUG, "Pending R/W requests found, releasing."); list_for_each_entry_safe (rw_req, rw_tmp, &pl_inode->rw_list, @@ -727,7 +727,7 @@ pl_forget (xlator_t *this, } if (!list_empty (&pl_inode->ext_list)) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_DEBUG, "Pending fcntl locks found, releasing."); list_for_each_entry_safe (ext_l, ext_tmp, &pl_inode->ext_list, @@ -739,7 +739,7 @@ pl_forget (xlator_t *this, } if (!list_empty (&pl_inode->int_list)) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_DEBUG, "Pending inode locks found, releasing."); list_for_each_entry_safe (int_l, int_tmp, &pl_inode->int_list, @@ -751,7 +751,7 @@ pl_forget (xlator_t *this, } if (!list_empty (&pl_inode->dir_list)) { - gf_log (this->name, GF_LOG_WARNING, + gf_log (this->name, GF_LOG_DEBUG, "Pending entry locks found, releasing."); list_for_each_entry_safe (entry_l, entry_tmp, diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 86c8be962b6..220f5b3b466 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -51,6 +51,7 @@ protocol_server_reply (call_frame_t *frame, int type, int op, server_state_t *state = NULL; xlator_t *bound_xl = NULL; transport_t *trans = NULL; + int ret = 0; bound_xl = BOUND_XL (frame); state = CALL_STATE (frame); @@ -60,10 +61,13 @@ protocol_server_reply (call_frame_t *frame, int type, int op, hdr->type = hton32 (type); hdr->op = hton32 (op); - transport_submit (trans, (char *)hdr, hdrlen, vector, count, iobref); - /* TODO: If transport submit fails, there is no reply sent to client, - * its bailed out as of now.. loggically, only this frame should fail. - */ + ret = transport_submit (trans, (char *)hdr, hdrlen, vector, + count, iobref); + if (ret < 0) { + gf_log ("protocol/server", GF_LOG_ERROR, + "frame %"PRId64": failed to submit. op= %d, type= %d", + frame->root->unique, op, type); + } STACK_DESTROY (frame->root); |