generic/551: Adjust the size argument for aio-dio-write-verify
authorMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Mon, 18 Nov 2019 17:40:37 +0000 (12:40 -0500)
committerEryu Guan <guaneryu@gmail.com>
Sun, 1 Dec 2019 15:46:15 +0000 (23:46 +0800)
commit9a09e4ec7284c070be672352bdd1b993e605aece
tree8a9fd33d3b1637e3f2df04a5d6b547d3d5d1a0f2
parent6b04ed05456fc6c945d210c34aa1a80bf38fa9cf
generic/551: Adjust the size argument for aio-dio-write-verify

generic/551 sometimes fails because it's killed by OOM killer.
That is because aio-dio-write-verify, which is called by
generic/551, tries to allocate memory even though the total
allocation size exceeds the available memory.

aio-dio-write-verify allocates memory according to the 'size'
argument, and generic/551 passes the argument.

Stop adding the argument when the total size is exceeds
the available memory.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/551