From: Alasdair Kergon Date: Tue, 14 Sep 2004 17:37:51 +0000 (+0000) Subject: Write log message when each segtype/format gets initialised. X-Git-Tag: v2_02_91~5106 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=19d1e7102cdf40d2f3732ae8fb17c55ea362aacc;p=lvm2.git Write log message when each segtype/format gets initialised. --- diff --git a/WHATS_NEW b/WHATS_NEW index ce8c4b88e..a96b6447e 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.00.23 - ==================================== + Write log message when each segtype/format gets initialised. New commands 'segtypes' and 'formats'. Suppress pvmove abort message in test mode. Improve pvcreate/remove device not found error message. diff --git a/lib/error/errseg.c b/lib/error/errseg.c index e0310e56c..a71d2a0e4 100644 --- a/lib/error/errseg.c +++ b/lib/error/errseg.c @@ -97,5 +97,7 @@ struct segment_type *init_error_segtype(struct cmd_context *cmd) segtype->private = NULL; segtype->flags = SEG_CAN_SPLIT | SEG_VIRTUAL; + log_very_verbose("Initialised segtype: %s", segtype->name); + return segtype; } diff --git a/lib/format1/format1.c b/lib/format1/format1.c index b1db3e81f..1fbeda01a 100644 --- a/lib/format1/format1.c +++ b/lib/format1/format1.c @@ -591,5 +591,7 @@ struct format_type *init_format(struct cmd_context *cmd) return NULL; } + log_very_verbose("Initialised format: %s", fmt->name); + return fmt; } diff --git a/lib/format_pool/format_pool.c b/lib/format_pool/format_pool.c index b11d409b6..72b67ee4d 100644 --- a/lib/format_pool/format_pool.c +++ b/lib/format_pool/format_pool.c @@ -357,5 +357,7 @@ struct format_type *init_format(struct cmd_context *cmd) return NULL; } + log_very_verbose("Initialised format: %s", fmt->name); + return fmt; } diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index edb0bd037..de9e374ac 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -1682,14 +1682,15 @@ struct format_type *create_text_format(struct cmd_context *cmd) } } - if (!(cn = find_config_node(cmd->cft->root, "metadata/disk_areas"))) - return fmt; - - for (cn = cn->child; cn; cn = cn->sib) { - if (!_get_config_disk_area(cmd, cn, &mda_lists->raws)) - goto err; + if ((cn = find_config_node(cmd->cft->root, "metadata/disk_areas"))) { + for (cn = cn->child; cn; cn = cn->sib) { + if (!_get_config_disk_area(cmd, cn, &mda_lists->raws)) + goto err; + } } + log_very_verbose("Initialised format: %s", fmt->name); + return fmt; err: diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index a7137b49c..e56041da7 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -258,5 +258,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd) segtype->private = NULL; segtype->flags = SEG_AREAS_MIRRORED; + log_very_verbose("Initialised segtype: %s", segtype->name); + return segtype; } diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c index aad048ef4..b446026ca 100644 --- a/lib/snapshot/snapshot.c +++ b/lib/snapshot/snapshot.c @@ -161,5 +161,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd) segtype->private = NULL; segtype->flags = SEG_SNAPSHOT; + log_very_verbose("Initialised segtype: %s", segtype->name); + return segtype; } diff --git a/lib/striped/striped.c b/lib/striped/striped.c index bf3bc8d51..79a3f1bb3 100644 --- a/lib/striped/striped.c +++ b/lib/striped/striped.c @@ -217,5 +217,7 @@ struct segment_type *init_striped_segtype(struct cmd_context *cmd) segtype->flags = SEG_CAN_SPLIT | SEG_AREAS_STRIPED | SEG_FORMAT1_SUPPORT; + log_very_verbose("Initialised segtype: %s", segtype->name); + return segtype; } diff --git a/lib/zero/zero.c b/lib/zero/zero.c index b344fee4b..962bf3e4b 100644 --- a/lib/zero/zero.c +++ b/lib/zero/zero.c @@ -97,5 +97,7 @@ struct segment_type *init_zero_segtype(struct cmd_context *cmd) segtype->private = NULL; segtype->flags = SEG_CAN_SPLIT | SEG_VIRTUAL; + log_very_verbose("Initialised segtype: %s", segtype->name); + return segtype; }