mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
test_filestore_workloadgen: track pg log size in memory
Avoid a stat! Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
6b28f55cd3
commit
a68b3069de
@ -246,12 +246,9 @@ void WorkloadGenerator::do_append_log(ObjectStore::Transaction *t,
|
||||
bufferlist bl;
|
||||
get_filled_byte_array(bl, log_append_bytes);
|
||||
hobject_t log_obj = get_coll_meta_object(coll);
|
||||
|
||||
struct stat st;
|
||||
int err = m_store->stat(META_COLL, log_obj, &st);
|
||||
// dout(0) << "stat return: " << err << dendl;
|
||||
assert(err >= 0);
|
||||
t->write(META_COLL, log_obj, st.st_size, bl.length(), bl);
|
||||
uint64_t s = pg_log_size[coll];
|
||||
t->write(META_COLL, log_obj, s, bl.length(), bl);
|
||||
pg_log_size[coll] += bl.length();
|
||||
}
|
||||
|
||||
void WorkloadGenerator::do_destroy_collection(ObjectStore::Transaction *t,
|
||||
|
@ -77,6 +77,8 @@ private:
|
||||
|
||||
rngen_t m_rng;
|
||||
|
||||
map<coll_t, uint64_t> pg_log_size;
|
||||
|
||||
void wait_for_ready() {
|
||||
while (m_in_flight >= max_in_flight)
|
||||
m_cond.Wait(m_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user