SCSI tape data loss
Carl Reisinger
cer at mirapoint.com
Tue Jun 3 07:01:59 PDT 2003
>
>- When using tar (or say Bacula), how do you know
> your writes are split by the kernel?
One of my pet peeves, you don't know. Physio just blindly does
this, which I believe is fine for a disk but can be quite
annoying when applied to a tape device. Makes me wish for a
physio that works like the USG and Research V7 versions which
would just fail the write if it could not perform it in one
shot (showing my age here).
In the case
> of Bacula, with the buffer size I use, it ALWAYS
> gets back exactly what it wrote. From my userland
> perspective I see no double writes.
Then, so far, your buffers have been correcty aligned. If you
use malloc they will be (check the malloc man page, this is
mentioned in the first paragraph).
>
>- What is the "page" that you are referring to?
> Paged memory? If I am not mistaken the page
> size can be radically different depending on the
> OS and hardware. I.e. 1024 to 4096 or even more.
>
Here's where I fall down. The page register I keep mentioning
is the x86 MMU registers, I really do not know their proper
name in the x86 world. One register can map up 64K but must be
page (4096 byte) aligned.
>- How does one determine what a page size is,
> preferably in a system independent way?
>
I don't know how widespread this is, but check out
getpagesize(3).
If you count system include headers as system independent then
PAGE_SIZE can be used (it's in param.h).
If you start messing around with the max write size then
DFLTPHYS can be used as the limit.
Carl
More information about the freebsd-scsi
mailing list