diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-07 19:17:53 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2016-12-07 19:17:53 +0000 |
commit | 83c80f9f437e664d349d684b89b2094aa6e76cfb (patch) | |
tree | 99c1891ceb37c956531d6c64cbdc9a936bcbb70f /sys/dev/pv | |
parent | 77f2c6e718b4d8b14647b00df3e73ffc027bbe35 (diff) |
Fall back to the minimum amount of ring pages
Some AWS volumes lack both max-ring-page-order and max-ring-pages
properties so we have to default to a minimum amount of 1 ring page.
Noticed and fix tested by reyk@ on EC2.
Diffstat (limited to 'sys/dev/pv')
-rw-r--r-- | sys/dev/pv/xbf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index b5229de38a4..ef3b454fba2 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.2 2016/12/07 18:33:45 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.3 2016/12/07 19:17:52 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -767,8 +767,9 @@ xbf_init(struct xbf_softc *sc) if (error == 0) sc->sc_xr_size = res; } + /* Fallback to the known minimum */ if (error) - goto errout; + sc->sc_xr_size = XBF_MIN_RING_SIZE; if (sc->sc_xr_size < XBF_MIN_RING_SIZE) sc->sc_xr_size = XBF_MIN_RING_SIZE; |