Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Provide a default preferred I/O size.



details:   https://anonhg.NetBSD.org/src/rev/2c00160ac046
branches:  trunk
changeset: 961166:2c00160ac046
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Apr 11 18:18:39 2021 +0000

description:
Provide a default preferred I/O size.

diffstat:

 sys/dev/vnd.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 6a72873a6abb -r 2c00160ac046 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Sun Apr 11 18:17:22 2021 +0000
+++ b/sys/dev/vnd.c     Sun Apr 11 18:18:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $        */
+/*     $NetBSD: vnd.c,v 1.280 2021/04/11 18:18:39 mlelstv Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.279 2021/04/11 18:17:22 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.280 2021/04/11 18:18:39 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -1433,6 +1433,10 @@
                if (error)
                        vnd->sc_iosize = vnd->sc_vp->v_mount->mnt_stat.f_frsize;
 
+               /* Default I/O size to DEV_BSIZE */
+               if (vnd->sc_iosize == 0)
+                       vnd->sc_iosize = DEV_BSIZE;
+
                /*
                 * Use pseudo-geometry specified.  If none was provided,
                 * use "standard" Adaptec fictitious geometry.



Home | Main Index | Thread Index | Old Index