freebsd-dev/sys/cam
Matt Jacob de8fa52e52 Incorporate the O_NONBLOCK open semantics of Linux and Solaris. This allows
an application to upon a tape (yea, even the non-control device) even if
it cannot establish a mount session. If the open cannot establish a mount
session and O_NONBLOCK was specified, the tape becomes 'open pending mount'.
All I/O operations that would require access to a tape thereafter until
a close attempt to initiate the mount session. If the mount session succeeds,
the tape driver transitions to full open state, else returns an appropriate
I/O error (ENXIO).

At the same time, add a change that remembers whether tape is being opened
read-only. If so, disallow 'write' operations like writing filemarks that
bypass the normal read-only filtering operations that happen in the write(2)
syscall.

Reviewed by:	ken, justin, grog
MFC after:	2 weeks
Suggested by:	The Bacula Team
2006-01-14 14:32:41 +00:00
..
scsi Incorporate the O_NONBLOCK open semantics of Linux and Solaris. This allows 2006-01-14 14:32:41 +00:00
cam_ccb.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_debug.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_periph.c There should be no need to retry when the CCB status code is 2006-01-08 20:04:55 +00:00
cam_periph.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_queue.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_queue.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_sim.c - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_sim.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_xpt_periph.h - Providing fine-grained malloc statistic by replacing M_DEVBUF with 2005-07-01 15:21:30 +00:00
cam_xpt_sim.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam_xpt.c When deregistering a bus, attempt to flush out all outstanding 2006-01-11 02:06:08 +00:00
cam_xpt.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam.c Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
cam.h Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00