vkernel: cap vdisk max. io size to MAXPHYS
authorFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 2 Apr 2012 17:21:17 +0000 (19:21 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 2 Apr 2012 17:21:17 +0000 (19:21 +0200)
sys/dev/virtual/vkernel/disk/vdisk.c

index c468d6c..73a813d 100644 (file)
@@ -120,7 +120,7 @@ vkdinit(void *dummy __unused)
                                  DEVSTAT_PRIORITY_DISK);
                sc->dev = disk_create(sc->unit, &sc->disk, &vkd_ops);
                sc->dev->si_drv1 = sc;
-               sc->dev->si_iosize_max = 256 * 1024;
+               sc->dev->si_iosize_max = min(MAXPHYS,256*1024);
 
                TAILQ_INIT(&sc->cotd_queue);
                TAILQ_INIT(&sc->cotd_done);