No, also happens on ffs. If the root FS is on an affected device, it looks like this:
root on sd0a (9e7002f8647a2403.a) swap on sd0b dump on sd0b clock: unknown CMOS layout panic: kernel diagnostic assertion "xs->datalen <= MINPHYS" failed: file "../../../../dev/pci/vioblk.c", line 405 Stopped at Debugger+0x9: leave RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! IF RUNNING SMP, USE 'mach ddbcpu <#>' AND 'trace' ON OTHER PROCESSORS, TOO. DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION! ddb{0}> trace Debugger() at Debugger+0x9 panic() at panic+0xfe __assert() at __assert+0x25 vioblk_scsi_cmd() at vioblk_scsi_cmd+0x565 scsi_xs_exec() at scsi_xs_exec+0x35 sdstart() at sdstart+0x16e scsi_iopool_run() at scsi_iopool_run+0x5d scsi_xsh_runqueue() at scsi_xsh_runqueue+0x13d scsi_xsh_add() at scsi_xsh_add+0x98 sdstrategy() at sdstrategy+0x102 spec_strategy() at spec_strategy+0x53 ufs_strategy() at ufs_strategy+0x82 VOP_STRATEGY() at VOP_STRATEGY+0x3b bread_cluster() at bread_cluster+0x2a4 ffs_read() at ffs_read+0x250 VOP_READ() at VOP_READ+0x3f uvn_io() at uvn_io+0x2e2 uvn_get() at uvn_get+0x1f7 uvm_fault() at uvm_fault+0xdf5 trap() at trap+0x62f --- trap (number 6) --- end of kernel end trace frame: 0x7f7ffffdd0c0, count: -20 acpi_pdirpa+0x43ae00: Reproducer patch is below. I am sure it can be reproduced with any other disk driver, but with ahci a reproducer would be a bit more complicated because of the atascsi layer. Maybe VOP_STRATEGY() should do a similar minphys+loop thing as physio() does? --- a/sys/dev/pci/vioblk.c +++ b/sys/dev/pci/vioblk.c @@ -63,6 +63,7 @@ #include <scsi/scsi_disk.h> #include <scsi/scsiconf.h> +#define MINPHYS (20*1024) #define VIOBLK_DONE -1 struct virtio_feature_name vioblk_feature_names[] = { @@ -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; } void @@ -399,6 +402,8 @@ vioblk_scsi_cmd(struct scsi_xfer *xs) int timeout; int slot, ret, nsegs; + KASSERT(xs->datalen <= MINPHYS); + s = splbio(); ret = virtio_enqueue_prep(vq, &slot); if (ret) { On Fri, 29 Aug 2014, David Gwynne wrote: > is it something msdos isnt doing that ffs does? > > On 29 Aug 2014, at 15:55, Stefan Fritsch <s...@sfritsch.de> wrote: > > > On Friday 29 August 2014 10:34:20, David Gwynne wrote: > >> are you expecting minphys to appear in that backtrace? > > > > > > No. In that trace minphys should have limited the transfer size and I > > had put an KASSERT() into vioblk_scsi_cmd() which verified that xs- > >> datalen is not larger than that limit. A call to bread() causes the > > KASSERT to trigger. > >