Commit Graph

58414 Commits

Author SHA1 Message Date
Robert Watson
bfe2c6ad72 o Change the default from using IO_SYNC on EA set and delete operations
to not using IO_SYNC.  Expose a sysctl (debug.ufs_extattr_sync) for
  enabling the use of IO_SYNC.

    - Use of IO_SYNC substantially degrades ACL performance when a
      default ACL is set on a directory, as there are four synchronous
      writes initiated to define both supporting EAs for new
      sub-directories, and to set the data; two for new files.  Later, this
      may be optimized to two writes for sub-directories, one for new
      files.

    - IO_SYNC does not substantially improve consistency properties due
      to the poor consistency properties of existing permissions (which
      ACLs are a superset of), due to interaction with soft updates,
      and due to differences in handling consistency for data and file
      system meta-data.

    - In macro-benchmarks, this reduces the overhead of setting default
      ACLs down to the same overhead as enabling ACLs on a file system
      and not using them.  Enabling ACLs still introduces a small
      overhead (I measure 7% on a -j 2 buildworld with pre-allocated
      EA backing store, but this is not rigorous testing, nor in any way
      optimized).

    - The sysctl will probably change to another administration method
      (or at least, a better name) in the near future, but consistency
      properties of EAs are still being worked out.  The toggle is defined
      right now to allow easier performance analysis and exploration
      of possible guarantees.

Obtained from:	TrustedBSD Project
2001-04-03 04:09:53 +00:00
Alfred Perlstein
5ea487f34d Use only one mutex for the entire mbuf subsystem.
Don't use atomic operations for the stats updating, instead protect
the counts with the mbuf mutex.  Most twiddling of the stats was
done right before or after releasing a mutex.  By doing this we
reduce the number of locked ops needed as well as allow a sysctl
to gain a consitant view of the entire stats structure.

In the future...

  This will allow us to chain common mbuf operations that would
  normally need to aquire/release 2 or 3 of the locks to build an
  mbuf with a cluster or external data attached into a single op
  requiring only one lock.

  Simplify the per-cpu locks that are planned.

There's also some if (1) code that should check if the "how"
operation specifies blocking/non-blocking behavior, we _could_ make
it so that we hold onto the mutex through calls into kmem_alloc
when non-blocking requests are made, but for safety reasons we
currently drop and reaquire the mutex around the calls.

Also, note that calling kmem_alloc is rare and only happens during
a shortage so drop/re-getting the mutex will not be a common
occurance.

Remove some #define's that seemed to obfuscate the code to me.

Remove an extranious comment.

Remove an XXX, including mutex.h isn't a crime.

Reviewed by: bmilekic
2001-04-03 03:15:11 +00:00
John Baldwin
5b3047d59f Change stop() to require the sched_lock as well as p's process lock to
avoid silly lock contention on sched_lock since in 2 out of the 3 places
that we call stop(), we get sched_lock right after calling it and we were
locking sched_lock inside of stop() anyways.
2001-04-03 01:39:23 +00:00
Brian Somers
fb45b6d4e3 Allow MOD_UNLOADs of if_tun, and handle event handler registration
failures in MOD_LOAD.

Dodge duplicate make_dev() calls by (ab)using dev->si_drv2 to
remember if we created the device node via a dev_clone callback
before the d_open call.
2001-04-03 01:22:15 +00:00
Paul Saab
05ba6e6a36 Fix probing on the alpha. It still causes the alpha to panic during
attach.
2001-04-03 00:26:34 +00:00
Brian S. Dean
bb09faafdb Change the order in which /etc files are copied into place; copy
default first, then network-specific files, then host-specific files.
I think this was the original intent, as Matt indicated the previous
code appeared to be a bug.
2001-04-03 00:24:01 +00:00
John Baldwin
606e1d6816 Remove bogus block device major now that bdev majors are gone. 2001-04-02 23:36: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
Ian Dowse
cd51746902 There were a few error cases where the RPC code would return with
all signals masked (whoops). Add the missing cleanup code.

Reviewed by:	Martin Blapp <mb@imp.ch>, alfred
2001-04-02 22:14:13 +00:00
Brian Somers
2c514a3101 If ifpromisc() fails the SIOCSIFFLAGS ioctl, put ifp->if_flags
back the way we found them.
2001-04-02 21:49:40 +00:00
Brian Somers
9c36ab644e Return 0 and do nothing when we get a SIOCSIFFLAGS.
Without this, ifpromisc() always fails (after setting the IFF_PROMISC
bit in ifp->if_flags) and bpf never bothers to turn promiscuous mode off.

