Bug 239523

Summary: GFS user land progam compiling fails in gfs_ondisk.h
Product: [Retired] Red Hat Cluster Suite Reporter: Wendy Cheng <nobody+wcheng>
Component: gfsAssignee: Wendy Cheng <nobody+wcheng>
Status: CLOSED ERRATA QA Contact: GFS Bugs <gfs-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4CC: cfeist, jos, rkenna
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0998 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-21 21:14:24 UTC Type: ---
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:    
Bug Blocks: 246745, 248004    

Description Wendy Cheng 2007-05-09 04:58:33 UTC
Description of problem:
Fast statfs kernel implementation added two new data structures that
uses "__be64" data type into gfs_ondisk.h. Apparently "__be64" (defined
in linux/types.h) is not defined in any GFS user mode include headers.
This breaks GFS user mode utilities build. Note that this is not a 
function issue but a compiling issue since user mode program will not 
use these two data structures. 

cd gfs_edit && make all
make[1]: Entering directory `/usr/src/redhat/BUILD/gfs-6.1.6/gfs_edit'
gcc -Wall -I../include -I../config -I//usr/include -DHELPER_PROGRAM
-D_FILE_OFFSET_BITS=64 -DGFS_RELEASE_NAME=\"6.1.6\" -I../include -I../config
-I//usr/include  gfshex.c hexedit.c   -lncurses -o gfs_edit
In file included from gfshex.c:29:
/usr/include/linux/gfs_ondisk.h:626: error: syntax error before "__be64"
/usr/include/linux/gfs_ondisk.h:628: error: syntax error before "sc_dinodes"
In file included from hexedit.c:30:
/usr/include/linux/gfs_ondisk.h:626: error: syntax error before "__be64"
/usr/include/linux/gfs_ondisk.h:628: error: syntax error before "sc_dinodes"
hexedit.c: In function `bobgets':
hexedit.c:146: warning: operation on `p' may be undefined
hexedit.c:162: warning: operation on `p' may be undefined
make[1]: *** [gfs_edit] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/gfs-6.1.6/gfs_edit'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.91843 (%build)

Version-Release number of selected component (if applicable):
GFS-6.1.14-0 with GFS-kernel-2.6.9-72.2

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
GFS2 in RHEL5 will have the same issue - it is probably good to fix
these two togather. RHEL5 GFS1 doesn't have this issue.

Comment 1 Wendy Cheng 2007-05-09 05:10:39 UTC
Well, I decide not to wait for GFS2... We can always sync the fix later. 
Tentatively set __be64 to uinit64_t. 

Comment 2 Wendy Cheng 2007-05-09 05:12:41 UTC
Check into CVS with the following patch:

--- gfs-kernel-2.6.9-72/src/gfs/gfs_ondisk.h    2007-03-26 18:15:06.000000000 -0400
+++ gfs-kernel/src/gfs/gfs_ondisk.h     2007-05-09 04:17:40.000000000 -0400
@@ -623,9 +623,9 @@ struct gfs_ea_header {
  */

 struct gfs_statfs_change {
-       __be64 sc_total;
-       __be64 sc_free;
-       __be64 sc_dinodes;
+       uint64_t sc_total;
+       uint64_t sc_free;
+       uint64_t sc_dinodes;
 };

 struct gfs_statfs_change_host {


Comment 4 Wendy Cheng 2007-05-09 14:01:30 UTC
4.6 is probably too far away. This should get into 4.5 errata whenever there
is a chance. 

Comment 6 Wendy Cheng 2007-05-09 18:46:10 UTC
For comment #5, ok with me. 

Comment 7 Wendy Cheng 2007-06-06 03:48:04 UTC
Code has checked into CVS. Moved to modified state. 

Comment 13 errata-xmlrpc 2007-11-21 21:14:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0998.html