kensmith [Wed, 22 Oct 2008 20:32:19 +0000 (20:32 +0000)]
Turns out its not a good idea to assume the packages that might be
selected from the "dists" are all on the current volume. Looks like
xorg won't fit on disc1 for 6.4-REL. Iterate through media volumes
for packages that wind up being selected from the dists section in
addition to the ones that get selected from the packages menu.
kib [Wed, 22 Oct 2008 19:55:12 +0000 (19:55 +0000)]
Remove doubtful structure definition with variable array members.
I believe this is not a valid C99 construct. Use directly calculated
offsets into the supplied buffer, using specified members length,
to fill appropriate structure.
Either use sysctl, or copy the value of the UNAME_x environment
variable, instead of unconditionally doing sysctl, and then
overriding a returned value with user-specified one.
marcel [Wed, 22 Oct 2008 18:20:45 +0000 (18:20 +0000)]
Trivially avoid a null pointer dereference when drivers
don't set the rman description. While drivers should set
it, a kernel panic is not the right behaviour when faced
without one.
marcel [Wed, 22 Oct 2008 02:08:54 +0000 (02:08 +0000)]
Allow dumps to partitions with a tag of 0. The legacy
sunlabel implementation in FreeBSD does not use VTOC
information and as such as no partition types.
jhb [Tue, 21 Oct 2008 18:51:55 +0000 (18:51 +0000)]
Restore the default maximum segment size for the bus dma tag to 64k as it
is in 6.x and 7.x. The typo caused 64k transactions to be unnecessarily
split up into two PRD entries.
jhb [Tue, 21 Oct 2008 18:30:10 +0000 (18:30 +0000)]
Several cleanups to remove the need for explicit unit numbers and a few
other fixes:
- Add pointers back to device_t objects in softc structures instead
of storing the unit and using devclass_get_device().
- Add 'lpbb', 'pcf', 'pps', and 'vpo' child devices to every 'ppbus' device
instead of just the first one.
- Store softc pointers in si_drv1 of character devices instead of
pulling the unit number from the minor number and using
devclass_get_softc() and devclass_get_device().
- Store the LP_BYPASS flag in si_drv2 instead of encoding it in the minor
number.
- Destroy character devices for lpt(4) when detaching the device.
- Use bus_print_child_footer() instead of duplicating it in
ppbus_print_child() and fix ppbus_print_child()'s return value.
- Remove unused AVM ivar from ppbus.
- Don't store the 'mode' ivar in the ppbus ivars since we always fetch it
from the parent anyway.
- Try to detach all the child devices before deleting them in
ppbus_detach().
- Use pause() instead of a tsleep() on a dummy address when polling the
ppbus.
- Use if_printf() and device_printf() instead of explicit names with unit
numbers.
rdivacky [Tue, 21 Oct 2008 16:46:50 +0000 (16:46 +0000)]
Remove __CC_INT_IS_32BIT define which was used to fix mpt driver
but is not used anymore. This define is not referenced by anything
in the FreeBSD srcs nor google shows any usage. Kernel and world
builds fine without it.
des [Tue, 21 Oct 2008 11:58:26 +0000 (11:58 +0000)]
At some point, construct_utmp() was changed to use realhostname() to fill
in the struct utmp due to concerns about the length of the hostname buffer.
However, this breaks the UseDNS option. There is a simpler and better
solution: initialize utmp_len to the correct value (UT_HOSTSIZE instead of
MAXHOSTNAMELEN) and let get_remote_name_or_ip() worry about the size of the
buffer.
kientzle [Tue, 21 Oct 2008 05:08:35 +0000 (05:08 +0000)]
If we don't know the file size, leave the file size unset.
If it's not a regular file, don't return any data, even if the size is unknown.
Update the Zip test with a hand-tweaked Zip archive that has a
directory (with length-at-end set), a regular file without
length-at-end set, and a regular file with length-at-end set and a bad
CRC. Update the test code to verify that the file size is unset
for the regular file with length-at-end.
jkim [Tue, 21 Oct 2008 00:38:00 +0000 (00:38 +0000)]
Turn off CPU frequency change notifiers when the TSC is P-state invariant
or it is forced by setting 'kern.timecounter.invariant_tsc' tunable
to non-zero.
attilio [Mon, 20 Oct 2008 19:56:59 +0000 (19:56 +0000)]
Bump __FreeBSD_version in order to reflect prototipes changes for these
following functions:
- bufobj_invalbuf()
- bufsync()
- vinvalbuf()
- g_vfs_close
attilio [Mon, 20 Oct 2008 19:22:16 +0000 (19:22 +0000)]
In the actual code for witness_warn:
- If there aren't spinlocks held, but there are problems with old
sleeplocks, they are not reported.
- If the spinlock found is not the only one, problems are not reported.
bz [Mon, 20 Oct 2008 18:56:00 +0000 (18:56 +0000)]
Update a comment which to my reading had been misplaced in rev. 1.12
already (but probably had been way above as the code was there twice)
and describe what was last changed in rev. 1.199 there (which now is
in sync with in6_src.c r184096).
bz [Mon, 20 Oct 2008 18:43:59 +0000 (18:43 +0000)]
Bring over the change switching from using sequential to random
ephemeral port allocation as implemented in netinet/in_pcb.c rev. 1.143
(initially from OpenBSD) and follow-up commits during the last four and
a half years including rev. 1.157, 1.162 and 1.199.
This now is relying on the same infrastructure as has been implemented
in in_pcb.c since rev. 1.199.
mav [Mon, 20 Oct 2008 18:37:10 +0000 (18:37 +0000)]
Make HDA PCM device boot and sndstat messages more alike to PCI device ones.
Move codec # out of the device name as it is a device address and not part of
device type name.
des [Mon, 20 Oct 2008 17:41:08 +0000 (17:41 +0000)]
There is no point in releasing a lock on a file which we've unlinked and
are about to close, so don't. As a bonus, pidfile_remove(3) will now
work with an fcntl(2)-based flopen(3).
des [Mon, 20 Oct 2008 17:26:30 +0000 (17:26 +0000)]
#ifdef out the lock-against-self test. I'm not sure it makes sense, and
it relies on non-portable flock(2) semantics. Not only is flock(2) not
portable, but on some OSes that do have it, it is implemented in terms
of fcntl(2) locks, which are per-process rather than per-descriptor.
kib [Mon, 20 Oct 2008 10:11:33 +0000 (10:11 +0000)]
Assert that v_holdcnt is non-zero before entering lockmgr in vn_lock
and ffs_lock. This cannot catch situations where holdcnt is incremented
not by curthread, but I think it is useful.
kib [Mon, 20 Oct 2008 10:07:28 +0000 (10:07 +0000)]
In vfs_busy(), lockmgr() cannot legitimately sleep, because code checked
MNTK_UNMOUNT before, and mnt_mtx is used as interlock. vfs_busy() always
tries to obtain a shared lock on mnt_lock, the other user is unmount who
tries to drain it, setting MNTK_UNMOUNT before.
marcel [Mon, 20 Oct 2008 04:50:47 +0000 (04:50 +0000)]
The active and bootable flags are not part of the type.
Export the active and bootable flags as attributes in
the configuration XML and allow them to be manipulated
with the set/unset commands.
Since libdisk treats the flags as part of the partition
type, preserve behavior by keeping them included in the
configuration text.
davidxu [Mon, 20 Oct 2008 02:37:53 +0000 (02:37 +0000)]
In realtimer_delete(), clear timer's value and interval to tell
realtimer_expire() to not rearm the timer, otherwise there is a chance
that a callout will be left there and be tiggered in future unexpectly.
sam [Sun, 19 Oct 2008 21:34:49 +0000 (21:34 +0000)]
fix static key wep; r183248 caused drivers to be called for keys to be
assigned to slots in the global key table but ath_key_alloc was not
updated to handle that
kib [Sun, 19 Oct 2008 11:13:49 +0000 (11:13 +0000)]
Ktr(9) stores format string and arguments in the event circular buffer,
not the string formatted at the time of CTRX() call. Stack_ktr(9) uses
an on-stack buffer for the symbol name, that is supplied as an argument
to ktr. As result, stack_ktr() traces show garbage or cause page faults.
Fix stack_ktr() by using pointer to module symbol table that is supposed
to have a longer lifetime.
kib [Sun, 19 Oct 2008 10:02:26 +0000 (10:02 +0000)]
Correctly fill siginfo for the signals delivered by linux tkill/tgkill.
It is required for async cancellation to work.
Fix PROC_LOCK leak in linux_tgkill when signal delivery attempt is made
to not linux process.
Do not call em_find(p, ...) with p unlocked.
Move common code for linux_tkill() and linux_tgkill() into
linux_do_tkill().
Change linux siginfo_t definition to match actual linux one. Extend
uid fields to 4 bytes from 2. The extension does not change structure
layout and is binary compatible with previous definition, because i386
is little endian, and each uid field has 2 byte padding after it.
kmacy [Sun, 19 Oct 2008 01:27:40 +0000 (01:27 +0000)]
- move gdt, ldt allocation to before KPT allocation
- fix bugs where we would:
- try to map the hypervisors address space
- accidentally kick out an existing kernel mapping for some domain creation memory allocation sizes
- accidentally skip a 2MB kernel mapping for some domain creation memory allocation sizes
- don't rely on trapping in to xen to read rcr2, reference through vcpu
- whitespace cleanups
mav [Sat, 18 Oct 2008 16:17:04 +0000 (16:17 +0000)]
Implement BIO_DELETE command with MMC and SD erase commands.
Erase operation gives card's logic information about unused areas to help it
implement wear-leveling with lower overhead comparing to usual writing.
Erase is much faster then write and does not depends on data bus speed.
Also as result of hitting in-card write logic optimizations I have measured
up to 50% performance boost on writing undersized blocks into preerased areas.
At the same time there are strict limitations on size and allignment of erase
operations. We can erase only blocks aligned to the erase sector size and
with size multiple of it. Different cards has different erase sector size
which usually varies from 64KB to 4MB. SD cards actually allow to erase
smaller blocks, but it is much more expensive as it is implemented via
read-erase-write sequence and so not sutable for the BIO_DELETE purposes.
rrs [Sat, 18 Oct 2008 15:54:25 +0000 (15:54 +0000)]
- Adapt layer indication was always being given (it should only
be given when the user has enabled it). (Michael Tuexen)
- Sack Immediately was not being set properly on the actual chunk, it
was only put in the rcvd_flags which is incorrect. (Michael Tuexen)
- added an ifndef userspace to one of the already present macro's for
inet (Brad Penoff)
Obtained from: Michael Tuexen and Brad Penoff
MFC after: 4 weeks
rrs [Sat, 18 Oct 2008 15:53:31 +0000 (15:53 +0000)]
Reported by Yehuda Weinraub (yehudasa@gamil.com) - CRC32C algorithm
uses incorrect init_bytes value. It SHOULD have the number
of bytes to get to a 4 byte boundary.