Re: 2.6.8.1-mm1

From: Peter Osterlund
Date: Fri Aug 20 2004 - 00:46:16 EST


Christoph Hellwig <hch@xxxxxxxxxxxxx> writes:

> On Thu, Aug 19, 2004 at 01:57:09AM +0200, Peter Osterlund wrote:
> > That can actually be avoided by letting the packet driver itself keep
> > track of how many unfinished bios there are in the CD request queue.
> > This is straightforward to implement. The only small complication is
> > that incoming read requests need to be cloned so that the packet
> > driver can use a private bi_end_io function.
>
> Neat, this looks pretty good. Other comments on the pkt driver (not related
> to this patch):
>
> in the blockdev ->open/->release->ioctl you can get your private data
> from inode->i_bdev->bd_disk->private_data instead of doing the lookup.

The release/ioctl functions should be no problems to convert, but how
do I prevent pkt_open() and pkt_remove_dev() from racing against each
other with your suggestion? Currently this is handled by the ctl_mutex
and the fact that pkt_find_dev_from_minor() returns NULL if the packet
device has gone away.

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/