Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!endor!dudek From: dudek@endor.harvard.edu (Glen Dudek) Newsgroups: comp.bugs.4bsd Subject: tmscp tape drives give "hard error" on reading too small a record Message-ID: <1681@husc6.UUCP> Date: Thu, 16-Apr-87 12:58:39 EST Article-I.D.: husc6.1681 Posted: Thu Apr 16 12:58:39 1987 Date-Received: Sun, 19-Apr-87 06:11:15 EST Sender: news@husc6.UUCP Reply-To: dudek@endor.UUCP (Glen Dudek) Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 48 Keywords: tmscp, TU81, DEC Index: /usr/sys/vaxuba/tmscp.c 4.3BSD, Ultrix 1.2 Description: When reading a tape written with a blocksize larger than you are using to read, any tmscp tape drive (e.g., TU81, TK50) will die with a kernel printf "hard error: record data truncated" and an I/O error. This should not be an error when using the raw device. Repeat-By: Write a tape with a (reasonably) large blocksize, as in: % tar cvfb /dev/rmt0 20 /etc/motd Use dd to read back the first 512 bytes of the first tape block: % dd if=/dev/rmt0 of=/dev/null bs=512 count=1 Watch the kernel barf. Fix: Get DEC to stop using proprietary protocols which they cannot even write decent drivers for, or Change the following line in /usr/sys/vaxuba/tmscp.c: *** /tmp/,RCSt1027293 Thu Apr 16 13:49:34 1987 --- tmscp.c Thu Apr 16 13:35:05 1987 *************** *** 1548,1554 **** { if (mp->mscp_flags & M_EF_SEREX) tms->tms_serex = 1; ! if (st != M_ST_TAPEM) { tprintf(tms->tms_ttyp, "tms%d: hard error bn%d\n", --- 1548,1559 ---- { if (mp->mscp_flags & M_EF_SEREX) tms->tms_serex = 1; ! /* Truncated record on read of raw device is not ! * an error -gd 4/16/87 ! */ ! if (st != M_ST_TAPEM && ! !(st == M_ST_RDTRN && bp == &rtmsbuf[ui->ui_unit] ! && (mp->mscp_opcode == (M_OP_READ|M_OP_END)))) { tprintf(tms->tms_ttyp, "tms%d: hard error bn%d\n", ----------- Glen Dudek dudek@harvard.harvard.edu Aiken Computation Lab (617) 495-2871