summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2019-09-02 22:17:51 -0400
committerBrian Behlendorf <[email protected]>2019-09-02 19:17:51 -0700
commit1e52716257877dbd97373cc8ca239315eaee2984 (patch)
tree4d920475f24900e535697101e3603e9284ae559d
parenta57c82fc50bced77b7f409595130091360533012 (diff)
maxinflight can overflow in spa_load_verify_cb()
When running on larger memory systems, we can overflow the value of maxinflight. This can result in maxinflight having a value of 0 causing the system to hang. Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Wilson <[email protected]> Closes #9272
-rw-r--r--module/zfs/spa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index f4a6f3f45..d885c20c9 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -2229,7 +2229,8 @@ spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
if (!BP_IS_METADATA(bp) && !spa_load_verify_data)
return (0);
- int maxinflight_bytes = arc_target_bytes() >> spa_load_verify_shift;
+ uint64_t maxinflight_bytes =
+ arc_target_bytes() >> spa_load_verify_shift;
zio_t *rio = arg;
size_t size = BP_GET_PSIZE(bp);