On Fri, 29 Aug 2014, Miod Vallat wrote: > > +++ b/sys/dev/pci/vioblk.c > > @@ -63,6 +63,7 @@ > > #include <scsi/scsi_disk.h> > > #include <scsi/scsiconf.h> > > > > +#define MINPHYS (20*1024) > > This makes no sense. If you want to override MINPHYS, you need to > override for the whole kernel, not only here.
MINPHYS is just a name I have chosen. It is not used anywhere else in the kernel. You are confusing this with MAXPHYS. > > > @@ -157,6 +158,8 @@ vioblk_minphys(struct buf *bp, struct scsi_link *sl) > > struct vioblk_softc *sc = sl->adapter_softc; > > if (bp->b_bcount > sc->sc_xfer_max) > > bp->b_bcount = sc->sc_xfer_max; > > + if (bp->b_bcount > MINPHYS) > > + bp->b_bcount = MINPHYS; > > This is useless. sc->sc_xfer_max is computed so that it will always be > <= MINPHYS. sc->sc_xfer_max is computed according to the host's capabilities. What I want to simulate with this diff is a host adapter that can only cope with transfers < 64k == MAXPHYS.