KStore::KStore(CephContext *cct, const string& path)
: ObjectStore(cct, path),
db(NULL),
+ basedir(path),
path_fd(-1),
fsid_fd(-1),
mounted(false),
dout(10) << __func__ << " done" << dendl;
}
-int KStore::statfs(struct store_statfs_t* buf)
+int KStore::statfs(struct store_statfs_t* buf0)
{
- return db->get_statfs(buf);
+ struct statfs buf;
+ buf0->reset();
+ if (::statfs(basedir.c_str(), &buf) < 0) {
+ int r = -errno;
+ assert(r != -ENOENT);
+ return r;
+ }
+
+ buf0->total = buf.f_blocks * buf.f_bsize;
+ buf0->available = buf.f_bavail * buf.f_bsize;
+
+ return 0;
}
fi
filestore_path=
+kstore_path=
VSTART_SEC="client.vstart.sh"
usage=$usage"\t--rgw_compression specify the rgw compression plugin\n"
usage=$usage"\t-b, --bluestore use bluestore as the osd objectstore backend (default)\n"
usage=$usage"\t-f, --filestore use filestore as the osd objectstore backend\n"
+usage=$usage"\t-K, --kstore use kstore as the osd objectstore backend\n"
usage=$usage"\t--memstore use memstore as the osd objectstore backend\n"
usage=$usage"\t--cache <pool>: enable cache tiering on pool\n"
usage=$usage"\t--short: short object names only; necessary for ext4 dev\n"
rgw_compression=$2
shift
;;
+ --kstore_path )
+ kstore_path=$2
+ shift
+ ;;
--filestore_path )
filestore_path=$2
shift
-f | --filestore )
objectstore="filestore"
;;
+ -K | --kstore )
+ objectstore="kstore"
+ ;;
--hitset )
hitset="$hitset $2 $3"
shift
bluestore block wal path = $CEPH_DEV_DIR/osd\$id/block.wal.file
bluestore block wal size = 1048576000
bluestore block wal create = true
+
+ ; kstore
+ kstore fsck on mount = true
osd objectstore = $objectstore
$COSDSHORT
$extra_conf
fi
if [ -n "$filestore_path" ]; then
ln -s $filestore_path $CEPH_DEV_DIR/osd$osd
+ elif [ -n "$kstore_path" ]; then
+ ln -s $kstore_path $CEPH_DEV_DIR/osd$osd
else
mkdir -p $CEPH_DEV_DIR/osd$osd
fi