Project

General

Profile

Bug #2537

bad header for RHEL6-like kernels

Added by Yannick Perret almost 12 years ago. Updated almost 12 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

Hello,
I tried to compile the kernel module (kclient-0.20) and get a problem with ceph_write_inode:
it is declared either
int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
or
int ceph_write_inode(struct inode *inode, int wait)
depending on kernel version (the first if kver >= 2.6.34.

But Redhat don't really follows kernel versions and backports some features without changing versions. So that the 2.6.32 of the RHEL6-like distro do have the 'struct writeback_control *wbc' format.

I changed this for my code by hand, but I don't know how to detect properly this case (to modify the #if).

Regards,
--
Y.

History

#1 Updated by Yannick Perret almost 12 years ago

Sorry,
I forgot to mention that it implies caps.c and super.h files.

For detecting that kernel is RHEL it is maybe possible to use RHEL_{MAJOR|MINOR} which are defined in include/linux/version.h:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
#else
#if RHEL_MAJOR >= 6
int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
#else
int ceph_write_inode(struct inode *inode, int wait)
#endif
#endif
but it should also handle that RHEL_MAJOR is not defined on other systems.

Regards,
--
Y.

#2 Updated by Sage Weil almost 12 years ago

  • Status changed from New to Won't Fix

That backports tree is very old and not maintained. Assuming you do get it working, you'll have 1-2 year old code. Sorry! We aren't currently maintaining backports at all, although we will be feeding fixes back to the stable branches of 3.0 and later kernels (sles is 3.0-based, ubuntu 12.04 is 3.2-based).

Also available in: Atom PDF