]> git.neil.brown.name Git - mdadm.git/commit
mdadm: Fix optional --write-behind parameter
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 22 Jun 2022 20:25:12 +0000 (14:25 -0600)
committerJes Sorensen <jes@trained-monkey.org>
Sun, 7 Aug 2022 20:27:59 +0000 (16:27 -0400)
commit41edf6f45895193f4a523cb0a08d639c9ff9ccc9
treed6085adb5953d79b4b546152ebcced5c0740fce5
parent6c9d9260633f2c8491985b0782cf0fbd7e51651b
mdadm: Fix optional --write-behind parameter

The commit noted below changed the behaviour of --write-behind to
require an argument. This broke the 06wrmostly test with the error:

  mdadm: Invalid value for maximum outstanding write-behind writes: (null).
         Must be between 0 and 16383.

To fix this, check if optarg is NULL before parising it, as the origial
code did.

Fixes: 60815698c0ac ("Refactor parse_num and use it to parse optarg.")
Cc: Mateusz Grzonka <mateusz.grzonka@intel.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
mdadm.c