]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: don't scan omap kvpair during fsck()
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 11:14:38 +0000 (19:14 +0800)
committerxiexingguo <xie.xingguo@zte.com.cn>
Tue, 11 Oct 2016 14:10:54 +0000 (22:10 +0800)
Because it does not check anything, and removing it can
speed up the process of fsck()

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 5d53f227c6f0a64ab96364ebf4ee53e92138c8d5..2da1633c090e78707ae0d97f2a82edc80f835531 100644 (file)
@@ -4344,30 +4344,6 @@ int BlueStore::fsck()
          break;
        }
        used_omap_head.insert(o->onode.omap_head);
-       // hrm, scan actual key/value pairs?
-       KeyValueDB::Iterator it = db->get_iterator(PREFIX_OMAP);
-       if (!it)
-         break;
-       string head, tail;
-       get_omap_header(o->onode.omap_head, &head);
-       get_omap_tail(o->onode.omap_head, &tail);
-       it->lower_bound(head);
-       while (it->valid()) {
-         if (it->key() == head) {
-           dout(30) << __func__ << "  got header" << dendl;
-         } else if (it->key() >= tail) {
-           dout(30) << __func__ << "  reached tail" << dendl;
-           break;
-         } else {
-           string user_key;
-           decode_omap_key(it->key(), &user_key);
-           dout(30) << __func__
-                    << "  got " << pretty_binary_string(it->key())
-                    << " -> " << user_key << dendl;
-         }
-         it->next();
-       }
-       break;
       }
     }
   }