All of lore.kernel.org
 help / color / mirror / Atom feed
* device mapper v/s block device driver
@ 2013-05-09 22:27 neha naik
  2013-05-10 10:35 ` Joe Thornber
  0 siblings, 1 reply; 2+ messages in thread
From: neha naik @ 2013-05-09 22:27 UTC (permalink / raw)
  To: dm-devel


[-- Attachment #1.1: Type: text/plain, Size: 661 bytes --]

Hi,
  There is no clear documentation available on the net about the scenarios
in which device mapper should be used and why block device driver cannot
work there.

  So, i am posting this question directly to the device mapper community  :
      One can write a block device driver which intercepts io , puts it in
its own biolist, takes action and then passes it to the block device driver
below it.
      (in the form of stackable block device driver) The same can be done
with the help of device mapper target. Then which should be used ?
       Are there any advantages of using block device driver instead of
device mapper (or vice versa)


Regards,
Neha

[-- Attachment #1.2: Type: text/html, Size: 706 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: device mapper v/s block device driver
  2013-05-09 22:27 device mapper v/s block device driver neha naik
@ 2013-05-10 10:35 ` Joe Thornber
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Thornber @ 2013-05-10 10:35 UTC (permalink / raw)
  To: device-mapper development

On Thu, May 09, 2013 at 04:27:05PM -0600, neha naik wrote:
>        Are there any advantages of using block device driver instead of
> device mapper (or vice versa)

device-mapper is a framework for implementing virtual devices.  dm
devices can stack on each other nicely.

If you're writing a driver for real hardware, write a plain block
device driver.  Otherwise I'd start by looking at dm.

You may find your virtual dev can be more efficiently implemented
outside the dm framework.  For instance dm-cache can only see one bio
at a time within dm, which is tedious.  But make sure you've proved to
yourself and the community that the performance benefit is significant
enough to warrant reimplementing things that dm provides for free
(like bio splitting).

- Joe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-10 10:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 22:27 device mapper v/s block device driver neha naik
2013-05-10 10:35 ` Joe Thornber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.