Merge pull request #2800 from ceph/wip-enoent-race

os/LevelDBStore, RocksDBStore: fix race handling for get store size

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
This commit is contained in:
João Eduardo Luís 2014-10-26 18:58:50 +00:00
commit 6f8524ef76
2 changed files with 8 additions and 2 deletions

View File

@ -341,7 +341,10 @@ public:
// happen when those files are being updated, data is being shuffled
// and files get removed, in which case there's not much of a problem
// as we'll get to them next time around.
if ((err < 0) && (err != -ENOENT)) {
if (err == -ENOENT) {
continue;
}
if (err < 0) {
lderr(cct) << __func__ << " error obtaining stats for " << fpath
<< ": " << cpp_strerror(err) << dendl;
goto err;

View File

@ -285,7 +285,10 @@ public:
// happen when those files are being updated, data is being shuffled
// and files get removed, in which case there's not much of a problem
// as we'll get to them next time around.
if ((err < 0) && (err != -ENOENT)) {
if (err == -ENOENT) {
continue;
}
if (err < 0) {
lderr(cct) << __func__ << " error obtaining stats for " << fpath
<< ": " << cpp_strerror(err) << dendl;
goto err;