-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Endless loop in zpool_do_remove() on platforms with unsigned char #8789
Conversation
8903882
to
beee51e
Compare
Codecov Report
@@ Coverage Diff @@
## master #8789 +/- ##
==========================================
- Coverage 78.75% 78.68% -0.07%
==========================================
Files 382 381 -1
Lines 117809 117797 -12
==========================================
- Hits 92776 92691 -85
- Misses 25033 25106 +73
Continue to review full report at Codecov.
|
Whilst you're there, may as well fix up the other places where we don't have
|
beee51e
to
1774ae8
Compare
cmd/zfs/zfs_main.c
Outdated
@@ -3932,7 +3932,7 @@ static int | |||
zfs_do_snapshot(int argc, char **argv) | |||
{ | |||
int ret = 0; | |||
signed char c; | |||
int char c; |
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.
A typo here caused the build failures.
On systems where "char" is an unsigned type the value returned by getopt() will never be negative (-1), leading to an endless loop: this issue prevents both 'zpool remove' and 'zstreamdump' for working on some systems. Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
1774ae8
to
c7b2812
Compare
@chrisrd would you mind reviewing this again. |
i have tested |
On systems where "char" is an unsigned type the value returned by getopt() will never be negative (-1), leading to an endless loop: this issue prevents both 'zpool remove' and 'zstreamdump' for working on some systems. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #8789
On systems where "char" is an unsigned type the value returned by getopt() will never be negative (-1), leading to an endless loop: this issue prevents both 'zpool remove' and 'zstreamdump' for working on some systems. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#8789
On systems where "char" is an unsigned type the value returned by getopt() will never be negative (-1), leading to an endless loop: this issue prevents both 'zpool remove' and 'zstreamdump' for working on some systems. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes openzfs#8789
Motivation and Context
On systems where "char" is an unsigned type the value returned by getopt() will never be negative (-1), leading to an endlees loop.
zpool
is now just wasting CPU cycles:Description
Change
char c
toint c
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.