tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ataraid(4) and VOP_OPENing the same block device

2008/8/26 Adam Hamsik <>:

> I think that it is not possible to VOP_OPEN block device more than once,
> but you can open raw devices  as many times as you want.
> In my device-mapper driver I created
> struct pdev {
>        struct vnode pdev_vnode;
>        . . .
> };
> Which is in SLIST shared between all dm devices in system. When dm device
> is created I VOP_OPEN selected disk device and add it's vnode to pdev SLIST.
> When another dm device with same disk is created I search SLIST list for
> vnode
> return it. You can look at this code at haad-dm branch in
> sys/dev/dm/dm_pdev.c.
> You probably need to do the same in ld0, or you can use device-mapper to do
> it
> for you and only write own target.

Thanks for the suggestion, but this won't work with the ld(4) driver where
it uses the d_strategy method of bdevsw extensively.

I should note that just after I encountered this problem, my next step was
to use the character device... but I noticed that it doesn't have the d_strategy

Oh well, you can live with one RAID array in the disks but this doesn't take
advantage of what Intel MatrixRAID is supposed to provide.

Home | Main Index | Thread Index | Old Index