diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-25 11:40:43 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-25 11:40:43 +0000 |
commit | 47536fe5e7e5cc30da5e0d439a2bf84a9f357775 (patch) | |
tree | ec41c0f6ebfcbf4ece4edc61fffea780cb37b1f1 /sys-cluster | |
parent | Cleanup in ebuild (removed inheritance of eutils eclass) (diff) | |
download | historical-47536fe5e7e5cc30da5e0d439a2bf84a9f357775.tar.gz historical-47536fe5e7e5cc30da5e0d439a2bf84a9f357775.tar.bz2 historical-47536fe5e7e5cc30da5e0d439a2bf84a9f357775.zip |
fixed bug #79089 kernel 2.6.10-gentoo-rXX and up
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/drbd/ChangeLog | 8 | ||||
-rw-r--r-- | sys-cluster/drbd/Manifest | 11 | ||||
-rw-r--r-- | sys-cluster/drbd/drbd-0.7.8-r1.ebuild | 77 | ||||
-rw-r--r-- | sys-cluster/drbd/files/digest-drbd-0.7.8-r1 | 1 | ||||
-rw-r--r-- | sys-cluster/drbd/files/drbd-0.7-bio.patch | 235 |
5 files changed, 327 insertions, 5 deletions
diff --git a/sys-cluster/drbd/ChangeLog b/sys-cluster/drbd/ChangeLog index df61edb6b2d8..fee1f01809dd 100644 --- a/sys-cluster/drbd/ChangeLog +++ b/sys-cluster/drbd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-cluster/drbd # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.12 2005/01/24 16:51:08 xmerlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.13 2005/01/25 11:40:43 xmerlin Exp $ + +*drbd-0.7.8-r1 (25 Jan 2005) + + 25 Jan 2005; Christian Zoffoli <xmerlin@gentoo.org> + +files/drbd-0.7-bio.patch, +drbd-0.7.8-r1.ebuild: + fixed bug #79089 kernel 2.6.10-gentoo-rXX and up 24 Jan 2005; Christian Zoffoli <xmerlin@gentoo.org> drbd-0.7.7.ebuild, drbd-0.7.8.ebuild: diff --git a/sys-cluster/drbd/Manifest b/sys-cluster/drbd/Manifest index 8f2c76a9885f..42541d7ea1a0 100644 --- a/sys-cluster/drbd/Manifest +++ b/sys-cluster/drbd/Manifest @@ -1,11 +1,12 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 4279146e32b6ebd1b9103a9194b6680c ChangeLog 2914 +MD5 66777123fcb44319180327f04e0f9441 ChangeLog 3102 MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223 MD5 0af8dec75f725b2ed9956874af7058b6 drbd-0.7.7.ebuild 1961 MD5 b149aaae0a018b3d665b28b7c8ac2b41 drbd-0.6.12-r1.ebuild 2136 MD5 32ee8c669ef5af0a261cbcaf8b53351e drbd-0.7.8.ebuild 1961 +MD5 fd2dfa130ebad69b6622a23a0d407a62 drbd-0.7.8-r1.ebuild 2020 MD5 463c9c89c7d3f156fc5581070abce14d files/0.6.12-conf.d 69 MD5 4ab78154d6a32d13d416f9915ad4bc28 files/0.6.12-init 701 MD5 7416c44daab264a36cc8c5a2c35e757f files/0.6.12-scripts-Makefile.patch 1072 @@ -16,10 +17,12 @@ MD5 a977b79c0da39dcb625d9aeb8287d60e files/drbd-0.7-init 1189 MD5 965d3d560fe5fee18c3fdd1bec9748fd files/digest-drbd-0.7.7 62 MD5 4f71ba1c534aebcc1f20da6afd4d10f7 files/digest-drbd-0.7.8 62 MD5 cc42f194896b14c87944e9a5c5aaebf9 files/drbd-0.7-module-Makefile.patch 948 +MD5 b46416329e2a7fe113723dc825e3250e files/drbd-0.7-bio.patch 6699 +MD5 4f71ba1c534aebcc1f20da6afd4d10f7 files/digest-drbd-0.7.8-r1 62 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFB9XW2gMUyd/cdjWsRAj6nAJsE8DZRTNjYT2rvPhODnsK3RamH+QCeIgrx -ahW720kBob1baf0EL0ujVqs= -=+ISZ +iD8DBQFB9oMrgMUyd/cdjWsRAvnUAJ0YHGmef1UgvZ4AoeHT8SCqcYfhJACfbtPB +DF7zYErHj33oqVMn4Ugh1ls= +=tS9x -----END PGP SIGNATURE----- diff --git a/sys-cluster/drbd/drbd-0.7.8-r1.ebuild b/sys-cluster/drbd/drbd-0.7.8-r1.ebuild new file mode 100644 index 000000000000..7eef554c43d0 --- /dev/null +++ b/sys-cluster/drbd/drbd-0.7.8-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/drbd-0.7.8-r1.ebuild,v 1.1 2005/01/25 11:40:43 xmerlin Exp $ + +inherit eutils versionator linux-mod + +LICENSE="GPL-2" +KEYWORDS="~x86" + +MY_MAJ_PV="$(get_version_component_range 1-2 ${PV})" +DESCRIPTION="mirror/replicate block-devices across a network-connection" +SRC_URI="http://oss.linbit.com/drbd/${MY_MAJ_PV}/${P}.tar.gz" +HOMEPAGE="http://www.drbd.org" + +IUSE="" + +DEPEND="virtual/linux-sources" +RDEPEND=">=sys-cluster/heartbeat-1.0.4" +SLOT="0" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PN}-${MY_MAJ_PV}-module-Makefile.patch || die + epatch ${FILESDIR}/${PN}-${MY_MAJ_PV}-bio.patch || die +} + +src_compile() { + check_KV + set_arch_to_kernel + + einfo "" + einfo "Your kernel-sources in /usr/src/linux-${KV} must be properly configured" + einfo "and match the currently running kernel version ${KV}" + einfo "If otherwise -> build will fail." + einfo "" + + emake KDIR=${KERNEL_DIR} || die "compile problem" +} + +src_install() { + make PREFIX=${D} install || die "install problem" + + # gentoo-ish init-script + dodir /etc/init.d + exeinto /etc/init.d + newexe ${FILESDIR}/drbd-0.7-init drbd || die + + # needed by drbd startup script + #keepdir /var/lib/drbd + + # docs + dodoc README ChangeLog COPYING + dodoc documentation/NFS-Server-README.txt + + # we put drbd.conf into docs + # it doesnt make sense to install a default conf in /etc + # put it to the docs + rm -f ${D}/etc/drbd.conf + dodoc scripts/drbd.conf || die + dodoc upgrade_0.6.x_to_0.7.0.txt upgrade_0.7.0_to_0.7.1.txt || die +} + +pkg_postinst() { + linux-mod_pkg_postinst + + einfo "" + einfo "Please remember to re-emerge drbd when you upgrade your kernel!" + einfo "" + einfo "Please copy and gunzip the configuration file" + einfo "from /usr/share/doc/${PF}/drbd.conf.gz to /etc" + einfo "and edit it to your needs. Helpful commands:" + einfo "man 5 drbd.conf" + einfo "man 8 drbdsetup" + einfo "man 8 drbdadm" + einfo "" +} diff --git a/sys-cluster/drbd/files/digest-drbd-0.7.8-r1 b/sys-cluster/drbd/files/digest-drbd-0.7.8-r1 new file mode 100644 index 000000000000..93cde7cac660 --- /dev/null +++ b/sys-cluster/drbd/files/digest-drbd-0.7.8-r1 @@ -0,0 +1 @@ +MD5 566a4ce765706c66718150bd802b05ed drbd-0.7.8.tar.gz 277231 diff --git a/sys-cluster/drbd/files/drbd-0.7-bio.patch b/sys-cluster/drbd/files/drbd-0.7-bio.patch new file mode 100644 index 000000000000..fecf52e84660 --- /dev/null +++ b/sys-cluster/drbd/files/drbd-0.7-bio.patch @@ -0,0 +1,235 @@ +diff -uNr drbd-0.7.8.old/drbd/drbd_actlog.c drbd-0.7.8/drbd/drbd_actlog.c +--- drbd-0.7.8.old/drbd/drbd_actlog.c 2004-11-25 09:05:00.000000000 +0100 ++++ drbd-0.7.8/drbd/drbd_actlog.c 2005-01-25 12:29:04.938306416 +0100 +@@ -64,35 +64,29 @@ + STATIC int _drbd_md_sync_page_io(drbd_dev *mdev, struct page *page, + sector_t sector, int rw, int size) + { +- struct bio bio; +- struct bio_vec vec; ++ struct bio *bio = bio_alloc(GFP_KERNEL, 1); + struct completion event; + int ok; + +- bio_init(&bio); +- bio.bi_io_vec = &vec; +- vec.bv_page = page; +- vec.bv_offset = 0; +- vec.bv_len = +- bio.bi_size = size; +- bio.bi_vcnt = 1; +- bio.bi_idx = 0; +- bio.bi_bdev = mdev->md_bdev; +- bio.bi_sector = sector; ++ bio_get(bio); ++ ++ bio->bi_bdev = mdev->md_bdev; ++ bio->bi_sector = sector; ++ bio_add_page(bio, page, size, 0); + init_completion(&event); +- bio.bi_private = &event; +- bio.bi_end_io = drbd_md_io_complete; ++ bio->bi_private = &event; ++ bio->bi_end_io = drbd_md_io_complete; + + #ifdef BIO_RW_SYNC +- submit_bio(rw | (1 << BIO_RW_SYNC), &bio); ++ submit_bio(rw | (1 << BIO_RW_SYNC), bio); + #else +- submit_bio(rw, &bio); ++ submit_bio(rw, bio); + drbd_blk_run_queue(bdev_get_queue(mdev->md_bdev)); + #endif + wait_for_completion(&event); + +- ok = test_bit(BIO_UPTODATE, &bio.bi_flags); +- ++ ok = test_bit(BIO_UPTODATE, &bio->bi_flags); ++ bio_put(bio); + return ok; + } + #endif +diff -uNr drbd-0.7.8.old/drbd/drbd_compat_wrappers.h drbd-0.7.8/drbd/drbd_compat_wrappers.h +--- drbd-0.7.8.old/drbd/drbd_compat_wrappers.h 2004-09-29 11:21:03.000000000 +0200 ++++ drbd-0.7.8/drbd/drbd_compat_wrappers.h 2005-01-25 12:29:04.940306112 +0100 +@@ -429,11 +429,9 @@ + */ + static inline char *drbd_bio_kmap(struct bio *bio) + { +- struct bio_vec *bvec; ++ struct bio_vec *bvec = bio_iovec(bio); + unsigned long addr; + +- bvec = bio_iovec_idx(bio, bio->bi_idx); +- + addr = (unsigned long) kmap(bvec->bv_page); + + if (addr & ~PAGE_MASK) +@@ -444,16 +442,15 @@ + + static inline void drbd_bio_kunmap(struct bio *bio) + { +- struct bio_vec *bvec; ++ struct bio_vec *bvec = bio_iovec(bio); + +- bvec = bio_iovec_idx(bio, bio->bi_idx); + kunmap(bvec->bv_page); + } + + #else + static inline char *drbd_bio_kmap(struct bio *bio) + { +- struct bio_vec *bvec = bio_iovec_idx(bio, bio->bi_idx); ++ struct bio_vec *bvec = bio_iovec(bio); + return page_address(bvec->bv_page) + bvec->bv_offset; + } + static inline void drbd_bio_kunmap(struct bio *bio) +@@ -466,16 +463,16 @@ + { + struct bio * const bio = &e->private_bio; + struct bio_vec * const vec = &e->ee_bvec; ++ + memset(e, 0, sizeof(*e)); ++ bio_init(bio); + +- // bio_init(&bio); memset did it for us. + bio->bi_io_vec = vec; +- vec->bv_page = page; +- vec->bv_len = +- bio->bi_size = PAGE_SIZE; +- bio->bi_max_vecs = 1; + bio->bi_destructor = NULL; +- atomic_set(&bio->bi_cnt, 1); ++ vec->bv_page = page; ++ bio->bi_size = vec->bv_len = PAGE_SIZE; ++ bio->bi_max_vecs = bio->bi_vcnt = 1; ++ vec->bv_offset = 0; + + e->block_id = ID_VACANT; + } +@@ -495,20 +492,24 @@ + sector_t sector, int size) + { + struct bio * const bio = &e->private_bio; +- ++ struct bio_vec * const vec = &e->ee_bvec; ++ struct page * const page = vec->bv_page; + D_ASSERT(mdev->backing_bdev); + +- bio->bi_flags = 1 << BIO_UPTODATE; +- bio->bi_io_vec->bv_len = +- bio->bi_size = size; +- bio->bi_bdev = mdev->backing_bdev; +- bio->bi_sector = sector; ++ /* Clear plate. */ ++ bio_init(bio); ++ ++ bio->bi_io_vec = vec; ++ bio->bi_destructor = NULL; ++ vec->bv_page = page; ++ vec->bv_offset = 0; ++ bio->bi_max_vecs = bio->bi_vcnt = 1; ++ ++ bio->bi_bdev = mdev->backing_bdev; + bio->bi_private = mdev; +- bio->bi_next = 0; +- bio->bi_idx = 0; // for blk_recount_segments +- bio->bi_vcnt = 1; // for blk_recount_segments +- e->ee_sector = sector; +- e->ee_size = size; ++ ++ e->ee_sector = bio->bi_sector = sector; ++ e->ee_size = bio->bi_size = bio->bi_io_vec->bv_len = size; + } + + static inline void +@@ -530,15 +531,19 @@ + static inline void + drbd_req_prepare_write(drbd_dev *mdev, struct drbd_request *req) + { +- struct bio * const bio = &req->private_bio; +- struct bio * const bio_src = req->master_bio; ++ struct bio * const bio = &req->private_bio; ++ struct bio_vec * const bvec = &req->req_bvec; ++ struct bio * const bio_src = req->master_bio; + + bio_init(bio); // bio->bi_flags = 0; ++ bio->bi_io_vec = bvec; ++ bio->bi_max_vecs = 1; ++ + __bio_clone(bio,bio_src); + bio->bi_bdev = mdev->backing_bdev; + bio->bi_private = mdev; + bio->bi_end_io = drbd_dio_end; +- bio->bi_next = 0; ++ bio->bi_next = NULL; + + req->rq_status = RQ_DRBD_NOTHING; + } +@@ -546,22 +551,26 @@ + static inline void + drbd_req_prepare_read(drbd_dev *mdev, struct drbd_request *req) + { +- struct bio * const bio = &req->private_bio; +- struct bio * const bio_src = req->master_bio; ++ struct bio * const bio = &req->private_bio; ++ struct bio_vec * const bvec = &req->req_bvec; ++ struct bio * const bio_src = req->master_bio; + + bio_init(bio); // bio->bi_flags = 0; ++ bio->bi_io_vec = bvec; ++ bio->bi_max_vecs = 1; ++ + __bio_clone(bio,bio_src); + bio->bi_bdev = mdev->backing_bdev; + bio->bi_private = mdev; + bio->bi_end_io = drbd_read_bi_end_io; // <- only difference +- bio->bi_next = 0; ++ bio->bi_next = NULL; + + req->rq_status = RQ_DRBD_NOTHING; + } + + static inline struct page* drbd_bio_get_page(struct bio *bio) + { +- struct bio_vec *bvec = bio_iovec_idx(bio, bio->bi_idx); ++ struct bio_vec *bvec = bio_iovec(bio); + return bvec->bv_page; + } + +@@ -622,13 +631,13 @@ + + static inline int _drbd_send_zc_bio(drbd_dev *mdev, struct bio *bio) + { +- struct bio_vec *bvec = bio_iovec_idx(bio, bio->bi_idx); ++ struct bio_vec *bvec = bio_iovec(bio); + return _drbd_send_page(mdev,bvec->bv_page,bvec->bv_offset,bvec->bv_len); + } + + static inline int _drbd_send_bio(drbd_dev *mdev, struct bio *bio) + { +- struct bio_vec *bvec = bio_iovec_idx(bio, bio->bi_idx); ++ struct bio_vec *bvec = bio_iovec(bio); + struct page *page = bvec->bv_page; + size_t size = bvec->bv_len; + int offset = bvec->bv_offset; +diff -uNr drbd-0.7.8.old/drbd/drbd_int.h drbd-0.7.8/drbd/drbd_int.h +--- drbd-0.7.8.old/drbd/drbd_int.h 2005-01-12 10:50:37.000000000 +0100 ++++ drbd-0.7.8/drbd/drbd_int.h 2005-01-25 12:29:04.943305656 +0100 +@@ -630,6 +630,7 @@ + struct drbd_barrier *barrier; // The next barrier. + drbd_bio_t *master_bio; // master bio pointer + drbd_bio_t private_bio; // private bio struct ++ ONLY_IN_26(struct bio_vec req_bvec;) + }; + + struct drbd_barrier { +@@ -669,7 +670,7 @@ + long magic; + ONLY_IN_26(unsigned int ee_size;) + ONLY_IN_26(sector_t ee_sector;) +- // THINK: maybe we rather want bio_alloc(GFP_*,1) ++ // TODO: we rather want bio_alloc(GFP_*,1) all through the code! + ONLY_IN_26(struct bio_vec ee_bvec;) + }; + |