diff options
author | Daniel Black <dragonheart@gentoo.org> | 2009-02-02 12:24:10 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2009-02-02 12:24:10 +0000 |
commit | c49d63e3475eced3c3cc4358f0f163313fc42f7e (patch) | |
tree | fcb30102a1e6059c6c7cd0511f9dea92b6ce8e04 /sys-fs/cowloop | |
parent | Added fix for python-2.6, re-use autotools, removed older versions (diff) | |
download | historical-c49d63e3475eced3c3cc4358f0f163313fc42f7e.tar.gz historical-c49d63e3475eced3c3cc4358f0f163313fc42f7e.tar.bz2 historical-c49d63e3475eced3c3cc4358f0f163313fc42f7e.zip |
patch for 2.6.28 thanks to Jérôme Poulin in bug #257335
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/cowloop')
-rw-r--r-- | sys-fs/cowloop/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/cowloop/Manifest | 5 | ||||
-rw-r--r-- | sys-fs/cowloop/cowloop-3.0-r3.ebuild | 3 | ||||
-rw-r--r-- | sys-fs/cowloop/files/cowloop-3.0-2.6.28.patch | 152 |
4 files changed, 164 insertions, 6 deletions
diff --git a/sys-fs/cowloop/ChangeLog b/sys-fs/cowloop/ChangeLog index 953905c7b478..e444d27f46b6 100644 --- a/sys-fs/cowloop/ChangeLog +++ b/sys-fs/cowloop/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-fs/cowloop # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/ChangeLog,v 1.23 2009/01/30 21:04:05 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/ChangeLog,v 1.24 2009/02/02 12:24:09 dragonheart Exp $ + + 02 Feb 2009; Daniel Black <dragonheart@gentoo.org> + +files/cowloop-3.0-2.6.28.patch, cowloop-3.0-r3.ebuild: + patch for 2.6.28 thanks to Jerome Poulin in bug #257335 30 Jan 2009; Daniel Black <dragonheart@gentoo.org> +files/cowloop-3.0-request_queue_t.patch, @@ -15,7 +19,7 @@ 01 Apr 2008; Daniel Black <dragonheart@gentoo.org> +files/cowloop-3.0-kern-2.6.23.patch, +cowloop-3.0-r3.ebuild: introduced 2.6.23+ compatibility as per bug #208059. Patches by Jouni - Kosonen and bug written by Jérôme Poulin + Kosonen and bug written by Jérôme Poulin 02 May 2007; Robin H. Johnson <robbat2@gentoo.org> cowloop-3.0-r2.ebuild: Add ~amd64 after some quick testing. @@ -68,7 +72,7 @@ 04 Aug 2005; Daniel Black <dragonheart@gentoo.org> -cowloop-2.11.ebuild, -cowloop-2.15.ebuild, +cowloop-2.15-r1.ebuild: - added cowmerge thanks to bug #101159 by Jérôme Poulin + added cowmerge thanks to bug #101159 by Jérôme Poulin 26 Jun 2005; David Holm <dholm@gentoo.org> cowloop-2.15.ebuild: Added to ~ppc. diff --git a/sys-fs/cowloop/Manifest b/sys-fs/cowloop/Manifest index 68e484243bf2..f6b17f6a48ba 100644 --- a/sys-fs/cowloop/Manifest +++ b/sys-fs/cowloop/Manifest @@ -1,3 +1,4 @@ +AUX cowloop-3.0-2.6.28.patch 4833 RMD160 94908b657df45a23a2893f309513245bcc410a51 SHA1 639b6c910c6dea75739d423cd255aa72a3ceddfd SHA256 3937d4b6e598e2d1a17cc894db1e2ba38b9bfc8353846b1e7dc6f1706c383e91 AUX cowloop-3.0-cflags.patch 1367 RMD160 2ace187978410854ede706dc13fa8738137ecb83 SHA1 2376b4b23b4b5795b9be8282d7614f8efbbc559b SHA256 354c1731ddfcd11f9fa62ff7dde6d3c1640a8769aa216c8e9f8a43ca2138d7e9 AUX cowloop-3.0-config_h.patch 369 RMD160 782dba93dcd1a3248118ab7e59c6123e791ac10a SHA1 9d0f0f9ac5a6d8af7089b7889734f4706818974c SHA256 be79597b3a61b5a22d37ab38c9d2a19c612754cf2ee60d2fd14e6db7503219b6 AUX cowloop-3.0-kern-2.6.23.patch 541 RMD160 d4660bde58b2eb97228de83ccbaa8928a47437cd SHA1 6ecc76b89ae069cc685718b7c76a047d041ca665 SHA256 fefbb2c13748f14eb74041599ac0b106a77fe3855faa1ce58d5b0126a2f29926 @@ -5,6 +6,6 @@ AUX cowloop-3.0-request_queue_t.patch 397 RMD160 71f39dfb80088393120e03c38ea41a0 AUX cowloop-3.0-semaphore_h.patch 441 RMD160 8eb9c5b8c51e5fd5e9d78c0ef5a0437eeb989e4d SHA1 cd56784cc84bea952a410d74d8480f8800271395 SHA256 e81f988bc3044e503a170488e81adfa84275ea6348b6f908729e9506f206fd67 AUX cowloop-3.0-vfs_statfs.patch 1096 RMD160 531d32023649ba5497dc059e7e439690cabd8410 SHA1 65a0e51653b932f6b197b3a41abe643d08c1dd3d SHA256 203dfe0343df3ab2c465bdb9f44dc5dd5e0b4bc5f36273000d99993763fcb62f DIST cowloop-3.0.tar.gz 129034 RMD160 10614214e43be983df652c941dcab74f76bc076e SHA1 c307f30f0a807ac018fe5ee24f330948d98dedbf SHA256 bf71e90c216f862ece4a48401fa5517cfcc91267e8648e30524ed2b9097489ce -EBUILD cowloop-3.0-r3.ebuild 1686 RMD160 c4c74727eaf016a96ac68af7f18dd9a7b2a4f8dc SHA1 9c167abde5035efff3ace04bd8234e21440cd3ca SHA256 08f1813d23fd2859c8f592aea36fa9ff66ec365d221538e1db934eb13a18e022 -MISC ChangeLog 3724 RMD160 7267042f991aef251a805145f82bb684eb5aa4ee SHA1 1ddaa21b260cdf7018fe47c54bb44c3c2a34c18f SHA256 97b6ff4642e2de2ce57f34230e010ca7b314e21303e99868fd67525cf64d0757 +EBUILD cowloop-3.0-r3.ebuild 1726 RMD160 1eb24723e56deaee5c1a5361205c58a01a215de0 SHA1 578269339ea37008ff18b186c9fc8bb530db164e SHA256 a1491f7ca406de31520de6e34d965f5f751269c2df7ae1bdb85e82a8738ac791 +MISC ChangeLog 3902 RMD160 3b7214bede5ba399f03b5632684ccad7d82e9bbf SHA1 569f0256abbb7a71cc94ca30deae6bb31027771d SHA256 35f8170c195d8641bcd2c4da2867755cb784183523bfb8b1851c90743ccc03a4 MISC metadata.xml 403 RMD160 48afb924f8ddebfd4ea31a43eca3b277a30b62b6 SHA1 ec604212b5eb7dde6256c827184a228eaa8161d5 SHA256 148b8bb5514a7787fab372ad8a71c93c67db9ce84ed2aa5953691c2104ca788a diff --git a/sys-fs/cowloop/cowloop-3.0-r3.ebuild b/sys-fs/cowloop/cowloop-3.0-r3.ebuild index 2fbd21d079ef..ad8eb18dfd6f 100644 --- a/sys-fs/cowloop/cowloop-3.0-r3.ebuild +++ b/sys-fs/cowloop/cowloop-3.0-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/cowloop-3.0-r3.ebuild,v 1.3 2009/01/30 21:13:43 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/cowloop-3.0-r3.ebuild,v 1.4 2009/02/02 12:24:09 dragonheart Exp $ EAPI=2 inherit linux-mod toolchain-funcs @@ -38,6 +38,7 @@ src_prepare() { epatch "${FILESDIR}"/${P}-kern-2.6.23.patch epatch "${FILESDIR}"/${P}-semaphore_h.patch epatch "${FILESDIR}"/${P}-request_queue_t.patch + epatch "${FILESDIR}"/${P}-2.6.28.patch } src_compile() { diff --git a/sys-fs/cowloop/files/cowloop-3.0-2.6.28.patch b/sys-fs/cowloop/files/cowloop-3.0-2.6.28.patch new file mode 100644 index 000000000000..23e1573bb8e7 --- /dev/null +++ b/sys-fs/cowloop/files/cowloop-3.0-2.6.28.patch @@ -0,0 +1,152 @@ +diff -pur /tmp/cowloop-3.0/src/cowdev.c cowloop-3.0/src/cowdev.c +--- /tmp/cowloop-3.0/src/cowdev.c 2006-12-12 10:28:17.000000000 +1100 ++++ cowloop-3.0/src/cowdev.c 2009-02-02 23:04:45.000000000 +1100 +@@ -198,8 +198,8 @@ pairadd (char *rdopath, char *cowpath, c + /* + ** fill structure info for ioctl COWMKPAIR + */ +- cowpair.rdofile = rdopath; +- cowpair.cowfile = cowpath; ++ cowpair.rdofile = (u_char*) rdopath; ++ cowpair.cowfile = (u_char*) cowpath; + + cowpair.rdoflen = strlen(rdopath); + cowpair.cowflen = strlen(cowpath); +Only in cowloop-3.0/src: cowdev.c.orig +Only in cowloop-3.0/src: cowdev.c.rej +diff -pur /tmp/cowloop-3.0/src/cowloop.c cowloop-3.0/src/cowloop.c +--- /tmp/cowloop-3.0/src/cowloop.c 2006-12-12 10:28:17.000000000 +1100 ++++ cowloop-3.0/src/cowloop.c 2009-02-02 23:15:25.000000000 +1100 +@@ -408,8 +408,13 @@ static long int cowlo_readcowraw (struct + static long int cowlo_writecow (struct cowloop_device *, void *, int, loff_t); + static long int cowlo_writecowraw(struct cowloop_device *, void *, int, loff_t); + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) + static int cowlo_ioctl (struct inode *, struct file *, + unsigned int, unsigned long); ++#else ++static int cowlo_ioctl (struct block_device *, fmode_t, ++ unsigned int, unsigned long); ++#endif + + static int cowlo_makepair (struct cowpair __user *); + static int cowlo_removepair (unsigned long __user *); +@@ -434,8 +439,15 @@ static void cowlo_undo_opencow(struct co + ** < 0 - error value + */ + static int ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) + cowlo_open(struct inode *inode, struct file *file) +-{ ++#else ++cowlo_open(struct block_device *bdev, fmode_t mode) ++#endif ++{ ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ struct inode *inode = bdev->bd_inode; ++#endif + if (!inode) + return -EINVAL; + +@@ -474,9 +486,20 @@ cowlo_open(struct inode *inode, struct f + ** < 0 - error value + */ + static int ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) + cowlo_release(struct inode *inode, struct file *file) ++#else ++cowlo_release(struct gendisk *gd, fmode_t mode) ++#endif + { + int err = 0; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ struct block_device *bdev; ++ struct inode *inode; ++ ++ bdev = bdget_disk(gd, 0); ++ inode = bdev->bd_inode; ++#endif + + if (!inode) + return 0; +@@ -497,10 +520,18 @@ cowlo_release(struct inode *inode, struc + ** < 0 - error value + */ + static int ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) + cowlo_ioctl(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg) ++#else ++cowlo_ioctl(struct block_device *bdev, fmode_t mode, ++ unsigned int cmd, unsigned long arg) ++#endif + { + struct hd_geometry geo; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ struct inode *inode = bdev->bd_inode; ++#endif + + DEBUGP(DCOW "cowloop - ioctl cmd %x\n", cmd); + +@@ -2067,7 +2098,11 @@ cowlo_openrdo(struct cowloop_device *cow + cowdev->belowq = cowdev->belowgd->queue; + + if (cowdev->numblocks == 0) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) + cowdev->numblocks = cowdev->belowgd->capacity ++#else ++ cowdev->numblocks = get_capacity(cowdev->belowgd) ++#endif + / (MAPUNIT/512); + } + +@@ -2637,6 +2672,9 @@ cowlo_sync(void) + static int __init + cowlo_init_module(void) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ spinlock_t ilock; /* Initial lock for the default queue assigned on load */ ++#endif + int rv; + int minor, uptocows; + +@@ -2748,7 +2786,7 @@ cowlo_init_module(void) + ** allocate fake disk as control channel to handle the requests + ** to activate and deactivate cowdevices dynamically + */ +- if ((cowctlgd = alloc_disk(1)) == NULL) { ++ if (!(cowctlgd = alloc_disk(1))) { + printk(KERN_WARNING + "cowloop - unable to alloc_disk for cowctl\n"); + +@@ -2759,11 +2797,19 @@ cowlo_init_module(void) + goto error_out; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ spin_lock_init(&ilock); ++#endif ++ + cowctlgd->major = COWMAJOR; + cowctlgd->first_minor = COWCTL; + cowctlgd->minors = 1; + cowctlgd->fops = &cowlo_fops; + cowctlgd->private_data = NULL; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ /* The device is of capacity 0, so there won't be any queue request */ ++ cowctlgd->queue = blk_init_queue(NULL, &ilock); ++#endif + sprintf(cowctlgd->disk_name, "cowctl"); + set_capacity(cowctlgd, 0); + +@@ -2816,7 +2862,9 @@ cowlo_cleanup_module(void) + kfree(cowdevall[minor]); + } + kfree(cowdevall); +- ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) ++ blk_cleanup_queue(cowctlgd->queue); /* cleanup the empty queue */ ++#endif + del_gendisk(cowctlgd); /* revert the alloc_disk() */ + put_disk (cowctlgd); /* revert the add_disk() */ + |