| From | Sent On | Attachments |
|---|---|---|
| Kern Sibbald | Aug 27, 2003 7:45 am | |
| Nate Lawson | Aug 27, 2003 11:06 am | |
| Dan Langille | Aug 27, 2003 11:14 am | |
| Nate Lawson | Aug 27, 2003 11:29 am | |
| Daniel Eischen | Aug 27, 2003 11:36 am | |
| Kern Sibbald | Aug 27, 2003 12:24 pm | |
| Kern Sibbald | Aug 27, 2003 12:27 pm | |
| Kern Sibbald | Aug 27, 2003 12:38 pm | |
| Daniel Eischen | Aug 28, 2003 10:48 am | |
| Dan Nelson | Aug 28, 2003 11:20 am | |
| Dan Langille | Aug 31, 2003 5:33 pm | |
| Dan Langille | Aug 31, 2003 5:34 pm | |
| Dan Langille | Sep 1, 2003 8:17 am |
| Subject: | (Fwd) Re: SCSI tape data loss | |
|---|---|---|
| From: | Kern Sibbald (ke...@sibbald.com) | |
| Date: | Aug 27, 2003 12:38:41 pm | |
| List: | org.freebsd.freebsd-scsi | |
Hello,
On Wed, 2003-08-27 at 20:29, Nate Lawson wrote:
On Wed, 27 Aug 2003, Dan Langille wrote:
On 27 Aug 2003 at 11:06, Nate Lawson wrote:
Here is a response I got by forwarding this to the pthreads maintainer:
A return status of 0 from write is not interpreted as an End-Of-Tape. The threads library isn't smart enough to know that the file is a tape device and that a 0 status should break it out of the loop. Thus, it continues writing.
Use libkse :-)
-- Dan Eischen
Nate: thanks for getting in touch with him.
It is interesting to note that the code works OK on Linux and Solaris. Why is FreeBSD different in this case?
I don't know. Our pthreads implementation is purely userland so it's likely that it is difficult to differentiate a non-blocking read from an EOF.
Perhaps FreeBSD is different from Linux, but my understanding of non-blocking reads is that you get a -1 status with errno set to EWOULDBLOCK (or EAGAIN), while an EOF should return a 0 status.
Best regards,
Kern
Kern: I can't comment on libkse. I don't know it and I don't know what effect it would have on Bacula.
libkse is a drop-in replacement for libpthreads. Unfortunately, it's only on 5.x.
-Nate





