[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 7/8] inspection: Handle MD devices in fstab



On Wed, Nov 23, 2011 at 02:00:56PM +0000, Matthew Booth wrote:
> This patch fixes inspection when fstab contains devices md devices

s/devices md devices/md devices/

> +/* Hash structure for path(mdadm)->path(appliance) lookup */ 

There's trailing whitespace on this line, and one more line further
on.  git am spotted this.

> +  if (!map_md_devices (g, &md_map)) return -1;

The convention in almost all other code is to return >= 0 on success
and -1 on error, not booleans.  I think this should be changed for
consistency.

How does this code act if /etc/mdadm.conf is bogus, but the guest
doesn't have any MD devices (or doesn't have any in /etc/fstab at any
rate)?  I think we should be able to deal with this by not giving an
error.  It indeed appears to be the case that map_md_devices doesn't
call error(), but wasn't clear if this was intentional so we can deal
silently with a bogus mdadm.conf, or was accidental.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]