]> git.ipfire.org Git - thirdparty/mdadm.git/commit - util.c
util: md_array_valid(): Introduce md_array_valid() helper
authorJes Sorensen <jsorensen@fb.com>
Wed, 3 May 2017 18:25:57 +0000 (14:25 -0400)
committerJes Sorensen <jsorensen@fb.com>
Wed, 3 May 2017 20:15:16 +0000 (16:15 -0400)
commit9db2ab4e9b1ad79b9364b6e03bdd675716a688a5
tree88417eb67da0146a151e94a9efebd38cdf0da6a2
parent99148c19bd9149bb938309ffb6b4dcde20b67934
util: md_array_valid(): Introduce md_array_valid() helper

Using md_get_array_info() to determine if an array is valid is broken
during creation, since the ioctl() returns -ENODEV if the device is
valid but not active.

Where did I leave my stash of brown paper bags?

Fixes: ("40b054e mdopen/open_mddev: Use md_get_array_info() to determine valid array")
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
mdadm.h
mdopen.c
util.c