]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix error handling in check_pool_perm 4629/head
authorJohn Spray <john.spray@redhat.com>
Thu, 7 May 2015 17:42:01 +0000 (18:42 +0100)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 8 May 2015 18:17:25 +0000 (11:17 -0700)
commit6e2dd408be95644ee5bceb556a90483f882fe51c
tree72ade25fa9954aecd8ab8e17b8264b76f7210889
parent3c2e6ae97d6129cb8f5befb3e7bf4be16373f6a5
client: fix error handling in check_pool_perm

Previously, on an error such as a pool not existing,
the caller doing the check would error out, but
anyone waiting on waiting_for_pool_perm would
block indefinitely (symptom was that reads on a
file with a bogus layout would block forever).

Fix by triggering the wait list on errors and
clear the CHECKING state so that the other callers
also perform the check and find the error.

Additionally, don't return the RADOS error code
up to filesystem users, because it can be
misleading.  For example, nonexistent pool is
ENOENT, but we shouldn't give ENOENT on IO
to a file which does exist, we should give EIO.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit e08cf25cafef5752877439c18cc584b0a75eca08)
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
src/client/Client.cc