Commit Graph

2618 Commits

Author SHA1 Message Date
John Baldwin
3e6b5668b4 Catch up to the dirpref changes by copying new fields in the alternate
superblock from the original superblock so that differences in those new
fields are ignored.
2001-04-10 22:11:01 +00:00
Ian Dowse
317d5933d4 Split out all the RPC code into a separate function and address a
number of issues:

- Fix background mounts; these were broken in revision 1.40.
- Don't give up before trying all addresses returned by getaddrinfo().
- Use protocol-independent routines where possible.
- Improve error reporting for RPC errors.
- In non-background mode, give up after trying all protocols once.
- Use daemon(3) instead of rolling our own version.
- Never go ahead with the mount() syscall until we have received
  a reply from the remote nfsd; this is especially important with
  non-interruptible mounts, as otherwise a mistyped command might
  require a reboot to correct.

Reviewed by:	alfred, Martin Blapp <mb@imp.ch>
2001-04-10 22:05:47 +00:00
Ruslan Ermilov
7e3ba257a8 vnconfig(8) -> mdconfig(8). 2001-04-10 16:29:41 +00:00
Nik Clayton
044479f5ad Add information about the new options to newfs and tunefs which set the
expected average file size and number of files per directory.  Could do
with some fleshing out.
2001-04-10 10:36:44 +00:00
Kirk McKusick
a61ab64ac4 Directory layout preference improvements from Grigoriy Orlov <gluk@ptci.ru>.
His description of the problem and solution follow. My own tests show
speedups on typical filesystem intensive workloads of 5% to 12% which
is very impressive considering the small amount of code change involved.

------

  One day I noticed that some file operations run much faster on
small file systems then on big ones. I've looked at the ffs
algorithms, thought about them, and redesigned the dirpref algorithm.

  First I want to describe the results of my tests. These results are old
and I have improved the algorithm after these tests were done. Nevertheless
they show how big the perfomance speedup may be. I have done two file/directory
intensive tests on a two OpenBSD systems with old and new dirpref algorithm.
The first test is "tar -xzf ports.tar.gz", the second is "rm -rf ports".
The ports.tar.gz file is the ports collection from the OpenBSD 2.8 release.
It contains 6596 directories and 13868 files. The test systems are:

1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
   test is at wd1. Size of test file system is 8 Gb, number of cg=991,
   size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
   from Dec 2000 with BUFCACHEPERCENT=35

2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
   at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
   number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
   OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50

You can get more info about the test systems and methods at:
http://www.ptci.ru/gluk/dirpref/old/dirpref.html

                              Test Results

             tar -xzf ports.tar.gz               rm -rf ports
  mode  old dirpref new dirpref speedup old dirprefnew dirpref speedup
                             First system
 normal     667         472      1.41       477        331       1.44
 async      285         144      1.98       130         14       9.29
 sync       768         616      1.25       477        334       1.43
 softdep    413         252      1.64       241         38       6.34
                             Second system
 normal     329         81       4.06       263.5       93.5     2.81
 async      302         25.7    11.75       112          2.26   49.56
 sync       281         57.0     4.93       263         90.5     2.9
 softdep    341         40.6     8.4        284          4.76   59.66

"old dirpref" and "new dirpref" columns give a test time in seconds.
speedup - speed increasement in times, ie. old dirpref / new dirpref.

------

Algorithm description

The old dirpref algorithm is described in comments:

/*
 * Find a cylinder to place a directory.
 *
 * The policy implemented by this algorithm is to select from
 * among those cylinder groups with above the average number of
 * free inodes, the one with the smallest number of directories.
 */

A new directory is allocated in a different cylinder groups than its
parent directory resulting in a directory tree that is spreaded across
all the cylinder groups. This spreading out results in a non-optimal
access to the directories and files. When we have a small filesystem
it is not a problem but when the filesystem is big then perfomance
degradation becomes very apparent.

What I mean by a big file system ?

  1. A big filesystem is a filesystem which occupy 20-30 or more percent
     of total drive space, i.e. first and last cylinder are physically
     located relatively far from each other.
  2. It has a relatively large number of cylinder groups, for example
     more cylinder groups than 50% of the buffers in the buffer cache.

The first results in long access times, while the second results in
many buffers being used by metadata operations. Such operations use
cylinder group blocks and on-disk inode blocks. The cylinder group
block (fs->fs_cblkno) contains struct cg, inode and block bit maps.
It is 2k in size for the default filesystem parameters. If new and
parent directories are located in different cylinder groups then the
system performs more input/output operations and uses more buffers.
On filesystems with many cylinder groups, lots of cache buffers are
used for metadata operations.

My solution for this problem is very simple. I allocate many directories
in one cylinder group. I also do some things, so that the new allocation
method does not cause excessive fragmentation and all directory inodes
will not be located at a location far from its file's inodes and data.
The algorithm is:
/*
 * Find a cylinder group to place a directory.
 *
 * The policy implemented by this algorithm is to allocate a
 * directory inode in the same cylinder group as its parent
 * directory, but also to reserve space for its files inodes
 * and data. Restrict the number of directories which may be
 * allocated one after another in the same cylinder group
 * without intervening allocation of files.
 *
 * If we allocate a first level directory then force allocation
 * in another cylinder group.
 */

  My early versions of dirpref give me a good results for a wide range of
file operations and different filesystem capacities except one case:
those applications that create their entire directory structure first
and only later fill this structure with files.

  My solution for such and similar cases is to limit a number of
directories which may be created one after another in the same cylinder
group without intervening file creations. For this purpose, I allocate
an array of counters at mount time. This array is linked to the superblock
fs->fs_contigdirs[cg]. Each time a directory is created the counter
increases and each time a file is created the counter decreases. A 60Gb
filesystem with 8mb/cg requires 10kb of memory for the counters array.

  The maxcontigdirs is a maximum number of directories which may be created
without an intervening file creation. I found in my tests that the best
performance occurs when I restrict the number of directories in one cylinder
group such that all its files may be located in the same cylinder group.
There may be some deterioration in performance if all the file inodes
are in the same cylinder group as its containing directory, but their
data partially resides in a different cylinder group. The maxcontigdirs
value is calculated to try to prevent this condition. Since there is
no way to know how many files and directories will be allocated later
I added two optimization parameters in superblock/tunefs. They are:

        int32_t  fs_avgfilesize;   /* expected average file size */
        int32_t  fs_avgfpdir;      /* expected # of files per directory */

These parameters have reasonable defaults but may be tweeked for special
uses of a filesystem. They are only necessary in rare cases like better
tuning a filesystem being used to store a squid cache.

I have been using this algorithm for about 3 months. I have done
a lot of testing on filesystems with different capacities, average
filesize, average number of files per directory, and so on. I think
this algorithm has no negative impact on filesystem perfomance. It
works better than the default one in all cases. The new dirpref
will greatly improve untarring/removing/coping of big directories,
decrease load on cvs servers and much more. The new dirpref doesn't
speedup a compilation process, but also doesn't slow it down.

Obtained from:	Grigoriy Orlov <gluk@ptci.ru>
2001-04-10 08:38:59 +00:00
Dima Dorfman
f643366677 Make the list in the DIAGNOSTICS section "-tag" instead of "-diag":
the former makes it more obvious as to there the error message starts
and the explanation begins.

