Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 180659 Details for
Bug 257335
Cowloop fails to compile under 2.6.28
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cowloop-3.0-2.6.28.patch
cowloop-3.0-2.6.28.patch (text/plain), 3.78 KB, created by
Jérôme Poulin
on 2009-02-02 06:43:17 UTC
(
hide
)
Description:
cowloop-3.0-2.6.28.patch
Filename:
MIME Type:
Creator:
Jérôme Poulin
Created:
2009-02-02 06:43:17 UTC
Size:
3.78 KB
patch
obsolete
>diff -udpr cowloop-3.0-gentoo/src/cowdev.c cowloop-3.0-2.6.28/src/cowdev.c >--- cowloop-3.0-gentoo/src/cowdev.c 2006-12-11 18:28:17.000000000 -0500 >+++ cowloop-3.0-2.6.28/src/cowdev.c 2009-02-01 20:41:25.000000000 -0500 >@@ -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); >diff -udpr cowloop-3.0-gentoo/src/cowloop.c cowloop-3.0-2.6.28/src/cowloop.c >--- cowloop-3.0-gentoo/src/cowloop.c 2006-12-11 18:28:17.000000000 -0500 >+++ cowloop-3.0-2.6.28/src/cowloop.c 2009-02-02 00:30:48.000000000 -0500 >@@ -408,7 +411,7 @@ 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); > >-static int cowlo_ioctl (struct inode *, struct file *, >+static int cowlo_ioctl (struct block_device *, fmode_t, > unsigned int, unsigned long); > > static int cowlo_makepair (struct cowpair __user *); >@@ -434,8 +437,10 @@ static void cowlo_undo_opencow(struct co > ** < 0 - error value > */ > static int >-cowlo_open(struct inode *inode, struct file *file) >+cowlo_open(struct block_device *bdev, fmode_t mode) > { >+ struct inode *inode = bdev->bd_inode; >+ > if (!inode) > return -EINVAL; > >@@ -474,10 +479,15 @@ cowlo_open(struct inode *inode, struct f > ** < 0 - error value > */ > static int >-cowlo_release(struct inode *inode, struct file *file) >+cowlo_release(struct gendisk *gd, fmode_t mode) > { >+ struct block_device *bdev; >+ struct inode *inode; > int err = 0; > >+ bdev = bdget_disk(gd, 0); >+ inode = bdev->bd_inode; >+ > if (!inode) > return 0; > >@@ -497,9 +507,10 @@ cowlo_release(struct inode *inode, struc > ** < 0 - error value > */ > static int >-cowlo_ioctl(struct inode *inode, struct file *filp, >+cowlo_ioctl(struct block_device *bdev, fmode_t mode, > unsigned int cmd, unsigned long arg) > { >+ struct inode *inode = bdev->bd_inode; > struct hd_geometry geo; > > DEBUGP(DCOW "cowloop - ioctl cmd %x\n", cmd); >@@ -2067,7 +2086,7 @@ cowlo_openrdo(struct cowloop_device *cow > cowdev->belowq = cowdev->belowgd->queue; > > if (cowdev->numblocks == 0) >- cowdev->numblocks = cowdev->belowgd->capacity >+ cowdev->numblocks = get_capacity(cowdev->belowgd) > / (MAPUNIT/512); > } > >@@ -2639,6 +2658,7 @@ cowlo_init_module(void) > { > int rv; > int minor, uptocows; >+ spinlock_t ilock; /* Initial lock for the default queue assigned on load */ > > revision[sizeof revision - 3] = '\0'; > >@@ -2748,7 +2768,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 +2779,15 @@ cowlo_init_module(void) > goto error_out; > } > >+ spin_lock_init(&ilock); >+ > cowctlgd->major = COWMAJOR; > cowctlgd->first_minor = COWCTL; > cowctlgd->minors = 1; > cowctlgd->fops = &cowlo_fops; > cowctlgd->private_data = NULL; >+ /* The device is of capacity 0, so there won't be any queue request */ >+ cowctlgd->queue = blk_init_queue(NULL, &ilock); > sprintf(cowctlgd->disk_name, "cowctl"); > set_capacity(cowctlgd, 0); > >@@ -2817,6 +2845,7 @@ cowlo_cleanup_module(void) > } > kfree(cowdevall); > >+ blk_cleanup_queue(cowctlgd->queue); /* cleanup the empty queue */ > del_gendisk(cowctlgd); /* revert the alloc_disk() */ > put_disk (cowctlgd); /* revert the add_disk() */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 257335
: 180659 |
180660