Bug 463277 - RHEL5.3: ext4 warning on x86 build
RHEL5.3: ext4 warning on x86 build
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Eric Sandeen
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-22 15:52 EDT by Eric Sandeen
Modified: 2009-01-20 15:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 15:10:53 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 Eric Sandeen 2008-09-22 15:52:48 EDT
The ext4 code generates a warning when built on x86:

fs/ext4/inode.c: In function 'ext4_do_update_inode':
fs/ext4/inode.c:3047: warning: right shift count >= width of type

This is because upstream, the vfs i_version is a long long, but in rhel5 it's only a long (so 32 bits on 32 bit machines)

Even though a 32-bit i_version is probably not terribly useful for the intended purpose, this should probably be fixed to avoid unexpected results, something as simple as:

Index: rhel5-kernel/fs/ext4/inode.c
===================================================================
--- rhel5-kernel.orig/fs/ext4/inode.c   2008-09-22 13:30:02.000000000 -0500
+++ rhel5-kernel/fs/ext4/inode.c        2008-09-22 14:14:34.401001131 -0500
@@ -3043,8 +3043,12 @@ static int ext4_do_update_inode(handle_t
        raw_inode->i_disk_version = cpu_to_le32(inode->i_version);
        if (ei->i_extra_isize) {
                if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi))
+#if BITS_PER_LONG == 64
                        raw_inode->i_version_hi =
-                       cpu_to_le32(inode->i_version >> 32);
+                               cpu_to_le32(inode->i_version >> 32);
+#else
+                       raw_inode->i_version_hi = 0;
+#endif
                raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
        }
 
would do the trick.
Comment 1 RHEL Product and Program Management 2008-09-22 15:53:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 RHEL Product and Program Management 2008-09-23 13:13:19 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 Don Zickus 2008-10-29 12:18:19 EDT
in kernel-2.6.18-121.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 8 errata-xmlrpc 2009-01-20 15:10:53 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 therefore 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/RHSA-2009-0225.html

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