]> git.ipfire.org Git - thirdparty/mdadm.git/commit
imsm: catch attempt to auto-layout zero-length arrays
authorDan Williams <dan.j.williams@intel.com>
Tue, 1 Dec 2009 23:04:06 +0000 (16:04 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 1 Dec 2009 23:04:06 +0000 (16:04 -0700)
commita7dd165b4ea5c3db8dd05f4594e8dea783296ae3
tree3ecb283a693f9c8505241664e971dfa909363fb7
parent2ed4f75388f99968be58097941a9704f6e42d701
imsm: catch attempt to auto-layout zero-length arrays

When -z is omitted reserve_space() looks to satisfy a zero length
allocation which lo and behold is equal to the amount of free space on a
full disk.  So, catch maxsize == 0 and simplify the return value from
merge_extents() to always equal amount of free space (no benefit to
having a special case ~0ULL == error).

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
super-intel.c