* Device mapper support for more than one target ? @ 2008-12-22 17:22 Sandeep K Sinha 2008-12-22 18:50 ` Alasdair G Kergon 0 siblings, 1 reply; 5+ messages in thread From: Sandeep K Sinha @ 2008-12-22 17:22 UTC (permalink / raw) To: linux-kernel Hi all, After looking at the complete implementation of device mappers, I figured out that we can have more than one target for a mapped device then why do we have a check for the number of target to be equal to one , in dm_blk_ioctl ( ) in drivers/md/dm.c http://lxr.linux.no/#linux+v2.6.27.10/drivers/md/dm.c#L337 I think this is a old piece of code and we need to modify it. Kindly suggest ! -- Regards, Sandeep. "To learn is to change. Education is a process that changes the learner." ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Device mapper support for more than one target ? 2008-12-22 17:22 Device mapper support for more than one target ? Sandeep K Sinha @ 2008-12-22 18:50 ` Alasdair G Kergon 2008-12-22 18:54 ` Sandeep K Sinha 0 siblings, 1 reply; 5+ messages in thread From: Alasdair G Kergon @ 2008-12-22 18:50 UTC (permalink / raw) To: Sandeep K Sinha; +Cc: linux-kernel, dm-devel On Mon, Dec 22, 2008 at 10:52:08PM +0530, Sandeep K Sinha wrote: > After looking at the complete implementation of device mappers, I > figured out that we can have more than one target for a mapped device > then why do we have a check for the number of target to be equal to > one , in dm_blk_ioctl ( ) in drivers/md/dm.c > > http://lxr.linux.no/linux+v2.6.27.10/drivers/md/dm.c#L337 Because whether or not it makes sense to send any specific ioctl to more than one target in parallel depends on what that ioctl does. When we added that code we said that we could add hard-coding for specific ioctls if the need arose, but so far it hasn't. Alasdair -- agk@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Device mapper support for more than one target ? 2008-12-22 18:50 ` Alasdair G Kergon @ 2008-12-22 18:54 ` Sandeep K Sinha 2008-12-22 19:03 ` Sandeep K Sinha 2008-12-22 21:24 ` [dm-devel] " Alasdair G Kergon 0 siblings, 2 replies; 5+ messages in thread From: Sandeep K Sinha @ 2008-12-22 18:54 UTC (permalink / raw) To: Sandeep K Sinha, linux-kernel, dm-devel Hey, On Tue, Dec 23, 2008 at 12:20 AM, Alasdair G Kergon <agk@redhat.com> wrote: > On Mon, Dec 22, 2008 at 10:52:08PM +0530, Sandeep K Sinha wrote: >> After looking at the complete implementation of device mappers, I >> figured out that we can have more than one target for a mapped device >> then why do we have a check for the number of target to be equal to >> one , in dm_blk_ioctl ( ) in drivers/md/dm.c >> >> http://lxr.linux.no/linux+v2.6.27.10/drivers/md/dm.c#L337 > > Because whether or not it makes sense to send any specific ioctl to more > than one target in parallel depends on what that ioctl does. When we > added that code we said that we could add hard-coding for specific > ioctls if the need arose, but so far it hasn't. > No, the philosophy should be that we send the ioctl's to the mapped device and not to the targets underlying that mapped-device. And doing so, I should be able to access the complete map that belongs to that mapped device. If I implement an ioctl of my own and try to serve it, the problem would be that it would never allow me to serve it if has more than one target. > Alasdair > -- > agk@redhat.com > -- Regards, Sandeep. "To learn is to change. Education is a process that changes the learner." ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Device mapper support for more than one target ? 2008-12-22 18:54 ` Sandeep K Sinha @ 2008-12-22 19:03 ` Sandeep K Sinha 2008-12-22 21:24 ` [dm-devel] " Alasdair G Kergon 1 sibling, 0 replies; 5+ messages in thread From: Sandeep K Sinha @ 2008-12-22 19:03 UTC (permalink / raw) To: Sandeep K Sinha, linux-kernel, dm-devel On Tue, Dec 23, 2008 at 12:24 AM, Sandeep K Sinha <sandeepksinha@gmail.com> wrote: > Hey, > > On Tue, Dec 23, 2008 at 12:20 AM, Alasdair G Kergon <agk@redhat.com> wrote: >> On Mon, Dec 22, 2008 at 10:52:08PM +0530, Sandeep K Sinha wrote: >>> After looking at the complete implementation of device mappers, I >>> figured out that we can have more than one target for a mapped device >>> then why do we have a check for the number of target to be equal to >>> one , in dm_blk_ioctl ( ) in drivers/md/dm.c >>> >>> http://lxr.linux.no/linux+v2.6.27.10/drivers/md/dm.c#L337 >> >> Because whether or not it makes sense to send any specific ioctl to more >> than one target in parallel depends on what that ioctl does. When we >> added that code we said that we could add hard-coding for specific >> ioctls if the need arose, but so far it hasn't. >> Also, I would like to raise a couple of other points too here. The number of targets that will be generated will be completely transparent to the user and there is no way to figure that out from the userland. All that the user know is the LV thats created, and it will try to issue ioctl's on that. Also, the error that is returned is not that friendly, i mean it just return with an error value of -1, without even providing any error messages. I wish to add atleast a proper error message to the same, if we are not providing ioctl's at the mapped_device level. > No, the philosophy should be that we send the ioctl's to the mapped > device and not to the targets underlying that mapped-device. > > And doing so, I should be able to access the complete map that belongs > to that mapped device. If I implement an ioctl of my own and try to > serve it, the problem would be that it would never allow me to serve > it if has more than one target. > >> Alasdair >> -- >> agk@redhat.com >> > > > > -- > Regards, > Sandeep. > > > > > > > "To learn is to change. Education is a process that changes the learner." > -- Regards, Sandeep. "To learn is to change. Education is a process that changes the learner." ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-devel] Re: Device mapper support for more than one target ? 2008-12-22 18:54 ` Sandeep K Sinha 2008-12-22 19:03 ` Sandeep K Sinha @ 2008-12-22 21:24 ` Alasdair G Kergon 1 sibling, 0 replies; 5+ messages in thread From: Alasdair G Kergon @ 2008-12-22 21:24 UTC (permalink / raw) To: Sandeep K Sinha; +Cc: linux-kernel, dm-devel On Tue, Dec 23, 2008 at 12:24:49AM +0530, Sandeep K Sinha wrote: > On Tue, Dec 23, 2008 at 12:20 AM, Alasdair G Kergon <agk@redhat.com> wrote: > > On Mon, Dec 22, 2008 at 10:52:08PM +0530, Sandeep K Sinha wrote: > > Because whether or not it makes sense to send any specific ioctl to more > > than one target in parallel depends on what that ioctl does. When we > > added that code we said that we could add hard-coding for specific > > ioctls if the need arose, but so far it hasn't. > No, the philosophy should be that we send the ioctl's to the mapped > device and not to the targets underlying that mapped-device. That's not what the current implementation was for, viz. passing scsi ioctls through dm multipath devices. > And doing so, I should be able to access the complete map that belongs > to that mapped device. If I implement an ioctl of my own and try to > serve it, the problem would be that it would never allow me to serve > it if has more than one target. As I said above, if the need arises we can have a whitelist mechanism for ioctls to be handled differently, but the only safe default behaviour is the one that has been implemented. Alasdair -- agk@redhat.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-22 21:24 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-22 17:22 Device mapper support for more than one target ? Sandeep K Sinha 2008-12-22 18:50 ` Alasdair G Kergon 2008-12-22 18:54 ` Sandeep K Sinha 2008-12-22 19:03 ` Sandeep K Sinha 2008-12-22 21:24 ` [dm-devel] " Alasdair G Kergon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox