]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libceph: don't bail early from try_read() when skipping a message
authorIlya Dryomov <idryomov@gmail.com>
Wed, 17 Feb 2016 19:04:08 +0000 (20:04 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 7 Mar 2016 21:35:27 +0000 (16:35 -0500)
commit265570c9977908479db74fd07b710ec5d5c96e12
tree30aa560ebf3dfab7860bef24d397e1316a5fc2e3
parent621a963c422618d1793d9245302766e87cdabb83
libceph: don't bail early from try_read() when skipping a message

[ Upstream commit e7a88e82fe380459b864e05b372638aeacb0f52d ]

The contract between try_read() and try_write() is that when called
each processes as much data as possible.  When instructed by osd_client
to skip a message, try_read() is violating this contract by returning
after receiving and discarding a single message instead of checking for
more.  try_write() then gets a chance to write out more requests,
generating more replies/skips for try_read() to handle, forcing the
messenger into a starvation loop.

Cc: stable@vger.kernel.org # 3.10+
Reported-by: Varada Kari <Varada.Kari@sandisk.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Varada Kari <Varada.Kari@sandisk.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
net/ceph/messenger.c