]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix error handling in check_pool_perm 4604/head
authorJohn Spray <john.spray@redhat.com>
Thu, 7 May 2015 17:42:01 +0000 (18:42 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 7 May 2015 17:46:38 +0000 (18:46 +0100)
commite08cf25cafef5752877439c18cc584b0a75eca08
treec1cf7c8ccda1d0c8ed17298617ec5c5bbcba39ac
parent289ee3b80ccce6bab2966f513a37332280d04a06
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>
src/client/Client.cc