summaryrefslogtreecommitdiff
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-07-30 13:45:22 +1000
committerNeilBrown <neilb@suse.de>2013-07-30 13:45:22 +1000
commit7ccc4cc4fc6889680bbe4ec673cab3f6aa49aad3 (patch)
tree509af03e40d95c181cf35d9c9ec673d8c913b191 /super-ddf.c
parent0c78849f2bde13309f5df7130627f8589024a266 (diff)
Manage: remove call to validate_geometry.
This call to validate_geometry is really rather gratuitous. It is purely about the fact that super0 cannot use more than 4TB. So just make it an explicit test - less confusing that way. With this, validate_geometry is only called from Create, which makes it easier to reason about. Also validate_geometry is now never passed NULL for the 'chunk' parameter, so we can remove those annoying tests for NULL. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 47074feb..683f9697 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -3185,14 +3185,14 @@ static int validate_geometry_ddf(struct supertype *st,
* If given BVDs, we make an SVD, changing all the GUIDs in the process.
*/
- if (chunk && *chunk == UnSet)
+ if (*chunk == UnSet)
*chunk = DEFAULT_CHUNK;
if (level == -1000000) level = LEVEL_CONTAINER;
if (level == LEVEL_CONTAINER) {
/* Must be a fresh device to add to a container */
return validate_geometry_ddf_container(st, level, layout,
- raiddisks, chunk?*chunk:0,
+ raiddisks, *chunk,
size, data_offset, dev,
freesize,
verbose);
@@ -3220,7 +3220,7 @@ static int validate_geometry_ddf(struct supertype *st,
* chosen so that add_to_super/getinfo_super
* can return them.
*/
- return reserve_space(st, raiddisks, size, chunk?*chunk:0, freesize);
+ return reserve_space(st, raiddisks, size, *chunk, freesize);
}
return 1;
}