Mailinglist Archive: packet-writing (44 mails)

< Previous Next >
Re: pktcdvd for > 2.4.19-pre4
  • From: Peter Osterlund <petero2@xxxxxxxxx>
  • Date: Fri, 3 May 2002 16:13:35 +0000 (UTC)
  • Message-id: <Pine.LNX.4.44.0205031808210.1824-100000@xxxxxxxxxxxxxxxx>
On Fri, 3 May 2002, Jens Axboe wrote:

> On Thu, May 02 2002, Johnathan Hicks wrote:
> > --- pktcdvd.c.org Thu May 2 16:34:10 2002
> > +++ pktcdvd.c Thu May 2 15:07:12 2002
> > @@ -161,7 +161,7 @@
> > static int pkt_front_merge_fn(request_queue_t *q, struct request *rq,
> > struct bio *bio)
> > {
> > - struct pktcdvd_device *pd = &pkt_devs[minor(bio->bi_dev)];
> > + struct pktcdvd_device *pd = &pkt_devs[minor(bio->bi_bdev->bd_inode->i_rdev)];
>
> make that
>
> struct pktcdvd_device *pd = &pkt_devs[minor(to_kdev_t(bio->bi_bdev))];

Or, in this particular case,

struct pktcdvd_device *pd = (struct pktcdvd_device *) q->queuedata;

which is much simpler. (This is included in the 2.5.12 packet patch.)

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340


< Previous Next >
References