Module Name:    src
Committed By:   mlelstv
Date:           Sun Apr 11 18:18:39 UTC 2021

Modified Files:
        src/sys/dev: vnd.c

Log Message:
Provide a default preferred I/O size.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/dev/vnd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/vnd.c
diff -u src/sys/dev/vnd.c:1.279 src/sys/dev/vnd.c:1.280
--- src/sys/dev/vnd.c:1.279	Sun Apr 11 18:17:22 2021
+++ src/sys/dev/vnd.c	Sun Apr 11 18:18:39 2021
@@ -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 @@ vndioctl(dev_t dev, u_long cmd, void *da
 		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.

Reply via email to