Commit Graph

118874 Commits

Author SHA1 Message Date
avatar
4aac149919 Honouring ic->ic_dtim_period.
Submitted by:	sam
MFC after:	3 days
2005-10-02 03:55:07 +00:00
yar
1069404ea9 Fix the usage of rc_usage. The rc_usage function takes
a list of possible keywords, not all them in a single argument.
This also fixes the issue of extra delimiter characters appearing
on the help line from rc.d scripts not setting $extra_commands.
2005-10-01 20:58:03 +00:00
glebius
7b6a14399f Note that kern.polling.enable is deprecated. 2005-10-01 20:53:51 +00:00
rwatson
5758dab896 Second attempt at a work-around for fifo-related socket panics during
make -j with high levels of parallelism: acquire Giant in fifo I/O
routines.

Discussed with:	ups
MFC after:	3 days
2005-10-01 20:15:41 +00:00
phk
464deb56c2 Make sure the clone lists are sorted in the right order.
Explosion triggered by:	pjd
MFC:	3 days
2005-10-01 19:21:03 +00:00
glebius
fa91502026 Now ifconfig is the one right way to turn polling on. Thus, remove
the "if" clauses.
2005-10-01 19:14:34 +00:00
truckman
52e0f422bf Correct previous commit to fix the sense of the TDP_NORUNNINGBUF
check in ffs_copyonwrite() that is a precondition for calling
waitrunningbufspace().

Pointed out by:	tegge
Pointy hat to:	truckman
MFC after:	3 days
2005-10-01 19:10:48 +00:00
glebius
c8db4e2407 - Catch up with the fact that HZ is 1000 now by default.
- Remove description of poll in trap feature.
- Tell that polling should be turned on and off with ifconfig.
- Move description of kern.polling.enable to the end and say
  that this a deprecated way of turning polling on.
- Remove note that idle poll has some problems in CURRENT. I failed
  to find them, while Sam and Luigi failed to remember what the
  problem actually were there.
2005-10-01 19:04:22 +00:00
glebius
f41a83bf42 Big polling(4) cleanup.
o Axe poll in trap.

o Axe IFF_POLLING flag from if_flags.

o Rework revision 1.21 (Giant removal), in such a way that
  poll_mtx is not dropped during call to polling handler.
  This fixes problem with idle polling.

o Make registration and deregistration from polling in a
  functional way, insted of next tick/interrupt.

o Obsolete kern.polling.enable. Polling is turned on/off
  with ifconfig.

Detailed kern_poll.c changes:
  - Remove polling handler flags, introduced in 1.21. The are not
    needed now.
  - Forget and do not check if_flags, if_capenable and if_drv_flags.
  - Call all registered polling handlers unconditionally.
  - Do not drop poll_mtx, when entering polling handlers.
  - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx.
  - In netisr_poll() axe the block, where polling code asks drivers
    to unregister.
  - In netisr_poll() and ether_poll() do polling always, if any
    handlers are present.
  - In ether_poll_[de]register() remove a lot of error hiding code. Assert
    that arguments are correct, instead.
  - In ether_poll_[de]register() use standard return values in case of
    error or success.
  - Introduce poll_switch() that is a sysctl handler for kern.polling.enable.
    poll_switch() goes through interface list and enabled/disables polling.
    A message that kern.polling.enable is deprecated is printed.

Detailed driver changes:
  - On attach driver announces IFCAP_POLLING in if_capabilities, but
    not in if_capenable.
  - On detach driver calls ether_poll_deregister() if polling is enabled.
  - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING
    flag. If there is no, then unlocks and returns.
  - In ioctl handler driver checks for IFCAP_POLLING flag requested to
    be set or cleared. Driver first calls ether_poll_[de]register(), then
    obtains driver lock and [dis/en]ables interrupts.
  - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable.
    If present, then returns.This is important to protect from spurious
    interrupts.

Reviewed by:	ru, sam, jhb
2005-10-01 18:56:19 +00:00
truckman
6c6c328bd0 Copy new process argument list in do_execve() before grabbing PROC_LOCK
to avoid touching pageable memory while holding a mutex.

Simplify argument list replacement logic.

