diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-13 15:58:33 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-19 12:16:38 -0700 |
commit | c5b8e0fd057d1954558abfe063603a2c6ecf7859 (patch) | |
tree | adf8c9f43e89e947c00f9d63ae8d711746a5fa37 | |
parent | 63a933cd9fe9f7991f95da7052ec4f71fabe75e1 (diff) | |
download | ceph-c5b8e0fd057d1954558abfe063603a2c6ecf7859.tar.gz |
FileStore: ping tphandle between each operation within a transaction
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/os/FileStore.cc | 12 | ||||
-rw-r--r-- | src/os/FileStore.h | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 5d9e9d1482d..36fcb14b35d 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1710,7 +1710,7 @@ int FileStore::_do_transactions( for (list<Transaction*>::iterator p = tls.begin(); p != tls.end(); ++p, trans_num++) { - r = _do_transaction(**p, op_seq, trans_num); + r = _do_transaction(**p, op_seq, trans_num, handle); if (r < 0) break; if (handle) @@ -1972,7 +1972,9 @@ int FileStore::_check_replay_guard(int fd, const SequencerPosition& spos) } } -unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_num) +unsigned FileStore::_do_transaction( + Transaction& t, uint64_t op_seq, int trans_num, + ThreadPool::TPHandle *handle) { dout(10) << "_do_transaction on " << &t << dendl; @@ -1980,6 +1982,9 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n SequencerPosition spos(op_seq, trans_num, 0); while (i.have_op()) { + if (handle) + handle->reset_tp_timeout(); + int op = i.get_op(); int r = 0; @@ -3917,6 +3922,7 @@ int FileStore::collection_list_partial(coll_t c, hobject_t start, int min, int max, snapid_t seq, vector<hobject_t> *ls, hobject_t *next) { + dout(10) << "collection_list_partial: " << c << dendl; Index index; int r = get_index(c, &index); if (r < 0) @@ -3928,6 +3934,8 @@ int FileStore::collection_list_partial(coll_t c, hobject_t start, assert(!m_filestore_fail_eio || r != -EIO); return r; } + if (ls) + dout(20) << "objects: " << *ls << dendl; return 0; } diff --git a/src/os/FileStore.h b/src/os/FileStore.h index 4f58df4d698..9ba4a866a4b 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -329,7 +329,9 @@ public: int do_transactions(list<Transaction*> &tls, uint64_t op_seq) { return _do_transactions(tls, op_seq, 0); } - unsigned _do_transaction(Transaction& t, uint64_t op_seq, int trans_num); + unsigned _do_transaction( + Transaction& t, uint64_t op_seq, int trans_num, + ThreadPool::TPHandle *handle); int queue_transactions(Sequencer *osr, list<Transaction*>& tls, TrackedOpRef op = TrackedOpRef()); |