diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-11-24 07:35:26 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-11-25 00:34:09 -0800 |
commit | c56b9967a33b8bb106d37df0cf6979b340dbf950 (patch) | |
tree | d8398abf8f9de20b8393ac80aa370030ac3fb0b5 /rpc/rpc-transport/socket/src | |
parent | b7ca86e7614c61f8bf0b1e4bea47b4bc0a7fe080 (diff) |
rpc-transport: don't merge payload iobuf and iobuf which holds program header into single iobref.
- io-cache holds a reference on iobref passed from transport layer. Hence,
two iobufs are accounted instead of one in calculated used cache size.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2135 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2135
Diffstat (limited to 'rpc/rpc-transport/socket/src')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index e5272f0d3d1..c121210c478 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -1531,11 +1531,6 @@ __socket_proto_state_machine (rpc_transport_t *this, iobref = priv->incoming.iobref; - iobref_add (iobref, - priv->incoming.iobuf); - iobuf_unref (priv->incoming.iobuf); - priv->incoming.iobuf = NULL; - count++; if (priv->incoming.payload_vector.iov_base @@ -1548,8 +1543,12 @@ __socket_proto_state_machine (rpc_transport_t *this, *pollin = rpc_transport_pollin_alloc (this, vector, count, + priv->incoming.iobuf, iobref, priv->incoming.request_info); + iobuf_unref (priv->incoming.iobuf); + priv->incoming.iobuf = NULL; + if (*pollin == NULL) { ret = -1; goto out; |