NeilBrown: ddf: make sure Create fails if devices are too small.
Martin F. Krafft
madduck at alioth.debian.org
Thu May 7 12:11:33 UTC 2009
Module: mdadm
Branch: debian/experimental
Commit: ea17e7aa302355b52247a017ed388fc51317008e
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=ea17e7aa302355b52247a017ed388fc51317008e
Author: NeilBrown <neilb at suse.de>
Date: Thu Apr 2 14:02:33 2009 +1100
ddf: make sure Create fails if devices are too small.
Signed-off-by: NeilBrown <neilb at suse.de>
---
super-ddf.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/super-ddf.c b/super-ddf.c
index 11a3bac..7cc5ac6 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2651,6 +2651,8 @@ validate_geometry_ddf_container(struct supertype *st,
close(fd);
*freesize = avail_size_ddf(st, ldsize >> 9);
+ if (*freesize == 0)
+ return 0;
return 1;
}
More information about the pkg-mdadm-commits
mailing list