summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Dillaman <dillaman@redhat.com>2015-10-06 18:48:50 +0200
committerJason Dillaman <dillaman@redhat.com>2015-10-07 21:41:23 +0200
commitb5b4a9dd6bfe10844327a457849a0dbf7ef597ea (patch)
tree975b26257757f65ee50f17ab843ef9041272313e
parentrbd-replay-prep: avoid using assert statements on user inputs (diff)
downloadceph-b5b4a9dd6bfe10844327a457849a0dbf7ef597ea.tar.xz
ceph-b5b4a9dd6bfe10844327a457849a0dbf7ef597ea.zip
rbd-replay-prep: support new read/write APIs
Added support for read2, write2, aio_read2, and aio_write2 APIs. Fixes: 13325 Backport: hammer Signed-off-by: Jason Dillaman <dillaman@redhat.com>
-rw-r--r--src/rbd_replay/rbd-replay-prep.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/rbd_replay/rbd-replay-prep.cc b/src/rbd_replay/rbd-replay-prep.cc
index 7468eb09298..e0998f5b2f3 100644
--- a/src/rbd_replay/rbd-replay-prep.cc
+++ b/src/rbd_replay/rbd-replay-prep.cc
@@ -366,7 +366,8 @@ private:
const struct bt_definition *m_scope;
} fields(evt, scope_fields);
- if (strcmp(event_name, "librbd:read_enter") == 0) {
+ if (strcmp(event_name, "librbd:read_enter") == 0 ||
+ strcmp(event_name, "librbd:read2_enter") == 0) {
string name(fields.string("name"));
string snap_name(fields.string("snap_name"));
bool readonly = fields.int64("read_only");
@@ -414,7 +415,8 @@ private:
IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
m_ios.push_back(completionIO);
completed(completionIO);
- } else if (strcmp(event_name, "librbd:write_enter") == 0) {
+ } else if (strcmp(event_name, "librbd:write_enter") == 0 ||
+ strcmp(event_name, "librbd:write2_enter") == 0) {
string name(fields.string("name"));
string snap_name(fields.string("snap_name"));
bool readonly = fields.int64("read_only");
@@ -431,7 +433,8 @@ private:
IO::ptr completionIO(thread->pending_io()->create_completion(ts, threadID));
m_ios.push_back(completionIO);
completed(completionIO);
- } else if (strcmp(event_name, "librbd:aio_read_enter") == 0) {
+ } else if (strcmp(event_name, "librbd:aio_read_enter") == 0 ||
+ strcmp(event_name, "librbd:aio_read2_enter") == 0) {
string name(fields.string("name"));
string snap_name(fields.string("snap_name"));
bool readonly = fields.int64("read_only");
@@ -446,7 +449,8 @@ private:
m_ios.push_back(io);
thread->issued_io(io, m_threads);
m_pending_ios[completion] = io;
- } else if (strcmp(event_name, "librbd:aio_write_enter") == 0) {
+ } else if (strcmp(event_name, "librbd:aio_write_enter") == 0 ||
+ strcmp(event_name, "librbd:aio_write2_enter") == 0) {
string name(fields.string("name"));
string snap_name(fields.string("snap_name"));
bool readonly = fields.int64("read_only");