Commit Graph

40 Commits

Author SHA1 Message Date
Kenneth D. Merry
93729c1796 Add support to physio(9) for devices that don't want I/O split and
configure sa(4) to request no I/O splitting by default.

For tape devices, the user needs to be able to clearly understand
what blocksize is actually being used when writing to a tape
device.  The previous behavior of physio(9) was that it would split
up any I/O that was too large for the device, or too large to fit
into MAXPHYS.  This means that if, for instance, the user wrote a
1MB block to a tape device, and MAXPHYS was 128KB, the 1MB write
would be split into 8 128K chunks.  This would be done without
informing the user.

This has suboptimal effects, especially when trying to communicate
status to the user.  In the event of an error writing to a tape
(e.g. physical end of tape) in the middle of a 1MB block that has
been split into 8 pieces, the user could have the first two 128K
pieces written successfully, the third returned with an error, and
the last 5 returned with 0 bytes written.  If the user is using
a standard write(2) system call, all he will see is the ENOSPC
error.  He won't have a clue how much actually got written.  (With
a writev(2) system call, he should be able to determine how much
got written in addition to the error.)

The solution is to prevent physio(9) from splitting the I/O.  The
new cdev flag, SI_NOSPLIT, tells physio that the driver does not
want I/O to be split beforehand.

Although the sa(4) driver now enables SI_NOSPLIT by default,
that can be disabled by two loader tunables for now.  It will not
be configurable starting in FreeBSD 11.0.  kern.cam.sa.allow_io_split
allows the user to configure I/O splitting for all sa(4) driver
instances.  kern.cam.sa.%d.allow_io_split allows the user to
configure I/O splitting for a specific sa(4) instance.

There are also now three sa(4) driver sysctl variables that let the
users see some sa(4) driver values.  kern.cam.sa.%d.allow_io_split
shows whether I/O splitting is turned on.  kern.cam.sa.%d.maxio shows
the maximum I/O size allowed by kernel configuration parameters
(e.g. MAXPHYS, DFLTPHYS) and the capabilities of the controller.
kern.cam.sa.%d.cpi_maxio shows the maximum I/O size supported by
the controller.

Note that a better long term solution would be to implement support
for chaining buffers, so that that MAXPHYS is no longer a limiting
factor for I/O size to tape and disk devices.  At that point, the
controller and the tape drive would become the limiting factors.

sys/conf.h:	Add a new cdev flag, SI_NOSPLIT, that allows a
		driver to tell physio not to split up I/O.

sys/param.h:	Bump __FreeBSD_version to 1000049 for the addition
		of the SI_NOSPLIT cdev flag.

kern_physio.c:	If the SI_NOSPLIT flag is set on the cdev, return
		any I/O that is larger than si_iosize_max or
		MAXPHYS, has more than one segment, or would have
		to be split because of misalignment with EFBIG.
		(File too large).

		In the event of an error, print a console message to
		give the user a clue about what happened.

scsi_sa.c:	Set the SI_NOSPLIT cdev flag on the devices created
		for the sa(4) driver by default.

		Add tunables to control whether we allow I/O splitting
		in physio(9).

		Explain in the comments that allowing I/O splitting
		will be deprecated for the sa(4) driver in FreeBSD
		11.0.

		Add sysctl variables to display the maximum I/O
		size we can do (which could be further limited by
		read block limits) and the maximum I/O size that
		the controller can do.

		Limit our maximum I/O size (recorded in the cdev's
		si_iosize_max) by MAXPHYS.  This isn't strictly
		necessary, because physio(9) will limit it to
		MAXPHYS, but it will provide some clarity for the
		application.

		Record the controller's maximum I/O size reported
		in the Path Inquiry CCB.

sa.4:		Document the block size behavior, and explain that
		the option of allowing physio(9) to split the I/O
		will disappear in FreeBSD 11.0.

Sponsored by:	Spectra Logic
2013-08-24 04:52:22 +00:00
Alexander Motin
2baf3a137d Add links to cam(4). 2010-03-04 11:09:49 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
9cbda59000 Sort sections. 2005-01-21 08:36:40 +00:00
Ruslan Ermilov
5203edcdc5 Mechanically kill hard sentence breaks and double whitespaces. 2004-07-03 18:29:24 +00:00
Ruslan Ermilov
b5e7e99950 Hiten's patchset for section four manpages, slightly edited by me. 2003-06-28 23:53:39 +00:00
Kazutaka YOKOTA
547d4262b2 Update man pages in the section 4 to match the reality in -CURRENT.
- Change lines referring to kernel configuration file:
        device foo0 at isa port xxx irq yyy...
  to
        device foo
  Describe resource "hints" in /boot/device.hints.

- Try to describe resource allocation and probe/attach behavior in the
  newbus framework.
2001-10-13 09:08:37 +00:00
Jens Schweikhardt
c1f3e4bf21 Removed whitespace at end-of-line; no content changes. I simply did
cd src/share; find man[1-9] -type f|xargs perl -pi -e 's/[ \t]+$//'

