diff options
Diffstat (limited to 'src/os/LevelDBStore.h')
-rw-r--r-- | src/os/LevelDBStore.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os/LevelDBStore.h b/src/os/LevelDBStore.h index 89718ce1987..bc5b612a97a 100644 --- a/src/os/LevelDBStore.h +++ b/src/os/LevelDBStore.h @@ -329,13 +329,15 @@ public: string fpath = path + '/' + n; struct stat s; int err = stat(fpath.c_str(), &s); + if (err < 0) + err = -errno; // we may race against leveldb while reading files; this should only // 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)) { lderr(cct) << __func__ << " error obtaining stats for " << fpath - << ": " << cpp_strerror(errno) << dendl; + << ": " << cpp_strerror(err) << dendl; goto err; } |