PR:		26431
2001-04-10 01:03:29 +00:00
Dima Dorfman
7401f04659 wd0 -> ad0
PR:		26343
Submitted by:	Sergey A. Osokin <osa@FreeBSD.org.ru>
2001-04-08 18:41:22 +00:00
Poul-Henning Kamp
46e78a1f19 Don't make fsck go quite _that_ fast:
In Preen mode we only checked one partition per disk device.
2001-04-07 13:24:59 +00:00
Ruslan Ermilov
b9ad8c8635 beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
Bruce Evans
594279ec73 Fixed some printf format errors (don't assume that ntohl() returns u_long). 2001-04-05 07:37:55 +00:00
Ruslan Ermilov
18841862f0 mdoc(7) police: use .Nm instead of hardcoded name. 2001-04-04 10:36:16 +00:00
Nik Clayton
355c6ef4b4 wd1s1a -> ad1s1a
Submitted by:	sanpei
2001-04-04 08:42:40 +00:00
Bruce Evans
5f98b5af89 Fixed style bugs in previous commit. 2001-04-03 09:35:36 +00:00
David E. O'Brien
8af4736afe Document the newfs.c rev 1.33 changing the default c/g from 16 to 22. 2001-04-02 22:48:54 +00:00
David E. O'Brien
991bf32193 Fix patch merge braino. 2001-04-02 22:46:02 +00:00
David E. O'Brien
b2cd1ce8ee Allow enabling soft updates (with -U) on a new filesystem.
[I first added this functionality, and thought to check prior art.  Seeing
OpenBSD had already done this, I changed my addition to reduce the diffs
between the two and went with their option letter.]
Obtained from:	OpenBSD
2001-04-02 01:25:55 +00:00
Kirk McKusick
853f677e4d Use fs->fs_ipg rather than cg->cg_niblk as the latter is only
16-bits and may overflow.

Obtained from:	Bruce Evans <bde@zeta.org.au>
2001-03-31 22:17:38 +00:00
Andrey A. Chernov
deffdffafa - Back out the last (wrong) commit, and readd a modified version
of pingnfsserver(). The pingnfsport() function is now called everytime.
  If we don't get RPC_SUCCESS or RPC_PROGVERSMISMATCH back, there's
  something wrong with the NFS server and we just exit.

- Fix cfs mount on IPv4-only machines

- Fixed the looping when we did not run background mode.

- Fixed a getnameinfo() call with uninitialized adress.
  This is a NetBSD bug I didn't notified :-( Thanks Ian !

- Added some #ifdef NFSKERB

- Removed some unused variables.

- Fixed idention

- Remove unnecessary ":" in openlog ident

Submitted by:	Martin Blapp <mb@imp.ch>
Reviewed by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-03-31 20:45:21 +00:00
Adrian Chadd
333ec30d71 Quoting from the email thrown around between kirk, bde and iedowse@..
<QUOTE>
Overflow of cg_niblk causes spurious "SUMMARY INFORMATION BAD" warnings
prompts in fsck_ffs.  cg_niblk has type int16_t, but it is (ab)used
to hold the number of inodes per group (it has nothing to do with the
number of inode blocks in the cg as claimed in ffs/fs.h), and there
can be lots of inodes per group.  E.g.,

    newfs -i 8192 -b 16384 -f 16384 -c 255 ...

gives 0xA900 inodes/group.  Assignment of this to cg_niblk gives
-0x5700.  This is mostly harmless (ufs/ffs doesn't use cg_niblk, and
bug-for-bug compatible overflow occurs in newfs), but in
fsck_ffs/pass5.c, negative values of cg_niblk limit cg_irotor to 0
and the summary info appears to be bad.
</QUOTE>

Submitted by:	Bruce Evans <bde@zeta.org.au>
Obtained from:	Kirk McKusick <mckusick@mckusick.com>
2001-03-31 15:19:58 +00:00
David E. O'Brien
6cc546f248 Remove two lint directives that aren't needed since rev 1.5. 2001-03-30 16:51:51 +00:00
Poul-Henning Kamp
0af7bca250 This change sanitizes the way fsck deals with pass numbers.
Consider this /etc/fstab:

# Device         Mountpoint      FStype  Options    Dump    Pass#
/dev/ad1s1b      none            swap    sw         0       0
/dev/ad0s1b      none            swap    sw         0       0
/dev/ad0s1a      /               ufs     rw         1       1
/dev/ad0s1e      /home           ufs     rw         2       2
/dev/ad1s1e      /tmp            ufs     rw         2       2
/dev/ad1s1f      /usr            ufs     rw         2       2
/dev/ccd0c       /syv            ufs     rw         2       11
proc             /proc           procfs  rw         0       0

ccd0c is striped over /dev/ad0f and /dev/ad1g

Without this pass, fsck in preen mode will check ad0s1a first,
and then issue three processes in parallel:

One process doing ad0s1e
One process doing ad1s1e and ad1s1f
One process doing ccd0c

There is no way to tell it that ccd0c overlaps ad0 and ad1.

With the patch, it will do it this way:

pass 2:
One process doing ad0s1e
One process doing ad1s1e and ad1s1f

and when they are complete:

pass 11:
One process doing ccd0c

This is much faster and more sane.

Valid pass numbers are anything from 1 to INTMAX-1.

I retired the '-l' option which tried to allow people to do
something like this, but which didn't work and which complicated
the code an awful lot.
2001-03-30 08:01:34 +00:00
Poul-Henning Kamp
6d4a212d49 Allow specification of which source address to use for encapsulation.
PR:		25847
Submitted by:	Eugene Polovnikov <eugene@brain-fag.org>
2001-03-28 17:30:26 +00:00
David E. O'Brien
b2f6bdeeaa Make rev 1.5 better match the rest of dump(8)'s output. 2001-03-27 19:38:34 +00:00
David E. O'Brien
8cc6e4d84a Do not exit if unable to read /etc/dumpdates or create it.
If one is trying to dump or repair an ill system, give the user a fighting
chance.  Refusing to operate w/o a very non-critical file (feature) is
just plain stupid.
2001-03-27 19:28:00 +00:00
Alfred Perlstein
8f15078110 give the "netgrent" functions a home in netdb.h 2001-03-27 09:49:03 +00:00
Kenneth D. Merry
3393f8daa3 Rewrite of the CAM error recovery code.
Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
2001-03-27 05:45:52 +00:00
David E. O'Brien
094ab93715 The common wisdom is to use the largest number of cylinders per group.
So bump the default from `16' to `22', which is the largest value allowed
with the current default block size.  This change increases the the
group size from 32MB/g to 44MB/g on a 4GB SCSI disk.
2001-03-27 01:34:58 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Alfred Perlstein
e0a509bb08 Don't call daemon() and setup our signal handlers until after we check
and do the unregister/reregister work.

Don't call syslog in the unregister/reregister code as we haven't called
openlog() yet.

Be a more conservative about accepting errno values from socket(2),
only EPROTONOSUPPORT means that the kernel isn't supporting it
something like INET6.  The other possible errnos would be returned
if there was a mistake in the socket(2) call so remove them from the
list of "acceptable" return values.
2001-03-25 23:32:55 +00:00
Alfred Perlstein
69444aa31b Disable ipv6 when getnetconfigent("udp6"/"tcp6") fails.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 23:28:03 +00:00
Alfred Perlstein
7b98a1d680 Replace pmap_unset() with rpcb_unset() which fixes the unregistering.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 19:59:07 +00:00
Alfred Perlstein
95b9973991 Deal with lack of IPv6 support gracefully.
Submitted by: Martin Blapp <mb@imp.ch>
2001-03-25 19:57:58 +00:00
Alfred Perlstein
12d6e650c6 fix -o port=xxx 2001-03-25 19:18:43 +00:00
Ollivier Robert
ed873335b7 Respect style(9), one must not include both <sys/types.h> and
<sys/param.h> (the latter includes the former).

Submitted by:	bde
2001-03-22 13:19:32 +00:00
Alfred Perlstein
9eb8ec95f4 Include headers to unbreak world.
Submitted by: Ollivier Robert <roberto@eurocontrol.fr>
2001-03-21 20:30:35 +00:00
Kirk McKusick
7578c6ab98 Additions to run checks on live filesystems. This change will not
affect current systems until fsck is modified to use these new
facilities. To try out this change, set the fsck passno to zero
in /etc/fstab to cause the filesystem to be mounted without running
fsck, then run `fsck_ffs -p -B <filesystem>' after the system has
been brought up multiuser to run a background cleanup on <filesystem>.
Note that the <filesystem> in question must have soft updates enabled.
2001-03-21 09:48:03 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Ian Dowse
85ae580ccb Reboot(8) normally waits 5 seconds after sending SIGTERMs to all
processes and then sends SIGKILLs. If a lot of processes are swapped
out, this delay may not be long enough, so processes such as an X
server may be killed before they have had time to clean up properly.

Make this delay more dynamic by waiting up to 60 seconds for swap
page-in activity to end. While I'm here, ANSIfy and remove a
`register' specifier.
2001-03-20 17:22:48 +00:00
Ruslan Ermilov
a24add3fb3 mdoc(7) police: fixes to the previous revision:
- fixed bad formatting
- avoid using German
- removed hard sentence break
2001-03-20 10:57:25 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Ruslan Ermilov
fe997d964c Fix minor mdoc(7) and spelling nits. 2001-03-19 08:20:34 +00:00
Søren Schmidt
29ad98da92 Activate atacontrol 2001-03-19 07:59:38 +00:00
Søren Schmidt
69658f3595 Some minor cleanups to the code, no new functionality. 2001-03-19 07:58:47 +00:00
Søren Schmidt
3ec5a2774f Incorporate most of Ruslans changes plus minor addtion by me 2001-03-19 07:57:25 +00:00
Hajimu UMEMOTO
e3a50e99c6 Correct typo in usage.
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
2001-03-18 18:45:43 +00:00
Ruslan Ermilov
e1a85079e7 It is the ``nostrictjoliet'' option equivalent to -b.
Reviewed by:	bp
2001-03-16 12:55:54 +00:00
Warner Losh
ab820341c1 Back out ru's changes. Soren has requested this and I see no reason
to not just do it.  It is his new code that is being actively
developed so he has say over it.  ru's direct changes were premature
as they occurred less than 4 hours after it was committed to the tree.
2001-03-16 08:07:00 +00:00
Ruslan Ermilov
7350bb3af1 mdoc(7) police: removed hard sentence break introduced in rev 1.82. 2001-03-16 07:39:46 +00:00
Dima Dorfman
32de505213 Explain that TCP fragments with an offset of 1 are reported as being
dropped by rule -1 if logging is enabled.

PR:		25796
Submitted by:	Crist J. Clark <cjclark@alum.mit.edu>
Approved by:	nik
2001-03-16 01:28:11 +00:00
Ruslan Ermilov
905a2385bf Make this compile with ${BDECFLAGS}, apply style(9), cleanup manpage. 2001-03-15 19:28:58 +00:00
Søren Schmidt
6ad7a0b6f2 Add atacontrol, a util to control variuos aspects of the ATA.4 driver,
please consult atacontrol.8 for usage..
2001-03-15 15:40:53 +00:00
Ruslan Ermilov
3832aecacb mdoc(7) police: add a missing An call. 2001-03-12 09:18:12 +00:00
Boris Popov
8c602ed981 Update userland interface for broken Joilet disks.
Reviewed by:	adrian
2001-03-11 10:06:28 +00:00
Maxim Sobolev
ed23a390c2 In the absence of explicit `-t type'' option assume that `-f file''
implies ``-t vnode''.

Approved by:	phk
2001-03-09 21:15:08 +00:00
Poul-Henning Kamp
e10469fef8 Make md(4) and mdconfig(8) take over the role of vn(4) and vnconfig(8)
entirely as previously advertised.

md(4) adopted all assets of vn(4) some time back and has proper devfs
support and cloning abilities to boot.
2001-03-09 20:09:28 +00:00
Poul-Henning Kamp
83da2a90ae 1) If mdconfig isn't given an action argument, it assumes detach.
2) Running `mdconfig -l` without any attached devices results in
mdconfig printing "md0" to standard output.

