Commit Graph

118670 Commits

Author SHA1 Message Date
Don Lewis
445193b887 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
Warner Losh
45b74e0d8e Don't build pccardd anymore. 2005-09-29 21:32:57 +00:00
Warner Losh
550a624879 Fix bad compile. Pointy hat to: imp 2005-09-29 20:41:04 +00:00
Doug Barton
a5f6295013 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
Warner Losh
870d00144f o Add a bunch of o2micro controller IDs
o Add SMC34C90 to list as well, since I've found enough more data about it
  since my original research to know it is appropriate for this driver.
2005-09-29 19:59:03 +00:00
John Baldwin
b65089ccb5 Trim a couple of unneeded includes. 2005-09-29 19:13:52 +00:00
John Baldwin
1c5b402897 Remove the hack to clear the owepreempt flag after running a fast
interrupt handler from Alpha.  Instead, expand the scheduler pinning
in the interrupt handling code so that curthread is pinned while executing
fast interrupt handlers.

MFC after:	1 week
2005-09-29 19:12:44 +00:00
John Baldwin
d1754a9b9c - Use if_printf() and device_printf() in re(4) and remove rl_unit from
the softc.
- Use callout_init_mtx() and rather than timeout/untimeout in both rl(4)
  and re(4).
- Fix locking for ifmedia by locking the driver in the ifmedia handlers
  rather than in the miibus functions.  (re(4) didn't lock the mii stuff
  at all!)
- Fix some locking in re_ioctl().

Note: the two drivers share the same softc declared in if_rlreg.h, so they
had to be change simultaneously.

MFC after:	 1 week
Tested by:	several on rl(4), none on re(4)
2005-09-29 16:52:19 +00:00
John Baldwin
dc6f00687c Use if_printf() and device_printf(). 2005-09-29 16:47:08 +00:00
Warner Losh
c6babc3735 Dcoument typical debugging options, plus the new CIS device for pccard. 2005-09-29 16:45:53 +00:00
Poul-Henning Kamp
8ec7a2f521 Fix a bug in disk geometry calculation.
Fix NANO_TOOLS usage in FlashDevice()
2005-09-29 16:06:59 +00:00
John Baldwin
ccb7a62ef7 Typo. 2005-09-29 15:04:58 +00:00
John Baldwin
85266973b6 - Consolidate duplicated code for assigning interrupts to PCI devices via
routing, etc. in a static pci_assign_interrupt() function.
- Add a sledgehammer that allows the user to override the interrupt
  assignment of any PCI device via a tunable (e.g. "hw.pci0.7.INTB=5" would
  force any functions on the pci device in slot 7 of bus 0 that use B# to
  use IRQ 5).  This should be used with great caution!  Generally, if the
  interrupt routing in use provides specific tunables (such as hard-wiring
  the IRQ for a given $PIR or ACPI PCI link device), then those should be
  used instead.  One instance where this tunable might be useful is if a
  box has an MPTable with duplicate entries for the same PCI device with
  different IRQs.

MFC after:	1 week
2005-09-29 15:04:41 +00:00
John Baldwin
c306d50969 Don't save and restore the ELCR register across suspend and resume for
the Intel 82371AB PCI-ISA bridge.  We now do this all the time for the
!APIC case in the atpic driver.  This cuts the raw line count for this
driver by about 40%.

MFC after:	1 week
2005-09-29 15:00:09 +00:00
Warner Losh
aafbf20db0 I added the device IDs to the header, but not to the table. Add them
to the table.

MFC After: 3 days
2005-09-29 14:57:51 +00:00
John Baldwin
f73c6b9d92 - Use PCIR_BAR macro rather than hardcoding 0x10.
- Use pci_enable_busmaster() rather than doing it by hand.
- Remove duplicate if_free().
2005-09-29 14:56:30 +00:00
Peter Edwards
20c5ba3685 Remove checks for BOOTSIG[23] from FAT32 bootblocks.
There seems to be very little documentary evidence outside this
implementation to suggest a these checks are neccessary, and more
than one camera-formatted flash disk fails the check, but mounts
successfully on most other systems.