PR:		kern/84935
Submitted by:	"Antoine Pelisse" apelisse AT gmail.com (in a different form)
MFC after:	3 days
2005-10-01 08:33:56 +00:00
tjr
c29899efe7 Update for GNU cpio 2.6. 2005-10-01 06:41:34 +00:00
tjr
74e2490c69 Merge long_format() time formatting code and fixes for printf() format
errors from old copyin.c.
2005-10-01 06:37:41 +00:00
tjr
7c13f400d5 Define HAVE_MKFIFO and HAVE_SETLOCALE here since the configure script
apparently fails to do it.
2005-10-01 06:35:58 +00:00
tjr
9c1e1fb8c0 Merge from old copyout.c rev 1.2: Output a zero rdev except for bdevs,
cdevs, fifos and sockets. Don't output a file if the major, minor or
totality of its rdev would be truncated.
2005-10-01 06:09:55 +00:00
tjr
624d486b89 Merge from old copypass.c rev 1.3: If we must yell at the user than a
file cannot be linked into place when requested (not required) to do it,
reassure them that cpio is still intelligent enough that it will perform
a full copy instead.
2005-10-01 05:54:39 +00:00
tjr
408469d959 Merge from old util.c rev 1.2: say "volume" instead of "tape". 2005-10-01 05:52:40 +00:00
tjr
e4ec2f34db Merge from old main.c rev 1.2: Don't set the umask until after we have
processed the arguments and opened the archive file.
2005-10-01 05:49:29 +00:00
tjr
6b16a660d3 Merge from old tar.c rev 1.2: Recognize and skip 'x' and 'g' pax
extension entries.
2005-10-01 05:42:44 +00:00
tjr
058cbad809 Merge from old copyin.c rev 1.5, copypass.c rev 1.2: Create fifos using
mkfifo() instead of attempting to create them using mknod().
2005-10-01 05:36:39 +00:00
tjr
d2ed906427 Update for GNU cpio 2.6. 2005-10-01 04:57:01 +00:00
tjr
a9df32e6dd Rename isnumber() to cpio_isnumber() to avoid clashing with the
<ctype.h> library function of the same name.
2005-10-01 04:56:09 +00:00
tjr
97bb17a0b0 Remove files no longer present in GNU cpio distribution. Most of these
were actually moved into subdirectories.
2005-10-01 04:47:43 +00:00
tjr
c41ca4418d This commit was generated by cvs2svn to compensate for changes in r150765,
which included commits to RCS files with non-trunk default branches.
2005-10-01 04:37:08 +00:00
tjr
c36d8046bb Import GNU cpio 2.6 (trimmed) 2005-10-01 04:37:08 +00:00
trhodes
b8a072188d Allow the root user to be aware of other credentials by virtue
of privilege.

Submitted by:	rwatson
2005-09-30 23:41:10 +00:00
imp
3c83a9762a Use ansi function definitions in preference to K&R to reduce diffs
with NetBSD (and cause it looks cooler).
2005-09-30 19:39:27 +00:00
imp
6d33aff6da Not sporttings on other cards 2005-09-30 19:35:44 +00:00
phk
b23c35710b The NWFS code in RELENG_6 is broken due to a typo in
sys/fs/nwfs/nwfs_vfsop= s.c, introduced with the conversion to
nmount with revision 1.38. This causes mount_nwfs to fail with
the error message:

  mount_nwfs: mount error: /mnt/netware: syserr = No such file or directo=
ry

This is caused by a typo on line 178, which specifies "nwfw_args"
rather than "nwfs_args".

Submitted by:	Antony Mawer <gnats@mawer.org>
Fat fingers:	phk
PR:		86757
MFC:		3 days
2005-09-30 18:21:05 +00:00
truckman
7dfe92499b Un-staticize waitrunningbufspace() and call it before returning from
ffs_copyonwrite() if any async writes were launched.

Restore the threads previous TDP_NORUNNINGBUF state before returning
from ffs_copyonwrite().
2005-09-30 18:07:41 +00:00
tegge
dbcc5e2770 Move some devstat collection to below where large IO operations are chopped
up.  This make iostat report operations passed down to the device driver
instead of operations passed down to GEOM disk.  The transfer size limit
imposed by the device driver is no longer hidden, improving the correlation
between iostat output and device driver workload.
2005-09-30 17:32:08 +00:00
garys
c2b51d2f4c A minor overhaul: added comments, split cmds in 2, changed synopsis.
Split commands into two groups: one with optional count and one with
required argument.  Changed synopsis line accordingly.

Added some hopefully-helpful comments based on experiments, knowing
that not all hardware works the same.

PR:             docs/84101
Approved by:    keramida
MFC after:      3 days
2005-09-30 17:31:39 +00:00
imp
2383f3bde4 ciphy wasn't included here. 2005-09-30 14:54:17 +00:00
imp
b4f3676579 Add a more generic version of the mii_phy_match routine (mii_phy_match_gen)
which can be used for phy that want to piggy back other data with their
table.
2005-09-30 14:51:44 +00:00
imp
1bada70784 Add macros which follow the miidevs design pattern to make it easier
to construct tables for mii_phy_match.
2005-09-30 14:45:10 +00:00
nyan
d2e8ad6a16 Use hw.machine_arch instead of hw.machine. 2005-09-30 13:27:36 +00:00
nyan
3a90a23a85 MFi386: revision 1.33.
> Cause all flags passed by boot2 to set the respective loader(8)
  > boot_* variable.  The end effect is that all flags from boot2
  > are now passed to the kernel.
2005-09-30 13:24:14 +00:00
nyan
fd8ab8cd89 Use 'PC Card' 2005-09-30 13:17:54 +00:00
phk
f6f17c1957 Report any errors we might see when disabling the watchdog.
Complain about extra arguments so people don't get surprised
if they type "watchdog 0"
2005-09-30 08:30:20 +00:00
davidxu
a1fdec3aa1 Fox a LOR of sleep and sched_lock by using a timeout wait
when process reaches maximum number of threads.