Submitted by:	dd [1]

[1] no, not "dd(1)" but "Dima Dorfman"
2001-03-09 20:05:06 +00:00
Ruslan Ermilov
211bfbd228 Add new option -m which allows the user to set IP TTL. 2001-03-09 13:20:23 +00:00
David E. O'Brien
ff7405adba bye-bye documented raw devices 2001-03-09 13:06:53 +00:00
David E. O'Brien
02344806db bye-bye documented raw device 2001-03-09 13:06:09 +00:00
David E. O'Brien
8454c72c24 Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
and remove leading `r'(aw) from it.
2001-03-08 09:04:40 +00:00
Dag-Erling Smørgrav
867dd03869 Restore the -c option, which was accidentally removed from the getopt
string two revisions ago.
2001-03-06 01:58:30 +00:00
Ruslan Ermilov
7733674e31 mdoc(7) police: misc formatting fixes.
(This page still needs a lot of work.)
2001-03-05 15:33:54 +00:00
Warner Losh
8d3105e8d4 First attempt to not overflow in disk space calculations. Use off_t
for the size variable used to calculate the size of the partition.
Also use ULL suffix for constants to ensure that we use 64 bit math.
2001-03-05 03:39:57 +00:00
David E. O'Brien
9a901d972d Fix style nit. 2001-03-04 13:19:51 +00:00
Kris Kennaway
b5bc4b5cb2 Correct grammar in comment. 2001-03-04 07:14:11 +00:00
David E. O'Brien
801382fa98 Support inheritance of the "nodump" flag down a hierarchy.
Submitted by:	Dima Dorfman <dima@unixfreak.org>
Obtained from:	NetBSD
2001-03-03 11:35:50 +00:00
Jeroen Ruigrok van der Werven
8a8d42eebb Fix typo present since 1997: single used mode -> single user mode. 2001-03-03 08:12:58 +00:00
David E. O'Brien
1d9153d7ad Use _PATH_DEV.
Reviewed by:	grog
2001-02-28 17:50:29 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Poul-Henning Kamp
3f6f92161c Remove "autounit" from settable options, it's the default unless you
specify -u.

Spotted by:	dcs
2001-02-26 15:31:47 +00:00
Ruslan Ermilov
f806cd425e Backout -a restriction hack.
Requested by:	rwatson
2001-02-26 08:09:51 +00:00
John W. De Boskey
3233afaec7 Allow for easier configuration when using disklabel. A sample
being:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   400M        0    4.2BSD     4096 16384    75     # (Cyl.    0 - 812*)
  b:     1G        *      swap
  c:      *        *    unused
  e: 204800        *    4.2BSD
  f:     5g        *    4.2BSD
  g:      *        *    4.2BSD

   These patches are the original work of Randell Jesup, and
I believe Matt Dillon, with additional work by Warner Losh.
Please let me know if I've left someone out.

   Incorporated into this is the fix for PR bin/22727.

   This patchset still has style issues and a possible problem on
large disks. However, it was a agreed to get these committed before
performing major surgery on them.

PR:		bin/22727
Submitted by:	Randell Jesup <rjesup@wgate.com>
2001-02-25 16:47:44 +00:00
Poul-Henning Kamp
a69134f24c Forgot to remove unneeded "intcmp" function. 2001-02-25 13:14:41 +00:00
Poul-Henning Kamp
174b5e9aec Make "md" and "mdctl" macroized parameters.
Implement "-l" option to mdconfig which can list one or all md devices.

Submitted by:   Dima Dorfman <dima@unixfreak.org>
2001-02-25 13:12:57 +00:00
Poul-Henning Kamp
57e9624ec9 Make md/mdconfig do kld.
Submitted by:	dcs
2001-02-24 16:26:41 +00:00
Ruslan Ermilov
b52c326cfc Restrict -a to root only.
PR:		bin/25337
2001-02-24 10:16:54 +00:00
Paul Saab
6afb6d0aa9 Elminate common declaration.
Reviewed by:	peter
2001-02-22 21:53:39 +00:00
Hajimu UMEMOTO
650d202dbd some reasoning why we separated ping(8) and ping6(8)
comments/additions/corrections are welcome.

Obtained from:	KAME
2001-02-22 19:00:51 +00:00
Nik Clayton
3ae0515eec Mention the edquota(8) utility when talking about editing quota.user
and quota.group.

PR:		docs/25124
2001-02-22 11:07:58 +00:00
Ruslan Ermilov
dc60ef4a4e Document that the IPFW messages are logged via syslogd(8). 2001-02-22 09:12:44 +00:00
Hajimu UMEMOTO
bf8a1b099f if no address is setted, do not call ioctl(SIOCAIFADDR)
Obtained from:	KAME
2001-02-21 18:15:18 +00:00
Alfred Perlstein
729d4f1db0 Fix vinum for both devfs and non-devfs systems.
userland tool:

  Use the vfs.devfs.generation sysctl to test for devfs presense
  (thanks phk!) when devfs is active it will not try to create the
  device nodes in /dev and therefore will not complain about the
  failure to do so.

  Revert the change in the #define for VINUM_DIR in the kernel
  header so that vinum can find its device nodes.

  Replace perror() with vinum_perror() to print file/line when
  DEVBUG is defined (not defined by default).

kernel:

  Don't use the #define names for the "superdev" creation since
  they will be prepended by "/dev/" (based on VINUM_DIR), instead
  use string constants.

  Create both debug and non-debug "superdev" nodes in the devfs.

Problem noticed and fix tested by: Martin Blapp <mblapp@fuchur.lan.attic.ch>
2001-02-20 22:07:36 +00:00
Brian Feldman
c0511d3b58 Switch to using a struct xucred instead of a struct xucred when not
actually in the kernel.  This structure is a different size than
what is currently in -CURRENT, but should hopefully be the last time
any application breakage is caused there.  As soon as any major
inconveniences are removed, the definition of the in-kernel struct
ucred should be conditionalized upon defined(_KERNEL).

This also changes struct export_args to remove dependency on the
constantly-changing struct ucred, as well as limiting the bounds
of the size fields to the correct size.  This means: a) mountd and
friends won't break all the time, b) mountd and friends won't crash
the kernel all the time if they don't know what they're doing wrt
actual struct export_args layout.

Reviewed by:	bde
2001-02-18 13:30:20 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Dag-Erling Smørgrav
4c98f36d94 Document the new -k option in usage message and man page. 2001-02-16 16:28:36 +00:00
Dag-Erling Smørgrav
532c19016b Add a -k option that prevents clearing the dump after saving it.
Use sysctlbyname() instead of sysctl().

Clear up and simplify the version extraction code.

Attempt to detect stretches of zeroes in the dump and avoid writing
them to disk to save space and time.
2001-02-16 16:27:32 +00:00
Yoshihiro Takahashi
7f77ae5795 Added pc98 support.
Submitted by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
2001-02-16 13:30:27 +00:00
Tor Egge
a46d9bce72 Don't allow special devices of type NODEV (NOUDEV as seen from kernel).
They can't be created via mknod and the kernel crashes if it encounters
such an inode.
Approved by:	mckusick
2001-02-15 22:26:21 +00:00
Ruslan Ermilov
d4339464da mdoc(7) police: normalize the construct. 2001-02-15 08:36:20 +00:00
Sheldon Hearn
63ca8f4ad1 Fix grammar nit in previous commit. 2001-02-14 15:03:20 +00:00
Poul-Henning Kamp
bb07ec8c84 Introduce a new feature in IPFW: Check of the source or destination
address is configured on a interface.  This is useful for routers with
dynamic interfaces.  It is now possible to say:

        0100 allow       tcp from any to any established
        0200 skipto 1000 tcp from any to any
        0300 allow       ip from any to any
        1000 allow       tcp from 1.2.3.4 to me 22
        1010 deny        tcp from any to me 22
        1020 allow       tcp from any to any

and not have to worry about the behaviour if dynamic interfaces configure
new IP numbers later on.

The check is semi expensive (traverses the interface address list)
so it should be protected as in the above example if high performance
is a requirement.
2001-02-13 14:12:37 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
Nik Clayton
8684bec007 Use ".Nm fsck_ffs", so that this turns up in whatis(1), and others.
Add .Xr to fsck.

Prompted by:	JM Jr's script that shows binaries with no whatis info
Reviewed by:	adrian
2001-02-12 17:50:14 +00:00
Poul-Henning Kamp
421b0201ed Fix a cosmetic problem with some very defensive programming: The devfs
mount would show up as "/dev/", loose that trailing slash.
2001-02-08 22:07:08 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Jeroen Ruigrok van der Werven
9a01d32bfd Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris
2001-02-06 10:39:38 +00:00
Dan Moschuk
51ab799576 mount a --> mount an
PR: 24842
Submitted by: Rich Morin <rdm@cfcl.com>
2001-02-04 18:05:21 +00:00
Nik Clayton
01c78dbb09 Add an xref for mount_ntfs.
PR:             docs/24693
Submitted by:   Etienne Vidal <hallik@libertysurf.fr>
2001-02-02 03:08:48 +00:00
Ruslan Ermilov
610a5778c5 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:44:04 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ian Dowse
16241a05dd Fsck_ffs did not properly range-check the inode 'di_size'
field, so it was possible for a filesystem marked clean by fsck_ffs
to cause kernel crashes later when mounted. This could occur when
fsck_ffs was used to repair a badly corrupted filesystem.

As pointed out by bde, it is not sufficient to restrict di_size to
just the superblock fs_maxfilesize limit. The use of 32-bit logical
block numbers (both in fsck and the kernel) induces another file
size limit which is usually lower than fs_maxfilesize. Also, the
old 4.3BSD filesystem does not have fs_maxfilesize initialised.

Following this change, fsck_ffs will enforce exactly the same
file size limits as are used by the kernel.

PR:		kern/15065
Discussed with:	bde
Reviewed by:	bde, mckusick
2001-01-31 15:16:56 +00:00
Poul-Henning Kamp
fb1023d670 Strip optional prefixes "/dev/" and "md" from the -u argument. 2001-01-31 08:41:18 +00:00
Poul-Henning Kamp
7cf109c1b4 Make mount_mfs annoy users for 15 seconds and point them at mdconfig(8). 2001-01-30 10:21:20 +00:00
Ben Smithurst
e50fa3d247 Fix 'tunefs -p'
Reviewed by:	sheldonh
2001-01-29 11:00:16 +00:00
Poul-Henning Kamp
941ee63274 Use <sys/queue.h> instead of home-rolled list.
Submitted by:	"Jason Smethers" <jsmethers@pdq.net>
2001-01-29 09:45:51 +00:00
Poul-Henning Kamp
bfa0b2984d Use \a instead of \007 for making noise.
Submitted by:	"Jason Smethers" <jsmethers@pdq.net>
2001-01-28 21:21:37 +00:00
Poul-Henning Kamp
3b42f2f3bb Duh, the version of mdconfig.c I committed came from the wrong machine.
Commit the right version, but without the -b option which is too evil
for the present.

Remove -b and preload from the manpage as well.
2001-01-28 20:17:46 +00:00
Poul-Henning Kamp
353f4b3966 Don't specify fragment size, it autosizes from the sectorsize.
Remember to set mode 1777 on /tmp

Submitted by:	mjacob
2001-01-28 20:03:02 +00:00
Brian S. Dean
f59091e7cd Print out the target device when the mount fails. 2001-01-25 20:05:34 +00:00
Brian S. Dean
20ee96993b Always print out the target device when the mount fails, not just on
ENOENT.
2001-01-25 20:03:38 +00:00
Brian S. Dean
a04ea1b860 Provide a better error message when the /dev entry is non-existant.
Due to the old message, I spent way more time debugging a diskless
root problem than it should have taken.
2001-01-25 17:29:07 +00:00
Kris Kennaway
1b2556e4a4 Fix the vulnerability with TCP ECE packets recently fixed in ipfw.
This is untested, but believed to work.
2001-01-23 21:11:28 +00:00
Hajimu UMEMOTO
e26aac8d24 avoid conflicting #define symbol (s/FW_IFNLEN/IP6&/).
Obtained from:	KAME
2001-01-22 19:20:06 +00:00
Ben Smithurst
23dafeaced mdoc police.
Submitted by:	ru
2001-01-22 18:37:51 +00:00
Ruslan Ermilov
5501231a13 man(7) -> mdoc(7). 2001-01-22 17:44:36 +00:00
Hajimu UMEMOTO
dd9d139453 Room to hold rules should be dynamically allocated.
PR:		kern/24248
2001-01-20 22:40:39 +00:00
Ben Smithurst
b112c02bc6 Add 'netrange' parameter to 'range' command and fix a couple of typos.
PR:		23984
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-01-20 21:37:37 +00:00
Bruce Evans
3b9a046dbe Removed unused copy of ../mount/getmtopts.3.
Removed used copies of ../mount/getmntopts.c ../mount/mntopts.h.  Use the
versions in ../mount directly like all other mount utilities.

Removed used copy of ../mount/pathnames.h.  Use the version in ../mount
for free as a side effect of using the mntopts files there.  We should
not use it at all, since the 2/3 of the definitions in it are in <paths.h>
and the other 1/3 should be in ../mountd/pathnames.h and is not used by
mount_ifs anyway.
2001-01-17 04:10:06 +00:00
Bruce Evans
6e3d19c8ff Removed unused rotting copy of ../mount/mount.8. It should never have
been repo-copied.
2001-01-17 03:39:53 +00:00
Ruslan Ermilov
9884911506 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
Ruslan Ermilov
896eb7d10c Prepare for mdoc(7)NG. 2001-01-16 09:15:57 +00:00
Greg Lehey
458b6188cb Fix typo.
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
PR:		24233

Fix typos.

Submitted by:	"Jeroen C. van Gelderen" <jeroen@vangelderen.org>
2001-01-15 22:15:05 +00:00
Ian Dowse
f55ff3f3ef The ffs superblock includes a 128-byte region for use by temporary
in-core pointers to summary information. An array in this region
(fs_csp) could overflow on filesystems with a very large number of
cylinder groups (~16000 on i386 with 8k blocks). When this happens,
other fields in the superblock get corrupted, and fsck refuses to
check the filesystem.

Solve this problem by replacing the fs_csp array in 'struct fs'
with a single pointer, and add padding to keep the length of the
128-byte region fixed. Update the kernel and userland utilities
to use just this single pointer.

With this change, the kernel no longer makes use of the superblock
fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c
to indicate that these fields must be calculated for compatibility
with older kernels.

Reviewed by:	mckusick
2001-01-15 18:30:40 +00:00
Poul-Henning Kamp
3a36e32d8c Add a couple of newlines in the output from route monitor 2001-01-15 12:28:48 +00:00
Eivind Eklund
10185bdc57 Replace reference to replacing mkfs(8) with a paragraph actually
describing what newfs *does*.
2001-01-15 03:13:26 +00:00
Dag-Erling Smørgrav
0ef56fd857 Document the -N option in the usage message and the man page. 2001-01-14 19:08:58 +00:00
Dag-Erling Smørgrav
ca5fac557f Add a -N option that makes sysctl(8) print out just the variable names.
Zsh users can add the following to their .zshrc for sysctl completion:

function listsysctls {
    case $1 in
    *.*) set -A reply $(sysctl -AN ${1%.*}) ;;
    *) set -A reply $(sysctl -AN) ;;
    esac
}
compctl -K listsysctls sysctl

While I'm here, brucify the getopt() switch.
2001-01-14 16:40:06 +00:00
Greg Lehey
8b075ef933 Remove references to lockinfo.plex.
Reported by: 	dougb
2001-01-14 11:42:19 +00:00
Ruslan Ermilov
739cdd4baa Mdoc(7)ify. 2001-01-10 14:53:46 +00:00
Robert Watson
65450f2f77 o IPFW incorrectly handled filtering in the presence of previously
reserved and now allocated TCP flags in incoming packets.  This patch
  stops overloading those bits in the IP firewall rules, and moves
  colliding flags to a seperate field, ipflg.  The IPFW userland
  management tool, ipfw(8), is updated to reflect this change.  New TCP
  flags related to ECN are now included in tcp.h for reference, although
  we don't currently implement TCP+ECN.

o To use this fix without completely rebuilding, it is sufficient to copy
  ip_fw.h and tcp.h into your appropriate include directory, then rebuild
  the ipfw kernel module, and ipfw tool, and install both.  Note that a
  mismatch between module and userland tool will result in incorrect
  installation of firewall rules that may have unexpected effects.  This
  is an MFC candidate, following shakedown.  This bug does not appear
  to affect ipfilter.

Reviewed by:	security-officer, billf
Reported by:	Aragon Gouveia <aragon@phat.za.net>
2001-01-09 03:10:30 +00:00
Ian Dowse
fefd74d87c Document fsck_ffs's new SIGINFO handler.
Reviewed by:	sheldonh
2001-01-03 13:53:48 +00:00
Ben Smithurst
059b15939d Minor layout fixes.
PR:		24004
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2001-01-01 23:30:51 +00:00
Poul-Henning Kamp
e06b153abe Add padding space and a version number to the md_ioctl structre for future
extension.

Add ability to create a preload disk giving an address and a length
(suggested by imp)

Fix bug relating to very small md(4) devices.

Update md.c copyright to reflect the status of code copied from vn.c.
(noticed by dillon)
2001-01-01 23:08:26 +00:00
Peter Wemm
623d7cd30e Further tidy up the sbin/init and release builds. 2001-01-01 21:39:00 +00:00
Poul-Henning Kamp
8440a01077 This is not necessarily the correct fix, but at least sbin/init compiles
in a sterile environment like "make release"
2001-01-01 19:46:43 +00:00
Poul-Henning Kamp
8f8def9e2c This is the first snapshot of the new all-singing-and-dancing md(4).
Using the mdconfig(8) program you can now configure memory disks
on malloc(9), swap or a file/vnode.  preloaded md disks also work
as usual.
2000-12-31 13:03:42 +00:00
Poul-Henning Kamp
c2ef0b73df Improve cmdline parsing and messages.
Add a rudimentary man-page.  (I'm no mdoc wizard, feel free to attack my
mistakes and blunders)
2000-12-31 11:20:49 +00:00
Poul-Henning Kamp
32ff2662d1 Use macro API to <sys/queue.h>
Submitted by:	"Peter Avalos" <pavalos@theshell.com>
Reviewed by:	/sbin/md5
2000-12-30 21:05:45 +00:00
Poul-Henning Kamp
83baa1a055 Add mdconfig into the build. 2000-12-28 20:59:35 +00:00
Poul-Henning Kamp
70d586c091 Preliminary scaffolding for the new integrated vn+md device driver.
I decided to work on the md(4) driver and integrate the vn(4)
functionality into it mainly based on the name being more suitable.
Ideally 'vd' as in "virtual disk" would probably be the most logical
but our sound-master pointed out that this would cause uncontrollable
fits of giggles in the brits.  Another complication would the needed
changes to the ramdisk boot/root functionality.

The vn driver will stay around for some time after I complete this
merge for transition reasons, and I'll make it whine to people that
they should migrate to the md(4) driver for some time before it
dies.

The kernel part of the new md(4) driver will be committed after more
testing.
2000-12-28 20:57:57 +00:00
Tim Vanderhoek
5a6d739796 typo: modifes -> modifies 2000-12-28 16:44:47 +00:00
Dag-Erling Smørgrav
c4b267dc7e Retire kernfs (userland part). 2000-12-28 12:59:57 +00:00
Poul-Henning Kamp
28b66787e0 When trying to deduce the diskname from the name so we can run
parallel fsck's one per drive, use the shortest prefix ending in
a digit rather than the longest prefix ending in a digit.

This makes "/dev/ad0s1a" and "/dev/ad0s2a" appear to both reside
on the disk "/dev/ad0" and consequently they will be fsck'ed
sequentially rather than in parallel as now.

In general this heuristic is rather soft and errorprone.  For
instance ccd may often reside on two or more physical disks.  A
good solution would be to look for passes larger than 1 until no
disks are found in a particular pass, that way people could put
ccd stripes in pass 3... and have them fsck'ed sequentially.

Reviewed by:	mjacob
2000-12-27 22:28:40 +00:00
Poul-Henning Kamp
dab777beb8 Use official API to <sys/queue.h> instead of groping around inside the
data structures.

Reviewed by:	imp
2000-12-27 21:38:06 +00:00
Ruslan Ermilov
d90d7015f9 Prepare for mdoc(7)NG. 2000-12-27 14:40:52 +00:00
Sheldon Hearn
20fc4e5c7b Fix hard sentence break introduced in previous commit. 2000-12-20 13:23:50 +00:00
Greg Lehey
c25da7d469 Cosmetics.
Correct location of history file.

Change references from /dev/wd to /dev/ad.

Use more appropriate defaults for stripe size in examples.
2000-12-20 05:08:41 +00:00
Greg Lehey
5e104ad0dd roughlength: Use correct format strings. 2000-12-20 05:07:36 +00:00
Greg Lehey
0b01781882 Correct some comments.
vinum_attach: Get correct names (were being overwritten).

Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2000-12-20 05:05:39 +00:00
Warner Losh
64dee60f8c o Add an example for a large file system.
o Remove bug about boot blocks hating non-8k file systems.  This hasn't been
  the case for a long time.

Not Objected to by: hackers, doc
2000-12-19 21:55:07 +00:00
Ruslan Ermilov
d8aa002e9c Prepare for mdoc(7)NG. 2000-12-19 15:36:48 +00:00
Poul-Henning Kamp
70d8bdef9d Add a missing period and newline to a message.
PR:	23334
Submitted by:	Rich Morin <rdm@cfcl.com>
2000-12-18 21:14:25 +00:00
Ruslan Ermilov
1252c1bb05 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
Poul-Henning Kamp
9d1334552f Add a -a option to show the entire message buffer. 2000-12-17 19:05:17 +00:00
John Polstra
4c6616fc3e Extend the ldconfig security check so that it ignores group-writable
directories in addition to world-writable directories.  As before,
this check can be disabled with the "-i" option, which in turn can
be made the default for boot-up by setting "ldconfig_insecure=YES"
in "/etc/rc.conf".

Also fix an mdoc nit in the manual page.

Submitted by:	Maxime Henrion <mux@qualys.com>
2000-12-17 18:50:56 +00:00
Ian Dowse
6db798cae4 Add a simple SIGINFO handler to fsck_ffs. Shortly after receipt of
a SIGINFO (normally via Ctrl-T), a line will be output indicating
the current phase number and progress information relevant to the
current phase.

Approved by:	mckusick
2000-12-15 14:23:55 +00:00
Alexey Zelkin
97a00e767a Add missing coma in SEE ALSO section
Reported by: Rich Morin <rdm@cfcl.com>
2000-12-14 16:24:38 +00:00
Ruslan Ermilov
88544700ca mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Thomas-Henning von Kamptz
686e661363 Fix a logical bug introduced by changing the formatting.
Submitted by:	ru
Reviewed by:	chm
2000-12-13 22:19:05 +00:00
Ruslan Ermilov
f33c0fddd7 Mdoc(7)ify. 2000-12-13 11:33:19 +00:00
Thomas-Henning von Kamptz
4020c5bc54 corrected spelling mistakes in comments
check a couple of mallocs
usage of errx
linebreaks of DBG_ macros,
correcting the usage of nroff macros

Submitted by:	grog, charnier
Reviewed by:	chm
2000-12-12 20:03:17 +00:00
Ian Dowse
5a59cccc61 Stop restore from looping under certain error conditions. This
corrects cases where restore would spew an infinite stream of
"Changing volumes on pipe input?" messages, or would loop waiting
for a response to the "set owner/mode for '.'" question.

PR:		bin/14250
Reviewed by:	dwmalone
2000-12-12 12:04:02 +00:00
Kirk McKusick
522b7bcdf6 Don't give up on file write errors. Just log them and continue. 2000-12-12 06:30:42 +00:00
Ruslan Ermilov
b24f640551 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:20:31 +00:00
Philippe Charnier
77edab906e The tunefs code assumed that the last argument was the device specification.
We need to parse the arguments first, then open the device (if
specified) and then apply the changes. This change will disallow the
(undocumented) use of multiple instances of the same argument on the
same command line for the sack of a better error message.

Other changes are:
1) the softupdates (-n) now issue a warning about remaining unchanged
2) the usage and man page is changed to specify "space | time" instead of
"optimization preference".

PR:		bin/23335
Submitted by:Mark Peek <mark@whistle.com>
2000-12-10 20:59:30 +00:00
Thomas-Henning von Kamptz
3d5000784d added growfs(8) including ffsinfo(8) to the freebsd base system
Reviewed by:	 grog
2000-12-09 15:27:35 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
Ben Smithurst
8afbbd41f4 Explicitly document the fact that securelevel > 0 means that kernel modules
may not be (un)loaded.

PR:		23350
Submitted by:	Gordon Tetlow <gordont@bluemtn.net>
2000-12-07 21:09:22 +00:00
David E. O'Brien
a8e642f574 Change the spelling of .' to .' from .OBJDIR since `.' really is where
generated files land.  Also give precedence to generated files.
2000-12-05 22:10:43 +00:00
Hajimu UMEMOTO
effd2d8296 test strdup() failures.
from: Chris Faulhaber <jedgar@fxp.org>

