]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: ddf_process_update: add debug messages fore adding VDs
authormwilck@arcor.de <mwilck@arcor.de>
Mon, 8 Jul 2013 21:50:45 +0000 (23:50 +0200)
committerNeilBrown <neilb@suse.de>
Wed, 10 Jul 2013 00:42:11 +0000 (10:42 +1000)
Add some debug messages for the DDF_VIRTR_RECORDS_MAGIC case.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 1b9944f7350636c9f2dde1508e9f605950f72deb..1cb0a9fe3e443e3cb30d0af03dd89e07c0e4dcf7 100644 (file)
@@ -4356,6 +4356,13 @@ static void ddf_process_update(struct supertype *st,
                                return;
                } else {
 
+                       ent = find_vde_by_guid(ddf, vd->entries[0].guid);
+                       if (ent != DDF_NOTFOUND) {
+                               dprintf("%s: VD %s exists already in slot %d\n",
+                                       __func__, guid_str(vd->entries[0].guid),
+                                       ent);
+                               return;
+                       }
                        ent = find_unused_vde(ddf);
                        if (ent == DDF_NOTFOUND)
                                return;
@@ -4364,6 +4371,8 @@ static void ddf_process_update(struct supertype *st,
                                __cpu_to_be16(
                                        1 + __be16_to_cpu(
                                                ddf->virt->populated_vdes));
+                       dprintf("%s: added VD %s in slot %d\n",
+                               __func__, guid_str(vd->entries[0].guid), ent);
                }
                ddf_set_updates_pending(ddf);
                break;