kib [Mon, 13 Oct 2008 14:05:01 +0000 (14:05 +0000)]
Sync up summary information for cylinder groups while data is already
in memory during snapshot creation. This improves the results of the
background fsck.
kib [Mon, 13 Oct 2008 14:01:05 +0000 (14:01 +0000)]
Background fsck applies twice some summary totals changes. The next
background fsck on the same file system might then print negative
numbers for reclaimed directories/files/fragments.
Address the issue in a limited degree, by using old summary data for
cg when bgfsck is performed.
kib [Mon, 13 Oct 2008 13:56:23 +0000 (13:56 +0000)]
check_maps() in /usr/src/sbin/fsck_ffs/pass5.c seems to be limited to file
systems less than 1 TB, due to using 32-bits integers for file system block
numbers. This also causes incorrect error reporting for foreground fsck.
bms [Mon, 13 Oct 2008 06:07:58 +0000 (06:07 +0000)]
Fix the CFE ldscript after the cutover to tradmips.
Diff minimization against ldscript.mips.
Note: CFE will not load PT_DYNAMIC segments, therefore the dynamic
sections have been placed in a PT_LOAD segment for now. This is not
too efficient in terms of memory use, they should probably get
placed in the text segment.
yongari [Mon, 13 Oct 2008 01:11:28 +0000 (01:11 +0000)]
Read PCI device id instead of PCI revision id. Also checks the read
device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.
mav [Sun, 12 Oct 2008 19:19:26 +0000 (19:19 +0000)]
Use GB suffix only from 10GB instead of 1GB.
There are lot of cards with uneven sizes and too strong rounding
will lead to very significant rounding errors.
imp [Sun, 12 Oct 2008 07:24:31 +0000 (07:24 +0000)]
Print the cards natural size.
Move nested tertiary operator expressions into their own function.
Remove extra blank line.
cache sd->disk in 'd' to make the code easier to read.
kensmith [Sun, 12 Oct 2008 02:52:56 +0000 (02:52 +0000)]
Add a build knob MAKE_DVD to control on a per-architecture basis whether
or not to build a tree used for the creation of a DVD image. If that is
enabled set up a DVD tree by installing everything we normally install
to the individual CDROM trees into the one DVD tree. The result is one
image with all the install bits, livefs bits, and doc bits suitable for
burning to a DVD instead of CDROM.
mav [Sat, 11 Oct 2008 13:05:13 +0000 (13:05 +0000)]
Give mmcsd driver a bit more information about card. It allows to reorganize
log message in a way a bit more common for disk devices. Also it will allow
mmcsd driver to use MMC/SD specific commands when needed.
marius [Sat, 11 Oct 2008 12:10:23 +0000 (12:10 +0000)]
Enable mpt(4) as some later models have on-board Fusion-MPT
controllers and it seems to work just fine with at least an
add-on SAS3080X. While at it, remove the commented out ncr(4)
as it doesn't even use bus_dma(9), which isn't worth fixing
though as sym(4) already supports a superset of the controllers
driven by ncr(4).
attilio [Fri, 10 Oct 2008 21:23:50 +0000 (21:23 +0000)]
Remove the struct thread unuseful argument from bufobj interface.
In particular following functions KPI results modified:
- bufobj_invalbuf()
- bufsync()
and BO_SYNC() "virtual method" of the buffer objects set.
Main consumers of bufobj functions are affected by this change too and,
in particular, functions which changed their KPI are:
- vinvalbuf()
- g_vfs_close()
Due to the KPI breakage, __FreeBSD_version will be bumped in a later
commit.
As a side note, please consider just temporary the 'curthread' argument
passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP
Reviewed by: kib
Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
imp [Fri, 10 Oct 2008 17:49:47 +0000 (17:49 +0000)]
Close, but not eliminate, a race condition. It is one that properly
designed drivers would never hit, but was exposed in diving into
another problem...
When expanding the devclass array, free the old memory after updating
the pointer to the new memory. For the following single race case,
this helps:
allocate new memory
copy to new memory
free old memory
<interrupt> read pointer to freed memory
update pointer to new memory
Now we do
allocate new memory
copy to new memory
update pointer to new memory
free old memory
Which closes this problem, but doesn't even begin to address the
multicpu races, which all should be covered by Giant at the moment,
but likely aren't completely.
Note: reviewers were ok with this fix, but suggested the use case
wasn't one we wanted to encourage.
imp [Fri, 10 Oct 2008 05:10:10 +0000 (05:10 +0000)]
MFp4: Fix a bug in the mips relocation code that prevents shared images
from working.
From p4 filelog of the upstream file in p4
//depot/projects/mips2-jnpr/src/libexec/rtld-elf/mips/reloc.c
... #6 change 140737 edit on 2008/04/27 by gonzo@gonzo_jeeves (text+ko)
o Looks like handler for R_MIPS_REL32 brought by CS 137942
is broken for tradmips. Code from NetBSD's
libexec/ld.elf_so/arch/mips/mips_reloc.c works just fine.
... #3 change 137942 edit on 2008/03/17 by rrs@rrs-mips2-jnpr (text+ko)
Any relocation symbol lookup if its 0. It looks like
this is the way the compiler indicates you need to
look in another shared library. When we hit these
as we relocate a object we will do the symbol
lookups and setup the relocation table with the
right value.
n_hibma [Thu, 9 Oct 2008 21:25:01 +0000 (21:25 +0000)]
Say hello to the u3g driver, implementing support for 3G modems.
This was located in the ubsa driver, but should be moved into a separate
driver:
- 3G modems provide multiple serial ports to allow AT commands while the PPP
connection is up.
- 3G modems do not provide baud rate or other serial port settings.
- Huawei cards need specific initialisation.
- ubsa is for Belkin adapters, an Linuxy choice for another device like 3G.
Speeds achieved here with a weak signal at best is ~40kb/s (UMTS). No spooky
STALLED messages as well.
Next: Move over all entries for Sierra and Novatel cards once I have found
testers, and implemented serial port enumeration for Sierra (or rather have
Andrea Guzzo do it). They list all endpoints in 1 iface instead of 4 ifaces.
imp [Thu, 9 Oct 2008 19:47:28 +0000 (19:47 +0000)]
o Use seprate routines to decode cid and csd for sd and mmc cards. All they
have in common right now is a memset. This saves a parameter to
these routines, as well as a level of indentation.
o Make mmc_get_bits a little clearer... It really only works on 128-bit
registers right now.
jkoshy [Thu, 9 Oct 2008 14:55:45 +0000 (14:55 +0000)]
- Sparsely number enumerations 'pmc_cputype' and 'pmc_event' in order to
reduce ABI disruptions when new cpu types and new PMC events are added
in the future.
- Support alternate spellings for PMC events. Derive the canonical
spelling of an event name from its enumeration name in 'enum pmc_event'.
- Provide a way for users to disambiguate between identically named events
supported by multiple classes of PMCs in a CPU.
- Change libpmc's machine-dependent event specifier parsing code to
better support CPUs containing two or more classes of PMC resources.
This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:
device atacore
device atapci
device atavia
And then you need the atadisk, atapicd etc lines in there just as usual.
If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.
delphij [Thu, 9 Oct 2008 06:23:04 +0000 (06:23 +0000)]
Add some examples to demostrate gpart(8).
--此行及以下内容将会被忽略--
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.
peter [Thu, 9 Oct 2008 02:25:18 +0000 (02:25 +0000)]
Clean out some empty mergeinfo records, presumably by people doing local
cp/mv operations. The full repo-relative URL should be specified for the
source in these cases.
kib [Wed, 8 Oct 2008 11:11:36 +0000 (11:11 +0000)]
If the ABI-overriden interpreter was not loaded, do not set
have_interp to TRUE. This allows the code in image activator to try
/libexec/ld-elf.so.1 as interpreter when newinterp is not found to
execute.
Reviewed by: peter
MFC after: 2 weeks (together with r175105)
mav [Wed, 8 Oct 2008 10:37:07 +0000 (10:37 +0000)]
Add ability to generate egress netflow instead or in addition to ingress.
Use mbuf tagging for accounted packets to not account packets twice when
both ingress and egress netflow enabled.
To keep compatibility new "setconfig" message added to control new
functionality. By default node works as before, doing only ingress
accounting without using mbuf tags.
imp [Wed, 8 Oct 2008 08:08:03 +0000 (08:08 +0000)]
Add a note about a bug in how sio manages its softc. This was
discovered by Dorr H. Clark. I'm not at all sure how to fix it, but
wanted to document it at the very least...
rwatson [Wed, 8 Oct 2008 06:26:51 +0000 (06:26 +0000)]
Remove stale comment (and XXX saying so) about why we zero the file
descriptor pointer in unp_freerights: we can no longer recurse into
unp_gc due to unp_gc being invoked in a deferred way, but it's still
a good idea.
rwatson [Tue, 7 Oct 2008 21:01:23 +0000 (21:01 +0000)]
Update udpzerobyte to understand that passing 0 as a length to recv(2)
will cause it to return 0, not EAGAIN.
Add UNIX domain socket support to udpzerobyte, which suggests this
regression test should be moved to the general sockets test area rather
than netinet.
rwatson [Tue, 7 Oct 2008 20:57:55 +0000 (20:57 +0000)]
In soreceive_dgram, when a 0-length buffer is passed into recv(2) and
no data is ready, return 0 rather than blocking or returning EAGAIN.
This is consistent with the behavior of soreceive_generic (soreceive)
in earlier versions of FreeBSD, and restores this behavior for UDP.
imp [Tue, 7 Oct 2008 17:44:04 +0000 (17:44 +0000)]
More diff reductions against ixp425/boot2/boot2.c. This time, we
bring in FIXUP_BOOT_DRV functionality as an #ifdef. This is not
enabled at this time, and the md5 remains constant with this change.
Apart from the 'accept any partitioning scheme on the device' changes,
this was the biggest delta...
# and yes, we'll merge these into one source file if we can do that in a
# way that makes sense.
jhb [Tue, 7 Oct 2008 14:05:42 +0000 (14:05 +0000)]
Use CPUID to see if the current CPU supports long mode when attemping to
boot an amd64 kernel. If not, then fail the boot request with an error
message. Otherwise, the boot attempt will fail with a BTX fault when
trying to read the EFER MSR.
lulf [Tue, 7 Oct 2008 10:25:27 +0000 (10:25 +0000)]
- Allow gstat to print values to different kind of outputs.
- Introduce batch mode, where gstat will collect the numbers, print them, and
exit.
- Document batch mode in the gstat man page.
rwatson [Tue, 7 Oct 2008 09:57:03 +0000 (09:57 +0000)]
Remove temporary debugging KASSERT's introduced to detect protocols
improperly invoking sosend(), soreceive(), and sopoll() instead of
attach either specialized or _generic() versions of those functions
to their pru_sosend, pru_soreceive, and pru_sopoll protosw methods.
rwatson [Tue, 7 Oct 2008 09:41:07 +0000 (09:41 +0000)]
Don't pass curthread to sbreserve_locked() in tcp_do_segment(), as the
netisr or ithread's socket buffer size limit is not the right limit to
use. Instead, pass NULL as the other two calls to sbreserve_locked()
in the TCP input path (tcp_mss()) do.
In practice, this is a no-op, as ithreads and the netisr run without a
process limit on socket buffer use, and a NULL thread pointer leads to
not using the process's limit, if any. However, if tcp_input() is
called in other contexts that do have limits, this may prevent the
incorrect limit from being used.
rwatson [Tue, 7 Oct 2008 07:10:28 +0000 (07:10 +0000)]
Lock receive socket buffer in soo_stat() rather than commenting that we
should lock it, which may marginally improve the consistency of the
results. Remove comment.
delphij [Mon, 6 Oct 2008 22:34:17 +0000 (22:34 +0000)]
Limit DMA memory to lower addressable 4GB, without this patch, we
can reliably provoke data corruption on systems equipped with a
plenty of memory during high load.
Reported by: gnn via iXsystems
MFC candidate: RELENG_7_1, RELENG_7
rwatson [Mon, 6 Oct 2008 19:42:03 +0000 (19:42 +0000)]
Add very simple regression test for fstat(2) on sockets: make sure it
returns success for various socket types. It's easy to imagine this
being enhanced to validate the returned data, but...