Obtained from:	KAME
2000-12-04 13:38:59 +00:00
Andrzej Bialecki
846bd927fa Properly check the return values from malloc(3).
Remove some PNP-related dead code that is unlikely to survive the
changes in -current PNP anyway.

Submitted by:	fixes from Chris Faulhaber <jedgar@freebsd.org>
2000-12-03 00:09:08 +00:00
Chris D. Faulhaber
b673f44d6d Properly check malloc(3) return values
Approved by:	ken
2000-12-01 12:02:16 +00:00
David E. O'Brien
2c5569d6ff The GCC 2.96 snapshots have slightly different rules for finding include
files.  Mostly -I${.CURDIR} was needed -- especially for YACC generated
files as the new cpp does not look in the ultimate source file
(ie, the .y file)'s directory as told by the "#line" directive.  Some were
misspellings of "-I${.CURDIR}" as "-I.".
2000-12-01 09:39:28 +00:00
Andrey A. Chernov
17927a641c Add missing && which absense stops 'make world' 2000-11-30 23:01:43 +00:00
Luigi Rizzo
ee7b8babab remove an undefined reference when no VLAN support is compiled in. 2000-11-30 21:35:09 +00:00
David E. O'Brien
6580291ba4 I didn't maintain the "chs" ordering. Rather the bug was in print_part().
Requested by:	bde.
2000-11-29 20:22:47 +00:00
Ben Smithurst
b60884cd68 Fix typos and layout problem.
PR:		23109
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-28 20:38:20 +00:00
Philippe Charnier
2af14b60ed Remove .Op when arg is required (special | filesystem). Document that at
least one flag is required and check this in the code. Make use of getopt(3).
Generalyze printing `... remains unchanged ...'.
2000-11-28 18:17:15 +00:00
Hajimu UMEMOTO
1ada402aa4 Add missing initialization for IPv6 address lifetime.
PR:		misc/22884
Obtained from:	KAME
2000-11-27 08:44:57 +00:00
Kris Kennaway
797376317f Fix format string warnings 2000-11-27 07:28:15 +00:00
Daniel Harris
32704e5747 Typo fix: forgot -> forget.
PR:		23113
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-26 23:26:51 +00:00
Ruslan Ermilov
7f8047281e mdoc(7) police: misc minor fixes. 2000-11-23 08:18:10 +00:00
Greg Lehey
162b57c009 Correct the pathname of the history file.
Reported by:	Crist J . Clark <cjclark@alum.mit.edu>
2000-11-23 01:41:11 +00:00
Alexey Zelkin
e867267b31 o get rid lfs mentions
o remove non-mdoc groff's instructions
2000-11-22 17:56:21 +00:00
Alexey Zelkin
5a4420e314 We do not support lfs. Remove it from list of remountable fs'es. 2000-11-22 17:54:56 +00:00
Ruslan Ermilov
c23155a43a mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
Kris Kennaway
ffd4007070 Format string paranoia 2000-11-19 13:30:36 +00:00
Ruslan Ermilov
acd99ff192 mdoc(7) police: fix errors uncovered by the new feature of the Nm macro. 2000-11-18 15:50:46 +00:00
David E. O'Brien
0469c254fb Make the order of values prompted for with the "-i" option match print_part() 2000-11-18 02:55:43 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Ruslan Ermilov
d2a46bc99d Describe -deny_incoming better, highlight some keywords,
add myself to the AUTHORS section.
2000-11-16 12:20:54 +00:00
Ben Smithurst
32e5e4cfc3 more removal of trailing periods from SEE ALSO. 2000-11-15 16:44:24 +00:00
Greg Lehey
a0d74c6e9d Document the correct default states for additional plexes of a
multi-plex volume.

Confusion reported by: many

Clarify recommendations for default plex stripe size.
2000-11-14 20:54:37 +00:00
Ruslan Ermilov
70b25a7daf Spell the `daemon' correctly. 2000-11-14 13:53:03 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Nik Clayton
7ba45ea98d Be a little clearer about the relationship between these two.
PR:		    docs/20067
Submitted by:	    Takayuki Hagihara
2000-11-12 16:29:52 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Adrian Chadd
9934b00e84 Remove the block/char device distinction. badsect only worked on bdevs,
and then mapped /dev/foo into /dev/rfoo to get to the character device.
This isn't needed anymore.

