NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38643: [dM] st tape drive loses data



Hi,

prompted by discussion elsewhere, I had a brief glance at this
bug.

I don't have any suggestions for a fix, but I may have an
observation (which I'm sure you've thought of yourself as well,
but it's good to have it written down anyway).

On nearly all NetBSD ports, the MAXPHYS constant is 64KB, and any
physical I/O operation can at most transfer this much data in one
operation.

1048577 is an odd size to read, if you were expecting an integral
number of 10KB tape blocks -- it's 16 * 64KB + 1 (why the +1?).

I suspect your first big read operation is being broken up into
separate MAXPHYS-sized requests, instead of just a single block
being read.  I'm not sufficiently familiar with the code to
suggest where that split is being done, though, although I think
I would take a long hard look at the changes to kern_physio.c
between the two releases, and perhaps have a chat with yamt@
(CC'ed here), as he has been in there making some significant
changes between netbsd-3-0-RELEASE and netbsd-4-0-RELEASE.

(...which means that even though I've taken a cursory look, I
wasn't able to pinpoint where the problem is...)

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index