BTW, what editors are the culprits? I'm using vim and it shows
me whitespace at EOL in troff files with a thick blue block...

Reviewed by:	Silence from cvs diff -b
MFC after:	7 days
2001-07-14 19:41:16 +00:00
Ruslan Ermilov
3d45e180f4 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:31:11 +00:00
Ruslan Ermilov
eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Ruslan Ermilov
3136363f3e Prepare for mdoc(7)NG. 2000-12-29 09:18:45 +00:00
Ruslan Ermilov
4b66483fd8 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 18:41:33 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Jeroen Ruigrok van der Werven
eddc45e797 Update @freebsd.org email addresses to @FreeBSD.org as is the
precedent.
2000-10-26 15:30:44 +00:00
David E. O'Brien
4a19005c48 Revert rev 1.24.
Facts verfied by:	mckusick
2000-07-13 22:40:50 +00:00
Mike Smith
d50e5bd5cc For tape devices, 'r' means REWIND, not RAW. 2000-05-07 21:47:07 +00:00
David E. O'Brien
92c4078faf "r" (raw) devices aren't named the traditional way any longer. 2000-04-26 12:54:51 +00:00
Sheldon Hearn
6d249eee27 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:50:24 +00:00
Jeroen Ruigrok van der Werven
b9781e2007 Second round of config related changes to the manpages.
device blah0 -> device blah for PCI devices and busses.
2000-01-23 16:13:26 +00:00
Poul-Henning Kamp
05b4ca773e add missing : 1999-09-05 14:57:24 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Chris Costello
7572295323 Fix bad references, remove some invalid ones such as sa(9). 1999-08-14 20:51:13 +00:00
Matt Jacob
8ead41413c Add a clarification in the man page suggesting that some tapes
(QIC) written under 2.X may not be easily read under the current
driver without explicitly setting to variable mode or to the blocksize
these tapes were written under 2.X with.

PR: 6681
1999-06-06 23:23:50 +00:00
Kenneth D. Merry
acea824638 Devices are hardwired with "unit 0", not "lun 0" as was in these man pages.
Also, update the pass(4) man page to indicate that some CCBs must be
sent through the xpt(4) device and cannot be sent through a pass device.

PR:		8826
1999-05-08 21:28:18 +00:00
Guy Helmer
27a379e1e0 erst0 -> ersa0
PR:		docs/9860
1999-03-07 18:57:50 +00:00
Matt Jacob
2ab2a2e58e add a note about exclusive open 1999-02-05 08:06:05 +00:00
Matt Jacob
92efa92441 minor tweaks 1999-02-05 07:48:26 +00:00
Kenneth D. Merry
190831dd81 Update the sa(4) man page for CAM. This was repository-copied from the
st(4) man page.

Take out most of the sd(4) and st(4) man pages and point to the new
da(4) and sa(4) man pages.

Add sa.4 to the makefile.

Reviewed by:	ken
Submitted by:	gibbs
1998-10-16 04:06:21 +00:00
John-Mark Gurney
892cb98e6b add missing cvs Id lines. 1997-03-07 02:50:01 +00:00
John-Mark Gurney
f79219c3ea added man page for /dev/sysmouse. (and activate it)
plus add appropriate xrefs now that we have {cd,sd,st}.9
1997-02-20 15:14:59 +00:00
Julian Elischer
a77a7ee010 After prodding, add a BSD style copyright to those man pages I think
I probably originally wrote. Also take my name OUT of the ddb
man page.. I did NOT port it from mach.
1996-10-18 20:22:31 +00:00
Mike Pritchard
46f84fcb84 Use the .Fx macro to specify FreeBSD version where appropriate. 1996-08-22 23:51:58 +00:00
Mike Pritchard
4a8d02835c Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
Garrett Wollman
d400d99c36 Correct some formatting problems pointed out by bde. 1996-01-19 19:58:33 +00:00
Garrett Wollman
89533cd9d7 Use -mdoc macros correctly. st(4) still needs work. 1996-01-17 21:57:57 +00:00
Andreas Schulz
9854294554 Delete the obsolete reference to st(1) in the SEE ALSO section.
The st(1) command is long ago merged in mt(1).
1995-12-26 04:05:19 +00:00
Jordan K. Hubbard
eeca7892a6 Fix some spelling errors and refer to st0 and st1' rather than cd0 and cd1'
in places (whoops!).
Submitted by:	John Lind <john@starfire.mn.org>
1995-11-05 23:01:18 +00:00
Peter Dufault
2460bdf04b Updated man pages to reflect new configuration options. These man pages
are getting pretty out of date and need to be visited some more.
1995-03-01 22:32:38 +00:00
David Greenman
db35f309d1 Added more missing manual pages from 1.1.5. 1995-01-25 09:18:56 +00:00