Reviewed by: ps
2000-11-09 09:03:19 +00:00
David E. O'Brien
42ea2a63f7 Update usage().
Submitted by:	nectar
2000-11-08 20:41:35 +00:00
Jacques Vidrine
9629a4e92d Build with -DUSE_INET6 so that we can actually use the IPv6 support in
IPFilter 3.4.x.

Approved by:	darrenr, guido
2000-10-31 22:29:27 +00:00
Jordan K. Hubbard
ff7d516252 Add support for virgin disklabels
Submitted by:	dillon
2000-10-31 07:07:39 +00:00
Ruslan Ermilov
0ec2d7d37a IPFW does not discard *any* IP fragments with OFF=1, only TCP ones. 2000-10-30 09:44:20 +00:00
Nik Clayton
1ce9f3171c .Xr to mount_ext2fs, mount_hpfs, mount_linprocfs, mount_nwfs, and
mount_std.

PR:		docs/20369
Submitted by:	bmah
2000-10-29 14:45:36 +00:00
Chris D. Faulhaber
2d45aed6bc Remove obsolete /dev/drum references
Reviewed by:	alex, asmodai, billf
2000-10-29 12:19:52 +00:00
John W. De Boskey
929f494bc7 Cast block number to off_t to avoid possible overflow bugs.
Pointed out by: Bruce Evans <bde@zeta.org.au>
2000-10-24 03:28:59 +00:00
John W. De Boskey
45c29d5cda The write combining code in revision 1.30 needs a few additional
touch ups.  The cache needs to be flushed against block
reads, and a final flush at process termination to force the
backup superblocks to disk.

