Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/fio_ceph_objectstore: fix fio plugin build failure by engine_data #15044

Merged
merged 1 commit into from
May 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/fio/fio_ceph_objectstore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Job::Job(Engine* engine, const thread_data* td)
for (uint32_t i = 0; i < td->o.nr_files; i++) {
auto f = td->files[i];
f->real_file_size = file_size;
f->engine_data = i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's practically identical to #15041 but is semantically different. engine_pos is for offset but not for private data storage. @majianpeng @cbodley what do you guys think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you both for looking at this. i agree that engine_pos is what we want here, as it matches what they did with other engines in axboe/fio@710bf9c:

-#define LAST_POS(f)	((f)->engine_data)
+#define LAST_POS(f)	((f)->engine_pos)

f->engine_pos = i;

// associate each object with a collection in a round-robin fashion
auto& coll = collections[i % collections.size()];
Expand Down Expand Up @@ -329,7 +329,7 @@ int fio_ceph_os_queue(thread_data* td, io_u* u)
fio_ro_check(td, u);

auto job = static_cast<Job*>(td->io_ops_data);
auto& object = job->objects[u->file->engine_data];
auto& object = job->objects[u->file->engine_pos];
auto& coll = object.coll;
auto& os = job->engine->os;

Expand Down