Bug 1355652

Summary: [ppc64/s390x] nsm_use_hostnames=1 turns to 16777216 in big-endian architectures
Product: Red Hat Enterprise Linux 7 Reporter: Yongcheng Yang <yoyang>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED WONTFIX QA Contact: Yongcheng Yang <yoyang>
Severity: medium Docs Contact: Milan Navratil <mnavrati>
Priority: high    
Version: 7.3CC: bugproxy, hannsj_uhl, jkachuck, steved, xzhou
Target Milestone: rc   
Target Release: 7.7   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Story Points: ---
Clone Of:
: 1764075 (view as bug list) Environment:
Last Closed: 2019-06-20 18:17:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1264387    
Bug Blocks: 1362179, 1586275, 1598750    

Description Yongcheng Yang 2016-07-12 07:26:53 UTC
Description of problem:
Bug 1264387 has changed to use lockd.conf instead of sysconfig to set module lockd parameters. When testing enable/disable "nsm_use_hostnames", found that "fs.nfs.nsm_use_hostnames" shows up as 16777216 but not 1 after enabled it in ppc64 machines.
This issue *not* exists in x86_64.

Version-Release number of selected component (if applicable):
Only in ppc64 arch

How reproducible:
100% easy

Steps to Reproduce:
1. echo 'options lockd nsm_use_hostnames=1' >/etc/modprobe.d/lockd.conf
2. Re-load the module lockd or reboot system to make it effective
3. sysctl fs.nfs.nsm_use_hostnames
4. cat /sys/module/lockd/parameters/nsm_use_hostnames

Actual results:
# After enabled it
[root]# sysctl fs.nfs.nsm_use_hostnames
fs.nfs.nsm_use_hostnames = 16777216 <<<<<<<<<<<<<<<<< 
[root@]# cat /sys/module/lockd/parameters/nsm_use_hostnames 
Y
[root]# 

Expected results:
[root]# sysctl fs.nfs.nsm_use_hostnames
fs.nfs.nsm_use_hostnames = 1  <<<<<<<<<<<<<<<<<<<<<<<<<<
[root@]# cat /sys/module/lockd/parameters/nsm_use_hostnames 
Y
[root]#

Additional info:
[yoyang@yoyang-pc lockd]$ awk 'BEGIN{print log(16777216)/log(2)}'
24
[yoyang@yoyang-pc lockd]$ awk 'BEGIN{print 2**24}'
16777216
[yoyang@yoyang-pc lockd]$