From 7803d4d355a42f695a2a0a529e8888dac7275161 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 12 Nov 2007 23:11:48 +0000 Subject: [PATCH] Fix a wrong comparison in _RecursiveAssembleBD We want to prevent sending too many 'None' children to a device. However, the test as it is today is wrong, as we want to test the situation after adding a new child, and not before. This patch fixes this by testing greater-or-equal instead of just greater. Reviewed-by: imsnah --- lib/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backend.py b/lib/backend.py index 5e1d70e03..75b2b8ba0 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -730,7 +730,7 @@ def _RecursiveAssembleBD(disk, owner, as_primary): try: cdev = _RecursiveAssembleBD(chld_disk, owner, as_primary) except errors.BlockDeviceError, err: - if children.count(None) > mcn: + if children.count(None) >= mcn: raise cdev = None logger.Debug("Error in child activation: %s" % str(err)) -- GitLab