I believe this will allow 'make release' to complete.

Submitted by:	Tor.Egge@fast.no
2000-10-24 00:08:30 +00:00
Andrew Gallatin
3c884b5097 Give correct results for SYSCTL_LONG arrays when sizeof(int) != sizeof(long)
This fixes unaligned access on alpha for, eg, sysctl kern.ipc.mbtypes.
2000-10-23 21:04:18 +00:00
Dag-Erling Smørgrav
c74e16f917 Work much harder at obtaining a correct device node. If what devname(3)
returns doesn't exist, or doesn't match the desired device, fall back to
scanning /dev for a matching node, and as a last resort, if that fails,
try to create the node ourselves as /dev/dump.

Add comments to several variables and functions.

Clean up syslog(3) usage; use %m instead of strerror(3).

Other minor cleanup.
2000-10-17 22:43:41 +00:00
Peter Wemm
3927beeda1 Implement simple write combining for newfs - this is particularly useful
for large scsi disks with WCE = 0.  This yields around a 7 times speedup
on elapsed newfs time on test disks here.  64k clusters seems to be the
sweet spot for scsi disks using our present drivers.
2000-10-17 00:41:36 +00:00
Adrian Chadd
5332f2e5d8 Pre-IFS commit. Commit IFS-aware fsck and mount utilities.
mount_ifs: repocopy of sbin/mount, with most of the intelligence ripped out
           and "ufs" replaced with "ifs" in the right places. It will only
           mount a single filesystem, rather than the -t <type> magic that
           our real mount does.

