Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Jun 2003 07:01:53 -0700
From:      Carl Reisinger <cer@mirapoint.com>
To:        Kern Sibbald <kern@sibbald.com>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: SCSI tape data loss
Message-ID:  <a2258404.8e32d868.8285000@alpo.mirapoint.com>

next in thread | raw e-mail | index | archive | help
>
>- 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a2258404.8e32d868.8285000>