From 550ba56bfe5bb989220450da306c6d9bbcb6d416 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Sat, 11 Apr 2020 14:38:26 +0000 Subject: [PATCH] explicitly use DEV_BSIZE align for all bmempools this is required for Xen xbd(4) in order to not have to use bounce buffers the alignment is implicitly provided when POOL_REDZONE is not active, this change makes it also aligned when POOL_REDZONE _is_ active - that is when (!KMSAN && (DIAGNOSTIC || KASAN)) --- sys/kern/vfs_bio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 3b61cd0b2f4d..c168f3c021a4 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.291 2020/04/10 17:18:04 ad Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.292 2020/04/11 14:38:26 jdolecek Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.291 2020/04/10 17:18:04 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.292 2020/04/11 14:38:26 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_bufcache.h" @@ -513,7 +513,7 @@ bufinit(void) pa = (size <= PAGE_SIZE && use_std) ? &pool_allocator_nointr : &bufmempool_allocator; - pool_init(pp, size, 0, 0, 0, name, pa, IPL_NONE); + pool_init(pp, size, 0, DEV_BSIZE, 0, name, pa, IPL_NONE); pool_setlowat(pp, 1); pool_sethiwat(pp, 1); }