]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/DBOjectMap : iter->valid is always false if we do not initialize the iterator...
authorxinxin shu <xinxin.shu@intel.com>
Mon, 1 Jun 2015 06:28:32 +0000 (14:28 +0800)
committerxinxin shu <xinxin.shu@intel.com>
Sun, 14 Jun 2015 18:45:27 +0000 (02:45 +0800)
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
src/os/DBObjectMap.cc

index ae67e4d7d6a7d109044b28f47c7fb5cf513fda30..4ffd2832715431a90b8525b6a44d6f12778a53eb 100644 (file)
@@ -772,7 +772,7 @@ int DBObjectMap::get_keys(const ghobject_t &oid,
   if (!header)
     return -ENOENT;
   ObjectMapIterator iter = get_iterator(oid);
-  for (; iter->valid(); iter->next()) {
+  for (iter->seek_to_first(); iter->valid(); iter->next()) {
     if (iter->status())
       return iter->status();
     keys->insert(iter->key());