summaryrefslogtreecommitdiffstats
path: root/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-05 20:49:46 +0000
committerpjd <pjd@FreeBSD.org>2007-04-05 20:49:46 +0000
commitb6f1c3fccc28d9f84c1ead17bacde21d07994485 (patch)
treef41474e35b38d2161404c8b86c85dc1f1d8633bb /contrib/opensolaris/lib/libzfs/common/libzfs_util.c
parentac743cabeb93b2c8f96a767b7d80016816f93333 (diff)
downloadFreeBSD-src-b6f1c3fccc28d9f84c1ead17bacde21d07994485.zip
FreeBSD-src-b6f1c3fccc28d9f84c1ead17bacde21d07994485.tar.gz
Fix a problem for file systems that don't implement VOP_BMAP() operation.
The problem is this: vm_fault_additional_pages() calls vm_pager_has_page(), which calls vnode_pager_haspage(). Now when VOP_BMAP() returns an error (eg. EOPNOTSUPP), vnode_pager_haspage() returns TRUE without initializing 'before' and 'after' arguments, so we have some accidental values there. This bascially was causing this condition to be meet: if ((rahead + rbehind) > ((cnt.v_free_count + cnt.v_cache_count) - cnt.v_free_reserved)) { pagedaemon_wakeup(); [...] } (we have some random values in rahead and rbehind variables) I'm not entirely sure this is the right fix, maybe we should just return FALSE in vnode_pager_haspage() when VOP_BMAP() fails? alc@ knows about this problem, maybe he will be able to come up with a better fix if this is not the right one.
Diffstat (limited to 'contrib/opensolaris/lib/libzfs/common/libzfs_util.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud