[collectd] [PATCH] Persistent names for linux's device mapper disks.

Florian Forster octo at collectd.org
Fri Feb 4 21:34:38 CET 2011


Hi Simone,

thank you very much for your patch :)

On Fri, Feb 04, 2011 at 05:41:29PM +0100, Simone Gotti wrote:
> One thing that can be done and will be quite useful are persistent and
> meaningful names for device mapper devices.

Sounds great to me.

> […], a config option to the disk plugin should be added to activate
> it. I'll add it if you like this patch.

I think that'd be a good idea. The HDDTemp plugin used the name
"TranslateDevicename" for a similar option in the version 4 line of
collectd. The option has since been removed, but I guess we can recycle
the name of the option ;) The option should be handled regardless
whether or not libdevmapper was available at compiile time – an
appropriate error message should be logged if it wasn't.

Please also document the option in src/collectd.conf.pod (see
perlpod(1) for a description of the syntax) and src/collectd.conf.in
(from which the default config file is generated).

> +			if (!(dmt = dm_task_create(DM_DEVICE_INFO)))
> +	                	goto dmout;

Can you please remove that "goto" from your code? If you need many exit
paths for error checking, please put the code into a separate function.

Best regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110204/c7bfc272/attachment.pgp>


More information about the collectd mailing list