Reviewed By: bde@
2005-09-29 14:09:46 +00:00
Gleb Smirnoff
482b02b3f3 In em_process_receive_interrupts() store and clear adapter->fmt. This
make function reenterable. In the runtime the race is masked by serializing
of em_process_receive_interrupts() either by interrupt thread, or by
polling. The race can be triggered when polling is switched on or off.
2005-09-29 13:23:34 +00:00
Ruslan Ermilov
e6f7c17ebd err() -> errx() where appropriate. 2005-09-29 13:09:04 +00:00
Poul-Henning Kamp
ea8cbba64f Return zero when disabling watchdog, unless any of the drivers complain. 2005-09-29 12:31:44 +00:00
Max Khon
f4d4e417be Add -DINVARIANT_SUPPORT -DINVARIANTS
(to commented out CFLAGS, used for debugging).
2005-09-29 11:56:16 +00:00
Peter Edwards
d41c4674c2 Close a race in biodone(), whereby the bio_done field of the passed
bio may have been freed and reassigned by the wakeup before being
tested after releasing the bdonelock.

There's a non-zero chance this is the cause of a few of the crashes
knocking around with biodone() sitting in the stack backtrace.

Reviewed By: phk@
2005-09-29 10:37:20 +00:00
Pawel Jakub Dawidek
0896d83c56 Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
MFC after:	2 days
2005-09-29 08:56:15 +00:00
Joseph Koshy
f35f2fc88a The 'intr_bufferfull' driver statistic actually counts the number
of times sampling was stopped due to a space shortage; change its
description in the output of `pmcstat -s` to match reality.

MFC after:	3 days
2005-09-29 01:40:03 +00:00
Brooks Davis
94d785c84c Be less IPv4 centric. When checking if the interface is already
configured, check if the UP flag is set instead of checking for the
netmask keyword.
2005-09-28 19:59:18 +00:00
Hajimu UMEMOTO
9fa7087a67 add product ID for Linux Ethernet/RNDIS gadget on pxa210/25x/26x.
Submitted by:	Keiichi SHIMA <keiichi__at__iijlab.net>
MFC after:	2 days
2005-09-28 19:41:25 +00:00
Pawel Jakub Dawidek
14afefa3db Implement suspend/resume methods to be more ACPI friendly.
I'm able to suspend/resume my laptop without this change, but then I need
to wait for the watchdog to reset the card.
With this change, it is ready immediately.

Glanced at by:	glebius
2005-09-28 19:20:49 +00:00
Jens Schweikhardt
4c163f4c32 Nuke duplicates found via fuzzy logic:
- typos
- different spelling, punctuation, whitespace
- phonetically similar names
- words rearranged ("was once" vs "once was" etc)

If a limerick appeared as a single one and as part of a
double or triple, the singleton was removed.

With a little help from: sort limerick|uniq -d
This still turns up 20 lines being repeated, but the respective
limericks are sufficiently unique to leave them in (i.e. most differ
in at least two lines).

Nuke spaces in front of colons while I'm here.
2005-09-28 18:18:29 +00:00
Poul-Henning Kamp
64fd97df54 puc(4) does strange things to resources in order to fool the
subdrivers to hook up.

It should probably be rewritten to implement a simple bus to which
the sub drivers attach using some kind of hint.

