linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Clements <Paul.Clements@SteelEye.com>
To: ptb@it.uc3m.es
Cc: linux-raid@vger.kernel.org
Subject: Re: One more question about the linux md driver
Date: Thu, 10 Apr 2003 12:04:08 -0400	[thread overview]
Message-ID: <3E9595F8.AC72CC1F@SteelEye.com> (raw)
In-Reply-To: 200304101446.h3AEklj30240@oboe.it.uc3m.es

Hi Peter,


"Peter T. Breuer" wrote:

> Can someone tell me about the difference between (when they are called)
> 
>     bind_rdev_to_array
>     unbind_rdev_from_array
> 
> and
> 
>    import_rdev
     ^^^^^^^^^^^

md_import_device (I take it?)


>    export_rdev
> 
> ?? I want to detect when a device is first inducted into an (any) array
> and when it is expelled (from the last array in which it figures). I am
> currently using the first two functions, and counting. I suspect I
> should be using the second two?

Well, I guess it depends what you're trying to do... :)

The import/export occurs earlier (and later, respectively) than the
bind/unbind, so I'm guessing that you want to use the import/export.

It also depends on what level of granularity you need. The rdevs, being
array components, could be partitions or whole devices. I'm guessing you
want to reference count whole devices, since a given partition cannot
belong to more than one md device (although several partitions on the
same device could belong to an md device, or several md devices)? To
figure out the mapping between partitions and devices, I think you want
to use dev_unit() (which basically masks out the minor number from a
kdev_t, leaving the major number).


--
Paul

  reply	other threads:[~2003-04-10 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-10 14:46 One more question about the linux md driver Peter T. Breuer
2003-04-10 16:04 ` Paul Clements [this message]
2003-04-10 16:28   ` Paul Clements

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=3E9595F8.AC72CC1F@SteelEye.com \
    --to=paul.clements@steeleye.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=ptb@it.uc3m.es \
    /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;
as well as URLs for NNTP newsgroup(s).