NeilBrown: Assemble: Fix honouring of 'auto' config line

Martin F. Krafft madduck at alioth.debian.org
Sun Aug 29 11:54:22 UTC 2010


Module: mdadm
Branch: debian/conffile-location
Commit: e5c99c0811199a734ed0fe41784d22230922a49a
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=e5c99c0811199a734ed0fe41784d22230922a49a

Author: NeilBrown <neilb at suse.de>
Date:   Tue Jul  6 11:57:09 2010 +1000

Assemble: Fix honouring of 'auto' config line

commit 1ff98339283645a20c980d540f6c4d82693e7daf
broke the checking of metadata types via the 'auto' line.

Be moving 'load_super" before "conf_test_metadata" we left
tst->sb set even if conf_test_metadata fails, so the device will
actually be accepted and used.

So if we decide to reject the device, free the superblock so it is
clear that it is rejected.

Signed-off-by: NeilBrown <neilb at suse.de>

---

 Assemble.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Assemble.c b/Assemble.c
index 1504f1f..c5d28ed 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -271,6 +271,7 @@ int Assemble(struct supertype *st, char *mddev,
 				fprintf(stderr, Name ": %s has metadata type %s for which "
 					"auto-assembly is disabled\n",
 					devname, tst->ss->name);
+			tst->ss->free_super(tst);
 			tmpdev->used = 2;
 		} else {
 			content = &info;




More information about the pkg-mdadm-commits mailing list