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

Use unsigned short type for exit_what and stonewall #1066

Merged
merged 1 commit into from Aug 14, 2020

Conversation

XeS0r
Copy link
Contributor

@XeS0r XeS0r commented Aug 14, 2020

Fixes: 64402a8 ("Expand choices for exitall")
Fixes: #1065
Signed-off-by: André Wild wild.andre.ae@gmail.com

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

@XeS0r Nice! Could you:

  • Change the title so it prefixes the area (init: use unsigned short type for exit_what and stonewall)

And that's about all...

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

Actually your fix has uncovered a bug in

stonewall=1
- stonewall doesn't take any value (see https://fio.readthedocs.io/en/latest/fio_man.html#cmdoption-arg-stonewall ). Could you fix that up too?

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

The more I think about it the more I wonder - wouldn't it be better just to convert both these values (exit_what, stonewall) to be ints rather than shorts even if they could be smaller (even FIO_BOOL seems to go into an int)? numa_mem_mode gets away with it because it's not a fully fledged option passed in via the command line...

@XeS0r
Copy link
Contributor Author

XeS0r commented Aug 14, 2020

Actually your fix has uncovered a bug in

stonewall=1

I already fixed this issue. But I want to make sure that I don't find anything else. Now that I'm aware of the unit tests.

@XeS0r
Copy link
Contributor Author

XeS0r commented Aug 14, 2020

The more I think about it the more I wonder - wouldn't it be better just to convert both these values (exit_what, stonewall) to be ints rather than shorts even if they could be smaller (even FIO_BOOL seems to go into an int)? numa_mem_mode gets away with it because it's not a fully fledged option passed in via the command line...

I can also change them both to int if you prefer that solution.

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

If it looks like it would be smaller that would be the way to go (we would also likely need to bump FIO_VER FIO_SERVER_VER in https://github.com/axboe/fio/blob/master/server.h#L51 )...

@axboe
Copy link
Owner

axboe commented Aug 14, 2020

Yeah just make them ints, and increment the FIO_SERVER_VER.

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

@XeS0r Looks good:

@sitsofe
Copy link
Collaborator

sitsofe commented Aug 14, 2020

Ah one more:

@XeS0r
Copy link
Contributor Author

XeS0r commented Aug 14, 2020

@XeS0r Looks good:

* Can you add a prefix to the commit message (see [#1050 (comment)](https://github.com/axboe/fio/pull/1050#issuecomment-663606909) for tips on the "house style")

Yes sure, hopefully this prefix is fulfilling your requirements.

* Could you fix up the incorrect test file https://github.com/axboe/fio/blob/5c79c32f6afb39fae910912475e8fea786c3353e/examples/exitwhat.fio#L35
   ?

I've also fixed the comment.

@@ -32,7 +32,7 @@ iodepth=32
rate=300,300,300

[slow2]
stonewall=1
Copy link
Owner

Choose a reason for hiding this comment

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

If this change in job files is required, then we'll have to fix it so that's not the case. If it's not required, don't make the change in the job file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stonewalls usage is not documented like this. I've changed the man page and also fixed some other stuff in the example. Now it's up to you if we should use stonewall=1 in the example or not. Both will work and it's not required to set a value. But all other examples just use stonewall without any value assigned.

cconv.c Show resolved Hide resolved
Fixes: 64402a8 ("Expand choices for exitall")
Fixes: axboe#1065
Signed-off-by: André Wild <wild.andre.ae@gmail.com>
@axboe
Copy link
Owner

axboe commented Aug 14, 2020

Looks good to me now, except you still have the exitwhat.fio change in there. Please get rid of that.

@axboe
Copy link
Owner

axboe commented Aug 14, 2020

Not saying it's incorrect, but it doesn't matter and it's not related. You can do that as a separate commit, if you'd like. Ditto the fio.1 change, that should be a separate commit as well.

@axboe axboe merged commit 0ce7e3e into axboe:master Aug 14, 2020
@axboe
Copy link
Owner

axboe commented Aug 14, 2020

Ah screw it, I'll just pull it as it is, not worth changing it for imho.

@axboe
Copy link
Owner

axboe commented Aug 14, 2020

Thanks for fixing this issue!

@XeS0r
Copy link
Contributor Author

XeS0r commented Aug 14, 2020

I would have changed that too. Was not sure If you want separate commits. Next time I'm aware of that. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

version 3.18 sets stonewall incorrectly on s390x
3 participants