Bug 1383692 - GlusterFS fails to build on old Linux distros with linux/oom.h missing
Summary: GlusterFS fails to build on old Linux distros with linux/oom.h missing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.9
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Oleksandr Natalenko
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: glusterfs-3.9.0
TreeView+ depends on / blocked
 
Reported: 2016-10-11 13:02 UTC by Oleksandr Natalenko
Modified: 2016-11-22 13:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-22 13:29:26 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Oleksandr Natalenko 2016-10-11 13:02:19 UTC
Backport of https://bugzilla.redhat.com/show_bug.cgi?id=1379769 fix for 3.9 branch.

Comment 1 Worker Ant 2016-10-11 13:03:47 UTC
REVIEW: http://review.gluster.org/15622 (glusterfsd/main: fix OOM adjustment for older kernels) posted (#1) for review on release-3.9 by Oleksandr Natalenko (oleksandr)

Comment 2 Worker Ant 2016-10-27 19:13:52 UTC
COMMIT: http://review.gluster.org/15622 committed in release-3.9 by Kaleb KEITHLEY (kkeithle) 
------
commit c7ee2362255cbc305728f1b116a3ad9b7a68a0e1
Author: Oleksandr Natalenko <onatalen>
Date:   Wed Sep 28 14:29:23 2016 +0200

    glusterfsd/main: fix OOM adjustment for older kernels
    
    Milind Changire reported that GlusterFS fails to build on RHEL5
    because linux/oom.h is unavailable.
    
    Milind's initial patch disables OOM adjustment completely
    for those environments that do not have this header. However,
    I'd take another approach that:
    
    1) checks for linux/oom.h in compile-time and defines necessary
    constants if the header is not present;
    2) checks for available OOM API in /proc in run-time and uses it
    accordingly.
    
    This allows OOM to be adjusted properly on RHEL5 (the kernel is pretty new
    to present /proc API for that) as well as RHEL6 (the kernel has many thing
    backported including new /proc API).
    
    > Reviewed-on: http://review.gluster.org/15587
    > Smoke: Gluster Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > Reviewed-by: Niels de Vos <ndevos>
    > Tested-by: Oleksandr Natalenko <oleksandr>
    
    Change-Id: I1bc610586872d208430575c149a7d0c54bd82370
    BUG: 1383692
    Signed-off-by: Oleksandr Natalenko <onatalen>
    Reviewed-on: http://review.gluster.org/15622
    Tested-by: Oleksandr Natalenko <oleksandr>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>


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