-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fio: enable dataplacement(fdp) while replaying I/Os #1762
fio: enable dataplacement(fdp) while replaying I/Os #1762
Conversation
Can you add a test case for this? |
iolog.c
Outdated
@@ -140,8 +140,13 @@ static int ipo_special(struct thread_data *td, struct io_piece *ipo) | |||
break; | |||
} | |||
ret = td_io_open_file(td, f); | |||
if (!ret) | |||
if (!ret){ |
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.
space between ) and {
iolog.c
Outdated
if (!ret){ | ||
if (td->o.dp_type != FIO_DP_NONE) { | ||
if (dp_init(td)) | ||
return false; |
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.
If we return 0 here this fails silently. Why not print out an error message and abort on error? See the td_verror()
+ return -1;
construction below.
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.
Following the construction below, I'll update it.
Sure. |
Yes that's fine. |
7456a87
to
e6a96fa
Compare
Add initialization and dataplacement logic to enable dataplacement(fdp) while fio replays I/Os with read_iolog. Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
A test(402) checks whether dataplacement(fdp) works fine while replaying iologs Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
Looks good. Thanks. |
@parkvibes The iolog changes triggered the issues below from Coverity. Could you take a look?
|
@vincentkfu Here is my study. CID 494150: Null pointer dereferences (FORWARD_NULL)This issue seems to be not originated from my commits. But I guess that the code that checking whether CID 494151: Error handling issues (NEGATIVE_RETURNS)
But I wonder why similar cases below are not detected as issues.
As far as I know, these came from https://scan.coverity.com/projects/axboe-fio. After adding me to the project(I already requested), I can see the detail. (to view defects or help fix defects...) |
CID 494150: Null pointer dereferences (FORWARD_NULL) Inspecting the code and Coverity's annotations suggest that there will be a null pointer dereference of I can confirm that adding One possible fix would be to put
inside the CID 494151: Error handling issues (NEGATIVE_RETURNS) It looks like |
Thanks for the cross check. CID 494150: Null pointer dereferences (FORWARD_NULL)Putting the codes related to CID 494151: Error handling issues (NEGATIVE_RETURNS)I'm willing to update
|
The least intrusive change to handle the return code of dp_init would be to leave the function unchanged but simply negate the return code. |
fio: enable dataplacement(fdp) while replaying I/Os
Add initialization and dataplacement logic to enable
dataplacement(fdp) while fio replays I/Os with read_iolog.
Signed-off-by: Hyunwoo Park dshw.park@samsung.com
t/nvmept_fdp: add a test(402)
A test(402) checks whether dataplacement(fdp) works fine while replaying iologs
Signed-off-by: Hyunwoo Park dshw.park@samsung.com