fsck_ifs:  repocopy of sbin/fsck_ffs, but the directory structure stuff
           (pass2 and some refcount checks) has been #ifdef'ed out.

src/sbin/Makefile: Build these two utilities

There is probably cruft code left in both which can be removed at a later
date, especially in mount_ifs, but I trust that people will not try
mount_ifs -a ..

Note: there are no man pages installed for these two commands as I haven't
actually written them yet.
2000-10-14 02:44:56 +00:00
Ruslan Ermilov
bc95ac80b2 Allow for IP_FW_ADD to be used in getsockopt(2) incarnation as
well, in which case return the rule number back into userland.

PR:		bin/18351
Reviewed by:	archie, luigi
2000-10-12 07:59:14 +00:00
Ruslan Ermilov
3ab6704228 Reset globals for every new command read from preprocessed file. 2000-10-11 13:02:30 +00:00
Ruslan Ermilov
de2e7393d6 Only interpret the last command line argument as a file to
be preprocessed if it is specified as an absolute pathname.

PR:		bin/16179
2000-10-11 12:17:06 +00:00
David E. O'Brien
d4b552a910 We want the FreeBSD ID as the RCS ID, not the NetBSD one. 2000-10-10 08:57:30 +00:00
Bruce Evans
a1136a2e87 Fixed breakage of CFLAGS and misplacement of $FreeBSD$ in previous commit. 2000-10-10 06:29:33 +00:00
Garrett Wollman
eb2fc78027 Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
Adrian Chadd
9a31743869 .. fsck wrappers aftercommit #1: I don't know how these files got lost,
but they did. Oops.
2000-10-09 10:26:15 +00:00
Adrian Chadd
da7e7114d1 Reviewed by: rwatson, bp
Approved by:	rwatson
Obtained from:	NetBSD source tree

