]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
2007-02-19 Casey Marshall <csm@soe.ucsc.edu>
authorrsdio <rsdio@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 20 Feb 2007 01:11:09 +0000 (01:11 +0000)
committerrsdio <rsdio@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 20 Feb 2007 01:11:09 +0000 (01:11 +0000)
commit771f8f25fb83ef70e22f7ed1423819c61f655fbe
treecf9338484b64c0402b3baf7862c5c3065ec878f4
parentacea5fb42f40a5b6f304ef9c92546ba6241d4c51
2007-02-19  Casey Marshall  <csm@soe.ucsc.edu>

* config.cc (g_conf): set `bdbstore_cachesize' to 0 (== use
default BDB cache size).
(parse_config_options): handle `--bdbstore-cachesize'.
* config.h (md_config_t): add `bdbstore_cachesize.'
* osbdb/OSBDB.cc (binary_search): reimplemented, non-dumb like.
(OSBDB::opendb): new method.
(OSBDB::mount): handle db opening here.
(OSBDB::umount): close the DB, dispose of Db pointer.
(OSBDB::mkfs): handle db opening here.
(OSBDB::pick_object_revision_lt): implemented.
(OSBDB::stat): handle split between object data and object
"inode."
(OSBDB::remove): likewise; also remove attributes.
(OSBDB::truncate): likewise; don't worry about large objects
here.
(OSBDB::read): handle data/inode split; only use DB_DBT_PARTIAL if
we have to.
(OSBDB::write): likewise.
(OSBDB::clone): handle data/inode split; just read in the whole
object.
(OSBDB::create_collection): fix collections list move.
(OSBDB::collection_add): fix objects list move.
(OSBDB::_setattr): handle attribute key changes; fix attribute
names move.
(OSBDB::_getattr): new method.
(OSBDB::getattr): new method.
(OSBDB::getattrs): new method.
(OSBDB::rmattr): new method.
(OSBDB::listattr): fix attribute key types; fix reading
attributes.
(OSBDB::collection_setattr): implemented.
(OSBDB::collection_rmattr): implemented.
(OSBDB::collection_getattr): implemented.
(OSBDB::collection_listattr): implemented.
* osbdb/OSBDB.h: enforce POD types for DB keys; add << operator
for DB key types. Make an "inode" type for object metadata, so we
don't need to prepend an object length to the object data.
(OSBDB::env, OSBDB::mounted, OSBDB::opened): new fields.
(OSBDB::OSBDB): don't initialize `db' here.
(OSBDB::~OSBDB): handle db closure.

git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1111 29311d96-e01e-0410-9327-a35deaab8ce9
trunk/ceph/config.cc
trunk/ceph/config.h
trunk/ceph/osbdb/OSBDB.cc
trunk/ceph/osbdb/OSBDB.h