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@xxxxxxxxxx> GPG KeyID: CFBFF194 http://people.redhat.com/dledford Infiniband specific RPMs available at http://people.redhat.com/dledford/Infiniband
Attachment:
signature.asc
Description: OpenPGP digital signature