MFC after: 3 days
2005-09-30 06:09:41 +00:00
dougb
1a601e1eb1 Give .Dd a tummy rub, forgotten on my last commit. 2005-09-30 02:12:15 +00:00
truckman
414043e88d Un-staticize runningbufwakeup() and staticize updateproc.
Add a new private thread flag to indicate that the thread should
not sleep if runningbufspace is too large.

Set this flag on the bufdaemon and syncer threads so that they skip
the waitrunningbufspace() call in bufwrite() rather than than
checking the proc pointer vs. the known proc pointers for these two
threads.  A way of preventing these threads from being starved for
I/O but still placing limits on their outstanding I/O would be
desirable.

Set this flag in ffs_copyonwrite() to prevent bufwrite() calls from
blocking on the runningbufspace check while holding snaplk.  This
prevents snaplk from being held for an arbitrarily long period of
time if runningbufspace is high and greatly reduces the contention
for snaplk.  The disadvantage is that ffs_copyonwrite() can start
a large amount of I/O if there are a large number of snapshots,
which could cause a deadlock in other parts of the code.

Call runningbufwakeup() in ffs_copyonwrite() to decrement runningbufspace
before attempting to grab snaplk so that I/O requests waiting on
snaplk are not counted in runningbufspace as being in-progress.
Increment runningbufspace again before actually launching the
original I/O request.

Prior to the above two changes, the system could deadlock if enough
I/O requests were blocked by snaplk to prevent runningbufspace from
falling below lorunningspace and one of the bawrite() calls in
ffs_copyonwrite() blocked in waitrunningbufspace() while holding
snaplk.

See <http://www.holm.cc/stress/log/cons143.html>
2005-09-30 01:30:01 +00:00
yar
3ddc14f22c For the sake of consistency and easier typing,
introduce "-tunnel" as an alias for "deletetunnel".
The latter is overly long and prone to typos,  but
keep it for POLA since it costs nothing.

MFC after:	5 days
2005-09-29 23:53:29 +00:00
yar
5917e3b86f Forgot to touch .Dd in the previous commit. 2005-09-29 23:39:37 +00:00
yar
090a602d2d Deprecate the useless argument to -vlandev.
Submitted by:	Fredrik Lindberg <fli+freebsd-current at shapeshifter.se> (implementation)
Reviewed by:	brooks
MFC after:	5 days
2005-09-29 23:38:24 +00:00
fjoe
20962cb412 - Fix "end_blk out of range" panic when INVARIANTS.
- Do not allow rw access.

Submitted by:	Dario Freni <saturnero at freesbie dot org>
MFC after:	3 days
2005-09-29 22:45:16 +00:00
fjoe
5c713a5737 Use mkuzip(8) instead of create_compressed_fs. 2005-09-29 22:41:20 +00:00
truckman
eccf618ca4 After a rmdir()ed directory has been truncated, force an update of
the directory's inode after queuing the dirrem that will decrement
the parent directory's link count.  This will force the update of
the parent directory's actual link to actually be scheduled.  Without
this change the parent directory's actual link count would not be
updated until ufs_inactive() cleared the inode of the newly removed
directory, which might be deferred indefinitely.  ufs_inactive()
will not be called as long as any process holds a reference to the
removed directory, and ufs_inactive() will not clear the inode if
the link count is non-zero, which could be the result of an earlier
system crash.

If a background fsck is run before the update of the parent directory's
actual link count has been performed, or at least scheduled by
putting the dirrem on the leaf directory's inodedep id_bufwait list,
fsck will corrupt the file system by decrementing the parent
directory's effective link count, which was previously correct
because it already took the removal of the leaf directory into
account, and setting the actual link count to the same value as the
effective link count after the dangling, removed, leaf directory
has been removed.  This happens because fsck acts based on the
actual link count, which will be too high when fsck creates the
file system snapshot that it references.

This change has the fortunate side effect of more quickly cleaning
up the large number dirrem structures that linger for an extended
time after the removal of a large directory tree.  It also fixes a
potential problem with the shutdown of the syncer thread timing out
if the system is rebooted immediately after removing a large directory
tree.

Submitted by:	tegge
MFC after:	3 days
2005-09-29 21:50:26 +00:00
imp
c5c0b326f7 Don't build pccardd anymore. 2005-09-29 21:32:57 +00:00
imp
f0fcf4b3c2 Fix bad compile. Pointy hat to: imp 2005-09-29 20:41:04 +00:00
dougb
a6ef64df7a Handle the case where the -P flag is specified for a read-only file
earlier, and more gracefully. Previously, this combination would be
ignored early in the code where permissions are tested and fail later
with a very unhelpful "permission denied" error.

Instead, test for this flag in the same block that generates the
"override?" messages for read-only files, but instead of trying
to guess what the user has in mind, generate an error and exit.

Update the man page to reflect this new behavior.

Not objected to by:	freebsd-hackers@
2005-09-29 20:40:29 +00:00