From owner-cvs-all@FreeBSD.ORG Sat Jan 14 14:32:42 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9F1016A41F; Sat, 14 Jan 2006 14:32:42 +0000 (GMT) (envelope-from mjacob@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67F7843D49; Sat, 14 Jan 2006 14:32:42 +0000 (GMT) (envelope-from mjacob@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k0EEWgOI077343; Sat, 14 Jan 2006 14:32:42 GMT (envelope-from mjacob@repoman.freebsd.org) Received: (from mjacob@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k0EEWglh077342; Sat, 14 Jan 2006 14:32:42 GMT (envelope-from mjacob) Message-Id: <200601141432.k0EEWglh077342@repoman.freebsd.org> From: Matt Jacob Date: Sat, 14 Jan 2006 14:32:41 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/cam/scsi scsi_sa.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2006 14:32:42 -0000 mjacob 2006-01-14 14:32:41 UTC FreeBSD src repository Modified files: sys/cam/scsi scsi_sa.c Log: 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 Revision Changes Path 1.106 +87 -6 src/sys/cam/scsi/scsi_sa.c