summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/ops_executer.h
diff options
context:
space:
mode:
authorRadoslaw Zarzynski <rzarzyns@redhat.com>2020-08-04 16:24:19 +0200
committerRadoslaw Zarzynski <rzarzyns@redhat.com>2020-08-06 09:52:37 +0200
commita8733e227d47c5fde330cca5ce11b6c6afcda09e (patch)
tree4a89c5fe5444e4e62aee01840f80b9e4c674f613 /src/crimson/osd/ops_executer.h
parentcrimson/osd: delegate the txn.empty() dispatch to OpsExecuter. (diff)
downloadceph-a8733e227d47c5fde330cca5ce11b6c6afcda09e.tar.xz
ceph-a8733e227d47c5fde330cca5ce11b6c6afcda09e.zip
crimson/osd: instantiate osd_op_params for every write.
This simplifies the logic of `OpsExecuter::flush_changes()` and enables for moving the instantiation code to `do_write_op()` in the future. The performance impact seems negligible as the affected ops are not the ones dominating in our expected workload (read/write, omap). Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Diffstat (limited to '')
-rw-r--r--src/crimson/osd/ops_executer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h
index 0a224418fb9..2b1f307e103 100644
--- a/src/crimson/osd/ops_executer.h
+++ b/src/crimson/osd/ops_executer.h
@@ -242,9 +242,8 @@ OpsExecuter::osd_op_errorator::future<> OpsExecuter::flush_changes(
assert(obc);
const bool want_mutate = !txn.empty();
if (want_mutate) {
- if (!osd_op_params) {
- osd_op_params = osd_op_params_t();
- }
+ // osd_op_params are instantiated by every wr-like operation.
+ assert(osd_op_params);
osd_op_params->req = std::move(msg);
osd_op_params->at_version = pg.next_version();
osd_op_params->pg_trim_to = pg.get_pg_trim_to();