linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Re: Minor mdadm fixes
Date: Wed, 24 Mar 2010 13:48:03 -0400	[thread overview]
Message-ID: <4BAA5053.20108@redhat.com> (raw)
In-Reply-To: <20100324112740.6b67b287@notabene.brown>

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

On 03/23/2010 08:27 PM, Neil Brown wrote:
> I thought udev always created the directory if it was needed, and always
> removed it if it became empty after deleting an entry.  But I have no strong
> basis for believing that.

I don't know about the removing of a directory, but it will only create
a directory if we indicate it should place a symlink in it (speaking of
/dev/md/).  And we only do that if mdadm -D --export prints out
MD_DEVNAME, and we only print that out if the name field of the
superblock includes /dev/md/.  So, if the name is something shorthand,
like host:0 or host:md0, we never print out MD_DEVNAME and so udev
doesn't create the symlinks in /dev/md.

But, regardless of that, we need the mapfile prior to devices being
brought up, so prior to any possible directory creation by udev.  Hence
we must take care of the issue ourselves.

> However I do think that mdadm should create the directory in this case - not
> any parents, but if they exist and are writeable, then create the directory.
> 
> So I modified you patch to do that when creating the mapfile (not when
> reading it).

Makes sense, thanks.

-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: CFBFF194
	      http://people.redhat.com/dledford

Infiniband specific RPMs available at
	      http://people.redhat.com/dledford/Infiniband


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-03-24 17:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-19  2:13 Minor mdadm fixes Doug Ledford
2010-03-19  7:01 ` Luca Berra
2010-03-23 19:20   ` Doug Ledford
2010-03-23 20:28     ` Luca Berra
2010-03-24  0:27 ` Neil Brown
2010-03-24 17:48   ` Doug Ledford [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-11 20:38 Doug Ledford
2010-01-12  0:49 ` Mr. James W. Laferriere
2010-01-12  3:10   ` Andre Noll
2010-01-12  3:36     ` Doug Ledford
2010-01-12  4:39       ` Andre Noll
2010-01-12  4:46         ` Doug Ledford
2010-01-12  5:21           ` Andre Noll
2010-01-18 22:05 ` Neil Brown

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=4BAA5053.20108@redhat.com \
    --to=dledford@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).