]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd discard return -EINVAL if len > MAX_INT32 9856/head
authorHuan Zhang <zhanghuan@chinac.com>
Fri, 24 Jun 2016 03:27:53 +0000 (11:27 +0800)
committerHuan Zhang <zhanghuan@chinac.com>
Mon, 27 Jun 2016 08:52:49 +0000 (16:52 +0800)
commitec259dfde87ed9bc5e7247f311b629707c636895
tree255e589b164618f42d2d0879da4d6f3e49f1f832
parent45a9efdd18086b2351b91e69609b2f4a2d9cec45
rbd discard return -EINVAL if len > MAX_INT32

rbd discard use 'int' to return discarded length, but the 'len' user
passed is 'uint64', in some case, the ret value will be truncated
and return a negative value which means discard failed. ret -EINVAL
if len > MAX_INT32 to indicate support len <= MAX_INT32 only.

Fixes: http://tracker.ceph.com/issues/16465
Signed-off-by: Huan Zhang <zhanghuan@chinac.com>
src/librbd/librbd.cc