From: Malahal Naineni <malahal@us.ibm.com>
To: dm-devel@redhat.com
Subject: Re: Doubt regarding dm-raid1
Date: Fri, 28 Jan 2011 11:38:41 -0800 [thread overview]
Message-ID: <20110128193841.GA4616@us.ibm.com> (raw)
In-Reply-To: <AANLkTi=ryfEU9VOBE7qBaecWnJ93h9tdYt0cNb388vXC@mail.gmail.com>
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.
prev parent reply other threads:[~2011-01-28 19:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 5:03 Doubt regarding dm-raid1 nishant mungse
2011-01-28 19:38 ` Malahal Naineni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110128193841.GA4616@us.ibm.com \
--to=malahal@us.ibm.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox