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
os/bluestore/NVMEDevice: change write_bl to bl #17145
Conversation
Jenkins, retest this please |
@yuyuyu101 @liupan1111 This is a cleanup. |
src/os/bluestore/NVMEDevice.cc
Outdated
@@ -323,6 +323,11 @@ struct Task { | |||
io_request.nseg = 0; | |||
} | |||
|
|||
void copy_to_buf(bufferptr p, uint64_t off, uint64_t len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bufferptr &&p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why &&p, I think that bufferptr p is sufficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so... @tchaikov plz correct me if wrong
src/os/bluestore/NVMEDevice.cc
Outdated
@@ -1090,11 +1095,10 @@ int NVMEDevice::aio_read( | |||
Task *t = new Task(this, IOCommand::READ_COMMAND, off, len); | |||
|
|||
bufferptr p = buffer::create_page_aligned(len); | |||
pbl->append(p); | |||
pbl->append(t->bl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::move(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why use std:move() sice at this time, there is no data copy yet. Also in kernelDevice.cc, it also directly use append.
src/os/bluestore/NVMEDevice.cc
Outdated
char *buf = p.c_str(); | ||
t->fill_cb = [buf, t]() { | ||
t->copy_to_buf(buf, 0, t->len); | ||
pbl->append(t->bl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::move(
With this patch, both read and write can use this field in task. Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
@yuyuyu101 @liupan1111 Could you review this patch again? |
With this patch, both read and write can use this field in
task.
Signed-off-by: Ziye Yang optimistyzy@gmail.com
Signed-off-by: Pan Liu wanjun.lp@alibaba-inc.com