Clearing buffers in magtape read/write

Clearing buffers in magtape read/write

Post by The Grey Wo » Fri, 05 Jul 1991 11:38:21



Hi there!

I have a question regarding clearing DMA buffers when dealing with mag-
netic tape -- namely, how?  I've R'd TFM and TFM doesn't say one GDT
about how to clear the buffers such that one does not write garbage
onto the next tape of a multi-tape set.  For the curious, I'm trying
to implement a tape handler which functions as follows:

First tape:
        write volume header
        write file info
        write file data
        ** potentially short block at end of tape **

Subsequent tapes:
        write volume header
        rewrite the block in its entirety
        continue writing files
        ** potentially short block at end of tape **

OS, Machine are pretty much irrelevant, I think, as I'm looking for something
somewhat portable.  If it matters, I'm testing this on a VAX, a Pyramid,
and a Sun 3/180 with half-inch reel tape, and a Sun 3/50 with quarter-inch
cartridge tape.

Any help is appreciated.  I keep trying to capture the residual count
and read the excess off into a junk buffer so that nothing remains to be
read, but I'd like some way of just discarding the contents of the buffer.
And yes, the SCSI drive  *does*  seem to hang on to some data.

--
# "Religion is a weapon invented by the sheep to keep the wolves in line."

 
 
 

Clearing buffers in magtape read/write

Post by Peter W. Poorm » Tue, 09 Jul 1991 23:45:19



Quote:>OS, Machine are pretty much irrelevant, I think, as I'm looking for something
>somewhat portable.  

Unfortunately, it matters a great deal.  There are no formal standards for
UNIX tape support, and the defacto standards are inadequate for multi-reel
situations.

As a result, the kind of things you want to do are done differently on
every vendor's system.

-- Pete Poorman

   "UNIX Tape Support" is an oxymoron.

 
 
 

Clearing buffers in magtape read/write

Post by John Dar » Tue, 09 Jul 1991 22:12:47


I used tar to write files to tape.  When I hit the end of tape mark
I read the tape and compared the last successfully written file with
the ones in my tar list.  Then I mounted a new tape and continued
where I left off.
--
John T. Darby, (DLA Systems Automation Center, DSAC-TMA, P.O. Box 1605
Columbus, OH, 43216-5002, 614 238-9174)            BE ALL YOU CAN BE!
UUCP: {osu-cis}!dsac!jdarby  DSAC, TEAM ATTACK     DO ALL YOU CAN DO!

 
 
 

1. A simple link,write buffer is full and read buffer is empty.

There are two program running in two servers.the following error happened:

One server:the writer
tcp        0  32186 192.168.1.21:9234       192.168.1.18:53181
ESTABLISHED
another server: the reader
tcp        0      0 192.168.1.18:53181      192.168.1.21:9234
ESTABLISHED

and both server are blocked. One is reading and another is writing.
I wonder why it happenes and how to resolve.
Thanks a lot.

2. Buffered output?

3. Clearing the input buffer before a read.

4. References on: RCS/SCCS and (N)Curses???

5. How to read magtape?

6. Running console application in KDE

7. Sockets: write() writes OK, yet read() reads garbage...?

8. Win95 with Linux howto?

9. Flushing the read and write buffers

10. Flushing Socket Read/Write Buffers

11. read/write buffering with sockets

12. clear command - Clear does not clear my screen.

13. reading from stdin, buffer it and writing to stdout