PR:	20188
2001-04-02 21:49:18 +00:00
Ian Dowse
9f5afc134f Move the #includes of reentrant.h to after the `#include "namespace.h"',
so that the underscored versions of the pthread functions get
declared.  This removes around 300 lines of 'implicit declaration
of XXX' warnings from the output of a libc build with -Wall.

Reviewed by:	Martin Blapp <mb@imp.ch>, alfred
2001-04-02 21:41:44 +00:00
Bruce A. Mah
a7d51bb8c8 New release notes: fsck(8) and /etc/fstab passes, newfs(8) -U,
libcrypt Blowfish support.

Fix a typo:  newfs is section 8, not section 1.
2001-04-02 21:26:49 +00:00
Bruce A. Mah
fe1826cc9e MFC candidate:
Fix ABOUT.TXT to be consistent with LAYOUT.TXT with respect to
the size of an unpacked ports collection (the stated 100MB
is a bit of an overestimate, but better to be conservative).

PR:		22778
Submitted by:	David <ddavid@ican.net>
2001-04-02 19:06:52 +00:00
John Baldwin
1333047621 - Move the second stop() of process 'p' in issignal() to be after we send
SIGCHLD to our parent process.  Otherwise, we could block while obtaining
  the process lock for our parent process and switch out while we were
  in SSTOP.  Even worse, when we try to resume from the mutex being blocked
  on our p_stat will be SRUN, not SSTOP.
- Fix a comment above stop() to indicate that it requires that the proc lock
  be held, not a proctree lock.

Reported by:	markm
Sleuthing by:	jake
2001-04-02 17:26:51 +00:00
Nick Hibma
899a73c0a6 Regen. 2001-04-02 13:12:15 +00:00
Nick Hibma
d8ee57ce7d Add Agate Q-Drive.
Submitted by:	Ian Cartwright <ian351c@home.com>
2001-04-02 13:11:59 +00:00
Nick Hibma
59a42a13d5 Regen. 2001-04-02 13:02:36 +00:00
Nick Hibma
0a191eddb4 Sync with NetBSD usbdevs 2001-04-02 13:02:17 +00:00
Ruslan Ermilov
18453f1ad3 Do not override `realinstall' target, use ${PROGNAME}. 2001-04-02 12:06:00 +00:00
Ruslan Ermilov
a73313a679 Do not override `realinstall' target, use ${PROGNAME}. 2001-04-02 11:54:59 +00:00
Ruslan Ermilov
95f8c8262a Introduce ${PROGNAME}, the name that the program will be installed as,
if different from ${PROG}.  (The name PROGNAME was stolen from NetBSD.)

Reviewed by:	bde
2001-04-02 11:44:20 +00:00
Warner Losh
581a68a232 Add support for MODULES_OVERRIDE. This is a list of modules to build
instead of all of them.  You can put this in /etc/make.conf or in
makeoptions.

Reviewed by: arch@

# docs to follow.
2001-04-02 08:52:05 +00:00
Ruslan Ermilov
a381d6c906 Backout revision 1.6 (removed the NOSHARED bit.)
These must be compiled static so that it is possible
to use them early in the boot process.

Requested by:	imp
2001-04-02 08:47:25 +00:00
Ruslan Ermilov
393a5770a8 Removed the NOSHARED bit. 2001-04-02 07:27:46 +00:00
Dima Dorfman
1818ea96a7 Fix a grammar bogon. 2001-04-02 06:21:13 +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
Robert Watson
aad65d6f79 o Correct an ACL implementation bug that could result in a system panic
under heavy use when default ACLs were bgin inherited by new files
  or directories.  This is done by removing a bug in default ACL
  reading, and improving error handling for this failure case:

    - Move the setting of the buffer length (len) variable to above the
      ACL type (ap->a_type) switch rather than having it only for
      ACL_TYPE_ACCESS.  Otherwise, the len variable is unitialized in
      the ACL_TYPE_DEFAULT case, which generally worked right, but could
      result in failure.

    - Add a check for a short/long read of the ACL_TYPE_DEFAULT type from
      the underlying EA, resulting in EPERM rather than passing a
      potentially corrupted ACL back to the caller (resulting "cleaner"
      failures if the EA is damaged: right now, the caller will almost
      always panic in the presence of a corrupted EA).  This code is similar
      to code in the ACL_TYPE_ACCESS handling in the previous switch case.

    - While I'm fixing this code, remove a redundant bzero() of the ACL
      reader buffer; it need only be initialized above the acl_type
      switch.

