diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/osd/mClockOpClassQueue.cc | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/osd/mClockOpClassQueue.cc')
-rw-r--r-- | src/osd/mClockOpClassQueue.cc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/osd/mClockOpClassQueue.cc b/src/osd/mClockOpClassQueue.cc new file mode 100644 index 00000000..ccaf98f0 --- /dev/null +++ b/src/osd/mClockOpClassQueue.cc @@ -0,0 +1,54 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2016 Red Hat Inc. + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + + +#include <memory> + +#include "osd/mClockOpClassQueue.h" +#include "common/dout.h" + +namespace dmc = crimson::dmclock; +using namespace std::placeholders; + +#define dout_context cct +#define dout_subsys ceph_subsys_osd +#undef dout_prefix +#define dout_prefix *_dout + + +namespace ceph { + + /* + * class mClockOpClassQueue + */ + + mClockOpClassQueue::mClockOpClassQueue(CephContext *cct) : + queue(std::bind(&mClockOpClassQueue::op_class_client_info_f, this, _1), + cct->_conf->osd_op_queue_mclock_anticipation_timeout), + client_info_mgr(cct) + { + // empty + } + + const dmc::ClientInfo* mClockOpClassQueue::op_class_client_info_f( + const osd_op_type_t& op_type) + { + return client_info_mgr.get_client_info(op_type); + } + + // Formatted output of the queue + void mClockOpClassQueue::dump(ceph::Formatter *f) const { + queue.dump(f); + } +} // namespace ceph |