All of lore.kernel.org
 help / color / mirror / Atom feed
* Doubt regarding dm-raid1
@ 2011-01-28  5:03 nishant mungse
  2011-01-28 19:38 ` Malahal Naineni
  0 siblings, 1 reply; 2+ messages in thread
From: nishant mungse @ 2011-01-28  5:03 UTC (permalink / raw)
  To: device-mapper development

   Hi Malahal

    Thanks for reply. I am not able to understand what  this
    "INIT_WORK(&ms->kmirrord_work, do_mirror)" function does. It  is written
    in mirror_ctr of dm-raid1. What i think is whenever a bio comes dm_mirror
    will be called if that is case then why this is written in mirror_ctr.


 Regards,
 Nishant.

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

* Re: Doubt regarding dm-raid1
  2011-01-28  5:03 Doubt regarding dm-raid1 nishant mungse
@ 2011-01-28 19:38 ` Malahal Naineni
  0 siblings, 0 replies; 2+ messages in thread
From: Malahal Naineni @ 2011-01-28 19:38 UTC (permalink / raw)
  To: dm-devel

nishant mungse [nishantmungse@gmail.com] wrote:
>    Hi Malahal
> 
>     Thanks for reply. I am not able to understand what  this
>     "INIT_WORK(&ms->kmirrord_work, do_mirror)" function does. It  is written
>     in mirror_ctr of dm-raid1. What i think is whenever a bio comes dm_mirror
>     will be called if that is case then why this is written in mirror_ctr.

INIT_WORK just initializes the work structure. When it is queued by calling
queue_work() (e.g. from wakeup_mirrord) the actual function do_mirror() gets
called. It is called in a different thread context though!

The following article is a bit outdated, but it gives what a work queue
is and its API:

http://lwn.net/Articles/23634/

Hope that helps,
Malahal.

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

end of thread, other threads:[~2011-01-28 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28  5:03 Doubt regarding dm-raid1 nishant mungse
2011-01-28 19:38 ` Malahal Naineni

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.