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

etc/init.d/zfs-functions.in: remove arch warning #9177

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

gyakovlev
Copy link
Contributor

@gyakovlev gyakovlev commented Aug 18, 2019

Signed-off-by: Georgy Yakovlev gyakovlev@gentoo.org

ZFS works and build-tested on those arches.
In fact it's even tested on arm and ppc, but those are 32bit arches.

Motivation and Context

Stop printing misleading warning on boot.

Description

I extended the check to known-good uname -m values.

diff --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in
index 490503e91..abc8617df 100644
--- a/etc/init.d/zfs-functions.in
+++ b/etc/init.d/zfs-functions.in
@@ -294,12 +294,17 @@ checksystem()
        # Just make sure that /dev/zfs is created.
        udev_trigger
 
-       if ! [ "$(uname -m)" = "x86_64" ]; then
-               echo "Warning: You're not running 64bit. Currently native zfs in";
-               echo "         Linux is only supported and tested on 64bit.";
-               # should we break here? People doing this should know what they
-               # do, thus i'm not breaking here.
-       fi
+       case "$(uname -m)" in
+               aarch64|ppc64|ppc64le|x86_64)
+                       ;;
+               *)
+                       # should we break here? People doing this should know
+                       # what they do, thus i'm not breaking here.     
+                       echo "Warning: You're not running supported arch."
+                       echo "         Currently native zfs on Linux is only"
+                       echo "         supported and tested on 64bit arches"
+                       ;;
+       esac
 
        return 0
 }

How Has This Been Tested?

system boots, no longer prints a warning.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

# do, thus i'm not breaking here.
fi
case "$(uname -m)" in
aarch64|ppc64|ppc64le|x86_64)
Copy link
Contributor

Choose a reason for hiding this comment

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

what about this?

case "$(uname -m)" in
        *64*)
                ;;
        *)

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, these days thing work pretty reasonably even on 32-bit arches (and some more exotic ones like s390x). I think it would be reasonable to remove this very old warning entirely.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gyakovlev would you mind refreshing this PR to simply remove the warning.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@behlendorf done!

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 21, 2019
Closes: openzfs#9177
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
@gyakovlev gyakovlev changed the title etc/init.d/zfs-functions.in: check for more arches etc/init.d/zfs-functions.in: remove arch warning Aug 29, 2019
@codecov
Copy link

codecov bot commented Aug 29, 2019

Codecov Report

Merging #9177 into master will decrease coverage by 5.42%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9177      +/-   ##
==========================================
- Coverage   77.89%   72.46%   -5.43%     
==========================================
  Files         389      371      -18     
  Lines      121558   119372    -2186     
==========================================
- Hits        94682    86500    -8182     
- Misses      26876    32872    +5996
Flag Coverage Δ
#kernel 72.35% <ø> (-4.75%) ⬇️
#user 63.21% <ø> (-3.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6cebbf...3caf12e. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 29, 2019
@behlendorf behlendorf merged commit e2fcfa7 into openzfs:master Aug 29, 2019
@gyakovlev gyakovlev deleted the arch-warning branch August 29, 2019 20:46
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 17, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 18, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 18, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 18, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 19, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Sep 23, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: openzfs#9177
tonyhutter pushed a commit that referenced this pull request Sep 26, 2019
Remove the x86_64 warning, it's no longer the case that this is the
only supported architecture.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Closes: #9177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants