summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-31 16:46:52 -0700
committerSage Weil <sage@inktank.com>2013-08-31 16:46:52 -0700
commit9636722a67f43604768191302d93a91523e17b4f (patch)
treec506bdfb6b051b4bdc639a35dfb73f97c977f057
parentc7f2def8aa8a384ea6c303ad218ed0a39efe316d (diff)
parent64774e5792f136df2bc78db686440fc2f3a7643f (diff)
downloadceph-9636722a67f43604768191302d93a91523e17b4f.tar.gz
Merge pull request #561 from ceph/wip-6178
os: LevelDBStore: ignore ENOENT files when estimating store size Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/os/LevelDBStore.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os/LevelDBStore.h b/src/os/LevelDBStore.h
index 356ee59aa27..89718ce1987 100644
--- a/src/os/LevelDBStore.h
+++ b/src/os/LevelDBStore.h
@@ -329,7 +329,11 @@ public:
string fpath = path + '/' + n;
struct stat s;
int err = stat(fpath.c_str(), &s);
- if (err < 0) {
+ // 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;
goto err;