From owner-freebsd-scsi Thu May 30 05:34:33 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA11705 for freebsd-scsi-outgoing; Thu, 30 May 1996 05:34:33 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id FAA11686 for ; Thu, 30 May 1996 05:34:25 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id WAA19690; Thu, 30 May 1996 22:19:02 +1000 Date: Thu, 30 May 1996 22:19:02 +1000 From: Bruce Evans Message-Id: <199605301219.WAA19690@godzilla.zeta.org.au> To: freebsd-scsi@freebsd.org, wilko@yedi.iaf.nl Subject: Re: removing 32 kbyte limit from dump Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >But I'm not really satisfied by this. I'd rather see that the st.c >driver returns EINVAL or something like that when an attempt is made >to write an impossible block size (and of course dump should act >accordingly when it receives the error value). 96K is not impossible. It just gets mutilated to 64K+32K by physio(), and the error isn't detected because both 64K and 32K are possible. physio() needs to have a do-not-split flag. Similar problems probably affect cd and worm devices. An i/o of 100 * 2352 byte blocks would be mutilated at 64K boundaries. This can be fixed using the current physio() interface: don't use rawread()/ rawwrite(), and provided a minphys() function that returns (MAXPHYS / 2352) * 2352 (it must be <= MAXPHYS because physio() uses min(MAXPHYS, minphys()). >--- 167,177 ---- > case 'b': /* blocks per tape write */ > ntrec = numarg('b', "number of blocks per write", > 1L, 1000L, &argc, &argv); >! /* XXX physio() is currently unable > 64 kByte I/Os */ >! /* so lets tell the user now and not wait for him/her >! /* to see the console message */ >! if ( ntrec > 64 ) { >! msg("Please choose a blocksize <= 64 \n"); > exit(X_ABORT); 64 should be MAXPHYS/1024. Bruce