diff options
author | Sven Wegener <swegener@gentoo.org> | 2009-11-14 11:43:19 +0000 |
---|---|---|
committer | Sven Wegener <swegener@gentoo.org> | 2009-11-14 11:43:19 +0000 |
commit | ecca95b1c4aff8b0baf7604c2087a727cb7f1ff0 (patch) | |
tree | 813c9b38ce55661285b23978a466d63868498463 /sys-cluster/drbd-kernel | |
parent | Check for broken alternative scripts in ROOT (diff) | |
download | gentoo-2-ecca95b1c4aff8b0baf7604c2087a727cb7f1ff0.tar.gz gentoo-2-ecca95b1c4aff8b0baf7604c2087a727cb7f1ff0.tar.bz2 gentoo-2-ecca95b1c4aff8b0baf7604c2087a727cb7f1ff0.zip |
Add support for Linux 2.6.32.
(Portage version: 2.2_rc49/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster/drbd-kernel')
-rw-r--r-- | sys-cluster/drbd-kernel/ChangeLog | 6 | ||||
-rw-r--r-- | sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild | 8 | ||||
-rw-r--r-- | sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch | 46 |
3 files changed, 58 insertions, 2 deletions
diff --git a/sys-cluster/drbd-kernel/ChangeLog b/sys-cluster/drbd-kernel/ChangeLog index 53550ecb3f82..4c163b63ec40 100644 --- a/sys-cluster/drbd-kernel/ChangeLog +++ b/sys-cluster/drbd-kernel/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-cluster/drbd-kernel # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd-kernel/ChangeLog,v 1.20 2009/11/11 06:47:15 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd-kernel/ChangeLog,v 1.21 2009/11/14 11:43:19 swegener Exp $ + + 14 Nov 2009; Sven Wegener <swegener@gentoo.org> drbd-kernel-8.3.6.ebuild, + +files/drbd-kernel-8.3.6-linux-2.6.32.patch: + Add support for Linux 2.6.32. 11 Nov 2009; Sven Wegener <swegener@gentoo.org> drbd-kernel-8.3.2.ebuild, drbd-kernel-8.3.6.ebuild: diff --git a/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild b/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild index 5a35bbd3f082..72a28e116b82 100644 --- a/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild +++ b/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild,v 1.2 2009/11/11 06:47:15 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd-kernel/drbd-kernel-8.3.6.ebuild,v 1.3 2009/11/14 11:43:19 swegener Exp $ + +EAPI="2" inherit eutils versionator linux-mod @@ -23,6 +25,10 @@ SLOT="0" S="${WORKDIR}/${MY_P}" +src_prepare() { + epatch "${FILESDIR}"/${P}-linux-2.6.32.patch +} + pkg_setup() { if ! kernel_is 2 6; then die "Unsupported kernel, drbd-${PV} needs kernel 2.6.x ." diff --git a/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch b/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch new file mode 100644 index 000000000000..893f9c2e21fe --- /dev/null +++ b/sys-cluster/drbd-kernel/files/drbd-kernel-8.3.6-linux-2.6.32.patch @@ -0,0 +1,46 @@ +--- drbd-8.3.6/drbd/drbd_req.c ++++ drbd-8.3.6/drbd/drbd_req.c +@@ -55,13 +55,21 @@ + __disk_stat_inc(mdev->vdisk, ios[rw]); + __disk_stat_add(mdev->vdisk, sectors[rw], bio_sectors(bio)); + disk_round_stats(mdev->vdisk); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) ++ mdev->vdisk->in_flight[rw]++; ++#else + mdev->vdisk->in_flight++; ++#endif + #else + cpu = part_stat_lock(); + part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]); + part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio)); + part_stat_unlock(); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) ++ mdev->vdisk->part0.in_flight[rw]++; ++#else + mdev->vdisk->part0.in_flight++; ++#endif + #endif + } + +@@ -77,13 +85,21 @@ + #ifdef __disk_stat_add + __disk_stat_add(mdev->vdisk, ticks[rw], duration); + disk_round_stats(mdev->vdisk); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) ++ mdev->vdisk->in_flight[rw]--; ++#else + mdev->vdisk->in_flight--; ++#endif + #else + cpu = part_stat_lock(); + part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration); + part_round_stats(cpu, &mdev->vdisk->part0); + part_stat_unlock(); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32) ++ mdev->vdisk->part0.in_flight[rw]--; ++#else + mdev->vdisk->part0.in_flight--; ++#endif + #endif + } + |