Obtained from:	TrustedBSD Project
2001-04-02 01:02:32 +00:00
Dima Dorfman
4811703143 Hook the extattr_get_file.2 manual page into the build. Add MLINKS
for extattr_set_file.2 and extattr_delete_file.2.
2001-04-01 23:46:56 +00:00
Dima Dorfman
7a6b7e421d A manual page for the extattr_get_file, extattr_set_file, and
extattr_delete_file system calls.

Reviewed by:	rwatson, ru
Approved by:	nik
2001-04-01 23:45:11 +00:00
Gregory Neil Shapiro
67f58bb6d8 Allow users to override the default map type used for building maps. 2001-04-01 22:54:15 +00:00
Gregory Neil Shapiro
5d312ac168 The userdb database is different from the rest of the databases. It *must*
be a btree.

PR:		bin/26149
2001-04-01 22:48:07 +00:00
Brian Somers
50ca6ec387 Don't assume challenges and responses don't contain embedded '\0's.
Mschapv2 response generation may produce embedded NULs... causing
us to send a bogus response to the radius server and end up
failing the client's valid response.

Problem pointed out by: Eugene Vigovskiy <vigov@com2com.ru>
2001-04-01 22:39:17 +00:00
John Hay
51f5329641 Remove grep from the fixit floppy. This should free enough space to get
the snaps going again.
2001-04-01 14:41:54 +00:00
David E. O'Brien
e32cb81d24 Add spaces around operators.
It's OK, the Project and afford them now -- they aren't as expensive as
they used to be.
2001-04-01 12:18:20 +00:00
David E. O'Brien
5e734d413c Correct a comment. 2001-04-01 11:44:12 +00:00
David E. O'Brien
8c32a31fd2 Try to untangle some of the #ifdef spaghetti.
Also, looking to the future, don't assume all the world is an i386 and all
its disk layout brain damage will be repeated by other platforms.  So all
the diking out if we are an Alpha, becomes adding in if we are an i386.
2001-04-01 11:37:31 +00:00
David E. O'Brien
ad6d7cd03f Add back <err.h> for warn().
(of course it's pretty stupid to call it, as printf doesn't work w/in
sysinstall, and sysinstall is the only consumer of libdisk)
2001-04-01 11:32:56 +00:00
David E. O'Brien
656533ef4d Quiet warnings on the Alpha. 2001-04-01 11:22:40 +00:00
David E. O'Brien
a11b77ba78 Add back <err.h> for warn().
(of course it's pretty stupid to call it, as printf doesn't work w/in
sysinstall, and sysinstall is the only consumer of libdisk)
2001-04-01 10:44:52 +00:00
David E. O'Brien
ad0f825a09 Give a little more variety in the /etc/exports example. 2001-04-01 09:19:23 +00:00
Scott Long
0001afe2f5 Make an attempt to get the asr driver to compile on Alpha by fixing some i386
specific bogons.  Compile with -O0, as anything higher gives the compiler
a fit.  No idea if this driver will actually work on Alpha, though.
2001-04-01 08:33:01 +00:00
Alfred Perlstein
8cf6ffcf6d make code use strxxx() calls
Glanced at by: imp
2001-04-01 07:36:28 +00:00
Yoshihiro Takahashi
ce6c4d9c99 Correct typo. 2001-04-01 07:15:16 +00:00
Yoshihiro Takahashi
dcf81d70de Merged from sys/i386/i386/bioscall.s revision 1.9 and 1.10. 2001-04-01 07:08:13 +00:00
Mitsuru IWASAKI
d5b6ee573a Remove NOSHARED.
The usr.sbin/acpi/ utilities should be compiled non-static.
It just followed the usr.sbin/pccard/Makefile.inc way last time.

Pointed out by: ru and msmith
Committed at:   BSD HANAMI in Japan 2001
2001-04-01 07:00:35 +00:00
Alan Cox
07be3b5e76 Regen after adding linux_sched_get_priority_max() and
linux_sched_get_priority_min().
2001-04-01 06:43:09 +00:00
Yoshihiro Takahashi
43c35a2e4f Merged from sys/i386/isa/clock.c revision 1.171. 2001-04-01 06:41:47 +00:00
Yoshihiro Takahashi
0e319a247e Merged from sys/i386/i386/machdep.c revision 1.446. 2001-04-01 06:40:45 +00:00