Bug 239523 - GFS user land progam compiling fails in gfs_ondisk.h
GFS user land progam compiling fails in gfs_ondisk.h
Status: CLOSED ERRATA
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: gfs (Show other bugs)
4
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Wendy Cheng
GFS Bugs
:
Depends On:
Blocks: 246745 248004
  Show dependency treegraph
 
Reported: 2007-05-09 00:58 EDT by Wendy Cheng
Modified: 2010-01-11 22:15 EST (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2007-0998
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-21 16:14:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wendy Cheng 2007-05-09 00:58:33 EDT
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 01:10:39 EDT
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 01:12:41 EDT
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 10:01:30 EDT
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 14:46:10 EDT
For comment #5, ok with me. 
Comment 7 Wendy Cheng 2007-06-05 23:48:04 EDT
Code has checked into CVS. Moved to modified state. 
Comment 13 errata-xmlrpc 2007-11-21 16:14:24 EST
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

Note You need to log in before you can comment on or make changes to this bug.