Until then, provide a couple of crutch functions with big warning
signs so it can survive the recent changes to struct resource.
2005-09-28 18:06:25 +00:00
John Baldwin
29442a30e2 Add interrupt counters for IPIs. By default they are disabled, but they
can be enabled by enabling COUNT_IPIS in smptests.h.  When enabled, each
CPU provides an interrupt counter for nearly all of the IPIs it receives
(IPI_STOP currently doesn't have a counter) that can be examined using
vmstat -i, etc.

MFC after:	3 days
Requested by:	rwatson
2005-09-28 18:04:11 +00:00
John Baldwin
ea688ef40b Rename the lapic timer interrupt counters from lapicX: timer to cpuX: timer
since it's not always obvious that lapic == cpu.

MFC after:	3 days
2005-09-28 18:01:41 +00:00
Yaroslav Tykhiy
eb03e6374a Make it a good-mannered rcNG script respectful to the command line. 2005-09-28 16:24:47 +00:00
Olivier Houchard
c825862e6c setsockopt() will return -1 on error, not 0.
Pointy hat to:	Jeremie Le Hen
2005-09-28 16:14:43 +00:00
Olivier Houchard
20c0b2d3c3 Use SO_REUSEADDR on the socket, to make the use of syslogd in jails easier.
Submitted by:   Jeremie Le Hen <jeremie le-hen org>
2005-09-28 16:05:13 +00:00
Maxim Konovalov
466cbb4b88 o Follow the trend and update a host-based wireless bridge example. 2005-09-28 15:22:17 +00:00
Marius Strobl
c7974ff135 Fix an endianness issue in pnp_eisaformat(). This corrects printing PnP IDs
on big-endian archs like sparc64, e.g.:
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 43 pnpid @HEd041 on isa0
is now correctly printed as:
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 43 pnpid PNP0501 on isa0

There are probably other endianness issues lurking in the PnP code which
however aren't exhibited on sparc64 as the PnP devices there are sort of
PnP BIOS devices rather than ISA PnP devices.

Tested on:	i386, sparc64
MFC after:	1 week
2005-09-28 15:01:58 +00:00
Marius Strobl
b7c96c0d0b Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t
and do some preparations for handling 12x22 fonts (currently lots of code
implies and/or hardcodes a font width of 8 pixels). This will be required
on sparc64 which uses a default font size of 12x22 in order to add font
loading and saving support as well as to use a syscons(4)-supplied mouse
pointer image.
This API breakage is committed now so it can be MFC'ed in time for 6.0
and later on upcoming framebuffer drivers destined for use on sparc64
and which are expected to rely on using font loading internally and on
a syscons(4)-supplied mouse pointer image can be easily MFC'ed to
RELENG_6 rather than requiring a backport.

Tested on:	i386, sparc64, make universe
MFC after:	1 week
2005-09-28 14:54:07 +00:00
Ruslan Ermilov
ce8bf81ff2 Commenting out WARNS actually brought it up to 4. 2005-09-28 14:36:16 +00:00
Joseph Koshy
79247772f0 Note the requirement for 'device apic' on i386 systems. [1]
Consistently use 'x86' when referring to behaviour common to the
i386 and amd64.

Submitted by:	Niklas Sorensson <nik@cs.chalmers.se> [1]
2005-09-28 14:19:31 +00:00
Yaroslav Tykhiy
f0fdbb10ea Minor clarifications and fixes to wording, grammar, and markup
around ${network_interfaces}.
2005-09-28 13:07:43 +00:00
Ken Smith
0f12c50ed7 Add SHA256 checksums to the release build.
Requested by:		cperciva (so)
Reviewed/improved by:	ru
MFC after:		2 days
2005-09-28 12:39:00 +00:00
Anton Berezin
064b93d5ea Introduce "route del" as an alias to "route delete".
Reviewed by:	arch
2005-09-28 12:12:15 +00:00
Ruslan Ermilov
a2f9548d05 Fix "taskqueue_drain with the following non-sleepable locks held"
witness(9) warning on detach.
2005-09-28 09:27:46 +00:00
Max Laier
b3c792cab0 Do not commit before the first cup of coffee. Other entries don't have a
preceeding slash.

Pointed out by:	thompsa
2005-09-28 09:19:17 +00:00
Max Laier
beba90ea1b Document bridge(4) leftovers.
Submitted by:	maxim
2005-09-28 08:25:48 +00:00
Max Laier
13f5260916 Redirect bridge(4) to if_bridge(4) and rename sysctl accordingly.
Reminded by:	ru
2005-09-28 08:18:55 +00:00
Ruslan Ermilov
d9423c1bc1 We bootstrap make(1) if necessary during an upgrade, so checking
if MACHINE_ARCH is defined is no longer needed.
2005-09-28 08:17:30 +00:00
Max Laier
7badd6a5e5 Redirect bridge(4) to if_bridge(4). These should have pointed to if_bridge
from the begining.

Reminded by:	ru
2005-09-28 08:11:15 +00:00
Ruslan Ermilov
7fc550064a Oops, revert last commit (the manpage is still built in objdir). 2005-09-28 07:54:18 +00:00
Ruslan Ermilov
d14ab6edd5 Add NO_OBJ, remove redundant SCRIPTSNAME. 2005-09-28 07:52:27 +00:00