Second part of the fsck wrappers commit. This commit enables the new fsck
code (removing the fsck/* code and replacing it with the netbsd fsck
wrapper code), and enabling some FFS-based utilities to compile.

Details:

* quotacheck, fsdb required modification to use the fsck_ffs/ code rather
  than fsck/ . This might change later since quotacheck requires preen.c
  which should exist in fsck/ rather than fsck_ffs/

* src/Makefile has fsck_ffs added to it so it it built as part of the tree
  now

* share/doc/smm/03.fsck/ uses the SMM.doc/ stuff from fsck_ffs, not fsck.

I've tested this, and it shouldn't require any changes on your machine.
The fsck wrapper reads /etc/fsck and is command-line-compatible enough
to not require rc changes (well, most changes unless you want to do
anything nifty by specifying the fs types explicityly, read the man page
if you want further details on what it can do.)

This now allows us to support multiple filesystem types during bootup.
2000-10-09 10:23:31 +00:00
Adrian Chadd
d9f97000b4 Reviewed by: rwatson, bp
Approved by:	rwatson
Obtained from:	NetbSD source tree

Second part of the fsck wrappers commit. This commit enables the new fsck
code (removing the fsck/* code and replacing it with the netbsd fsck
wrapper code), and enabling some FFS-based utilities to compile.

Details:

* quotacheck, fsdb required modification to use the fsck_ffs/ code rather
  than fsck/ . This might change later since quotacheck requires preen.c
  which should exist in fsck/ rather than fsck_ffs/

* src/Makefile has fsck_ffs added to it so it it built as part of the tree
  now

* share/doc/smm/03.fsck/ uses the SMM.doc/ stuff from fsck_ffs, not fsck.

I've tested this, and it shouldn't require any changes on your machine.
The fsck wrapper reads /etc/fsck and is command-line-compatible enough
to not require rc changes (well, most changes unless you want to do
anything nifty by specifying the fs types explicityly, read the man page
if you want further details on what it can do.)

This now allows us to support multiple filesystem types during bootup.
2000-10-09 10:22:56 +00:00
Adrian Chadd
a8d00279cb .. forgot a ; at the end of the $FreeBSD$ string. How did I actually forget
this? :-)

It builds again.
2000-10-09 09:42:51 +00:00
Adrian Chadd
4336716b84 Some missed magic in the fsck wrapper commit which is required by other
utilities which use bits of fsck_ffs - namely quotacheck and fsdb.
In depth, utilities.c contains blockcheck() which is needed by both,
but also a slew of routines which require bits of the FFS code to be
compiled in. This breaks the fs-specific and non-fs-specific code
up into two files (well, blockcheck() is the only routine in utilities.c,
that'll change later) which makes building fsck_ffs, quotacheck and
fsdb work yet again.

(You won't find commits to fsdb and quotacheck here before I haven't
committed the post-fsck-wrappers version of them yet.)
2000-10-09 09:21:04 +00:00
Adrian Chadd
9ea6f4f0be Reviewed by: rwatson, bp
Approved by:	rwatson
Obtained from:	NetBSD-current source tree

The beginnings of the fsck wrappers stuff from NetBSD. This particular commit
brings a newly repo-copied sbin/fsck_ffs/ (from sbin/fsck/) into fsck wrappers
mode.

A quick overview (the code reflects this):

* Documentation changed to reflect fsck_ffs instead of fsck
* Simply acts on a single filesystem, doesn't try to do any multiple filesystem
  magic - this is done by the fsck wrappers now

And then specific to fsck_ffs:

* link to /sbin/fsck_4.2bsd and /sbin/fsck_ufs. This is because right now
  the filesystem is of type ufs not ffs, and that during autodetection the
  labeltype rather than the VFS type is used - this is because when doing
  an autodetection of filesystem type in the fsck wrapper program, it does
  not have any link between label type (4.2bsd, vinum, etc) and VFS string.

Note that this shouldn't break a build since the required buildworld Makefile
magic and import of the fsck wrapper code into src/sbin/fsck/ will happen
in a seperate commit.
2000-10-09 08:26:35 +00:00
Kris Kennaway
5088aa38a3 Don't overflow our fd_set. This is not a full sync with KAME because there
are a whole lot of other changes which may not be suitable for us.

Obtained from:	KAME
2000-10-08 08:02:35 +00:00
Kris Kennaway
21f181a06a Format string fix. 2000-10-06 23:24:45 +00:00
Ruslan Ermilov
1e7492ffe1 Convert this Makefile to the usual style. 2000-10-06 11:18:11 +00:00
Ruslan Ermilov
79a74459fa Document the latest firewall knobs. 2000-10-06 11:17:06 +00:00
Ruslan Ermilov
507c85be96 Respect the protocol when looking the port up by service name.
PR:		21742
2000-10-04 07:59:19 +00:00
Ruslan Ermilov
8ace7a5e69 Do not force argument to ``ipid'' modifier be in hex, and
accept value of zero as valid for IP Identification field.
2000-10-03 11:23:29 +00:00
Ruslan Ermilov
1b4ea5a1a3 Fixed the printing of TCP flags. 2000-10-03 10:37:03 +00:00
Bill Fumerola
98b829924f Add new fields for more granularity:
IP: version, tos, ttl, len, id
	TCP: seq#, ack#, window size

Reviewed by:	silence on freebsd-{net,ipfw}
2000-10-02 03:03:31 +00:00
Ruslan Ermilov
ce6da1a92a - Documented the host/bits syntax for destination argument.
- Documented that netmask could be specified with third argument.
2000-09-29 10:52:21 +00:00
Ruslan Ermilov
4eed20b85f Interpret the address argument as network-type address for `destination'
argument only.  Before that, the `route add default gateway' first tried
the `gateway' as network address and passed its name to getnetbyname(3),
which in the BIND resolution case does the T_PTR lookup on that name.
2000-09-29 10:50:11 +00:00
Ruslan Ermilov
ecfe112d3e Fixed the case where argument of 0.0.0.0/8 would match the default route. 2000-09-29 10:37:16 +00:00
Ruslan Ermilov
3ea420e391 Document that net.inet.ip.fw.one_pass only affects dummynet(4).
Noticed by:	Peter Jeremy<peter.jeremy@alcatel.com.au>
2000-09-29 08:39:06 +00:00
Dag-Erling Smørgrav
c548151f51 Remove superfluous code:
1) use devname() instead of searching /dev for the dump device

   2) use fopen() instead of open() so we don't need to differentiate
      between compressing and not compressing when writing the core
      file or the kernel (zopen() returns a FILE *, so we just use
      fwrite() in both cases)

There should be no functional changes.
2000-09-28 20:09:36 +00:00
Greg Lehey
5a7e6cbe50 Add 'setupstate' to RAID-10 example.
Tripped-over-by:	Nicole Harrington <nicole@picturetrail.com>
2000-09-23 00:18:31 +00:00
Kenneth D. Merry
de2464d3bc Adjust 'camcontrol negotiate -v' so it prints out the initiator ID from the
Path Inquiry CCB.
2000-09-17 20:42:28 +00:00
Poul-Henning Kamp
fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Sheldon Hearn
01de01168f Improve the clarification of the handling of the securelevel.
Submitted by:	bde
2000-09-13 08:39:41 +00:00
Matt Jacob
cbd8ecd6ac Fix sign extension.
PR:		21232
Obtained from:	Christian Weisgerber <naddy@mips.inka.de>
2000-09-12 21:42:58 +00:00
Sheldon Hearn
67b661fd0a Clarify the handling of the securelevel.
PR:		20974
2000-09-12 12:30:13 +00:00
Dag-Erling Smørgrav
b6e55a056a Fix comment to match previous commit, as per bde. 2000-09-07 07:03:11 +00:00
Jacques Vidrine
248aee623c Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
Dag-Erling Smørgrav
81667275a9 Don't warn about unknown mount types, since they most likely simply mean
that the right module hasn't been loaded yet (and mount(8) will do so
when necessary).
2000-09-06 17:44:07 +00:00