]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoAdd and document new quoat_on and quota_off functions.
mckusick [Mon, 16 Nov 2009 18:59:04 +0000 (18:59 +0000)]
Add and document new quoat_on and quota_off functions.

14 years agoConvert quotaon/quotaoff to use the new quotafile functions.
mckusick [Mon, 16 Nov 2009 18:50:51 +0000 (18:50 +0000)]
Convert quotaon/quotaoff to use the new quotafile functions.

14 years agoUpdate to work with quotafile functions in -libutil.
mckusick [Wed, 21 Oct 2009 04:35:09 +0000 (04:35 +0000)]
Update to work with quotafile functions in -libutil.

14 years agoClaen up format when doing non-humanized output.
mckusick [Tue, 20 Oct 2009 17:50:27 +0000 (17:50 +0000)]
Claen up format when doing non-humanized output.

14 years agoUpdate to work with quotafile functions in -libutil.
mckusick [Tue, 20 Oct 2009 16:46:39 +0000 (16:46 +0000)]
Update to work with quotafile functions in -libutil.

14 years agoUpdate to work with quotafile functions in -libutil.
mckusick [Tue, 20 Oct 2009 05:40:51 +0000 (05:40 +0000)]
Update to work with quotafile functions in -libutil.
Add -h flag to provide humanized output.

14 years agoAdd quota_maxid which returns the maximum user (or group) identifier
mckusick [Tue, 20 Oct 2009 05:37:54 +0000 (05:37 +0000)]
Add quota_maxid which returns the maximum user (or group) identifier
in an associated quotafile. Needed by repquota.

Bug fix in quota_read.

14 years agotype / format fixup
des [Sun, 27 Sep 2009 17:33:26 +0000 (17:33 +0000)]
type / format fixup

14 years agoSync from head.
des [Sat, 26 Sep 2009 23:25:22 +0000 (23:25 +0000)]
Sync from head.

14 years agoFurther extend the quotafile API.
des [Sat, 26 Sep 2009 23:16:06 +0000 (23:16 +0000)]
Further extend the quotafile API.

14 years agoprinterr_reply() has never been used for as long as we've had this code in
des [Sat, 26 Sep 2009 23:05:01 +0000 (23:05 +0000)]
printerr_reply() has never been used for as long as we've had this code in
our tree (13+ years).  This is an excellent argument for aggressive use
of "static".

14 years agoUse ipv6if() when $rtadvd_interfaces="AUTO".
hrs [Sat, 26 Sep 2009 19:00:47 +0000 (19:00 +0000)]
Use ipv6if() when $rtadvd_interfaces="AUTO".

14 years agoMove rc.d/{stf,faith} to just before rc.d/routing.
hrs [Sat, 26 Sep 2009 19:00:20 +0000 (19:00 +0000)]
Move rc.d/{stf,faith} to just before rc.d/routing.

Pointed out by: tegge

14 years agoFix several logic bugs in the previous IPv6 variable change and
hrs [Sat, 26 Sep 2009 18:59:00 +0000 (18:59 +0000)]
Fix several logic bugs in the previous IPv6 variable change and
re-add $ipv6_enable support for backward compatibility.  From
UPDATING:

 1. To use IPv6, simply define $ifconfig_IF_ipv6 like $ifconfig_IF
    for IPv4.  For aliases, $ifconfig_IF_aliasN should be used.
    Note that both variables need the "inet6" keyword at the head.

    Do not set $ipv6_network_interfaces manually if you do not
    understand what you are doing.  It is not needed in most cases.

    $ipv6_ifconfig_IF and $ipv6_ifconfig_IF_aliasN still work, but
    they are obsolete.

 2. $ipv6_enable is obsolete.  Use $ipv6_prefer and/or
    "inet6 accept_rtadv" keyword in ifconfig(8) instead.

    If you define $ipv6_enable=YES, it means $ipv6_prefer=YES and
    all configured interfaces have "inet6 accept_rtadv" in the
    $ifconfig_IF_ipv6.  These are for backward compatibility.

 3. A new variable $ipv6_prefer has been added.  If NO, IPv6
    functionality of interfaces with no corresponding
    $ifconfig_IF_ipv6 is disabled by using "inet6 ifdisabled" flag,
    and the default address selection policy of ip6addrctl(8)
    is the IPv4-preferred one (see rc.d/ip6addrctl for more details).
    Note that if you want to configure IPv6 functionality on the
    disabled interfaces after boot, first you need to clear the flag by
    using ifconfig(8) like:

         ifconfig em0 inet6 -ifdisabled

    If YES, the default address selection policy is set as
    IPv6-preferred.

    The default value of $ipv6_prefer is NO.

 4. If your system need to receive Router Advertisement messages,
    define "inet6 accept_rtadv" in $ifconfig_IF_ipv6.  The rc(8)
    scripts automatically invoke rtsol(8) when the interface becomes
    UP.  The Router Advertisement messages are used for SLAAC
    (State-Less Address AutoConfiguration).

14 years agoEnsure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
pjd [Sat, 26 Sep 2009 18:23:16 +0000 (18:23 +0000)]
Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
This completes the fix from r185586.

PR: kern/139059
Reported by: Daniel Braniss <danny@cs.huji.ac.il>
Submitted by: Jaakko Heinonen <jh@saunalahti.fi>
Tested by: Daniel Braniss <danny@cs.huji.ac.il>
MFC after: 3 days

14 years agoMake malloc(3) superpage aware. Specifically, if getpagesizes(3) returns
alc [Sat, 26 Sep 2009 18:20:40 +0000 (18:20 +0000)]
Make malloc(3) superpage aware.  Specifically, if getpagesizes(3) returns
a large page size that is greater than malloc(3)'s default chunk size but
less than or equal to 4 MB, then increase the chunk size to match the large
page size.

Most often, using a chunk size that is less than the large page size is not
a problem.  However, consider a long-running application that allocates and
frees significant amounts of memory.  In particular, it frees enough memory
at times that some of that memory is munmap()ed.  Up until the first
munmap(), a 1MB chunk size is just fine; it's not a problem for the virtual
memory system.  Two adjacent 1MB chunks that are aligned on a 2MB boundary
will be promoted automatically to a superpage even though they were
allocated at different times.  The trouble begins with the munmap(),
releasing a 1MB chunk will trigger the demotion of the containing superpage,
leaving behind a half-used 2MB reservation.  Now comes the real problem.
Unfortunately, when the application needs to allocate more memory, and it
recycles the previously munmap()ed address range, the implementation of
mmap() won't be able to reuse the reservation.  Basically, the coalescing
rules in the virtual memory system don't allow this new range to combine
with its neighbor.  The effect being that superpage promotion will not
reoccur for this range of addresses until both 1MB chunks are freed at some
point in the future.

Reviewed by: jasone
MFC after: 3 weeks

14 years agoPromote the cpu_class local variable to global and expose it in md_var.h
rpaulo [Sat, 26 Sep 2009 16:37:23 +0000 (16:37 +0000)]
Promote the cpu_class local variable to global and expose it in md_var.h

Reviewed by: freebsd-arm

14 years agoAdd 256 color support.
ed [Sat, 26 Sep 2009 15:26:32 +0000 (15:26 +0000)]
Add 256 color support.

It is quite inconvenient that if an application for xterm uses 256 color
mode, text suddenly starts to blink (because of ;5; in the middle).
We'd better just implement 256 color mode and add a conversion routine
from 256 to 8 color mode, which doesn't seem to be too bad in practice.

Remapping colors is done quite simple. If one of the channels is most
actively represented, primary colors are used. If two channels are most
actively represented, secondary colors are used. If all three channels
are equal (gray), it picks between black and white.

Reported by: Paul B. Mahol <onemda gmail com>

14 years agoProperly get out of origin mode if the cursor has to move outside of it.
ed [Sat, 26 Sep 2009 15:07:11 +0000 (15:07 +0000)]
Properly get out of origin mode if the cursor has to move outside of it.

In some cases events may occur that move the cursor outside the
scrolling region while in origin mode, which is normally not possible.
Events like these include:

- Alignment test.
- Restore cursor.

Properly switch off origin mode in these cases.

MFC after: 1 month

14 years agoGet rid of now deprecated SCS wrappers.
ed [Sat, 26 Sep 2009 15:03:42 +0000 (15:03 +0000)]
Get rid of now deprecated SCS wrappers.

We always build SCS, even when processing 8-bit data. There is no reason
why we should be able to disable it now.

14 years agoMake the fuzzer a bit more useful by forcing 7-bit data into it.
ed [Sat, 26 Sep 2009 15:00:42 +0000 (15:00 +0000)]
Make the fuzzer a bit more useful by forcing 7-bit data into it.

Getting valid UTF-8 sequences is quite unlikely, so we'd better just
convert data to 7 bits and make it extra likely for escape sequences to
occur.

14 years agolindev(4) [1] is supposed to be a collection of linux-specific pseudo
bz [Sat, 26 Sep 2009 12:45:28 +0000 (12:45 +0000)]
lindev(4) [1] is supposed to be a collection of linux-specific pseudo
devices that we also support, just not by default (thus only LINT or
module builds by default).

While currently there is only "/dev/full" [2], we are planning to see more
in the future.  We may decide to change the module/dependency logic in the
future should the list grow too long.

This is not part of linux.ko as also non-linux binaries like kFreeBSD
userland or ports can make use of this as well.

Suggested by: rwatson [1] (name)
Submitted by: ed [2]
Discussed with: markm, ed, rwatson, kib (weeks ago)
Reviewed by: rwatson, brueffer (prev. version)
PR: kern/68961
MFC after: 6 weeks

14 years agoHandle cases where virtual (GFS) vnodes are referenced when doing forced
pjd [Sat, 26 Sep 2009 00:10:45 +0000 (00:10 +0000)]
Handle cases where virtual (GFS) vnodes are referenced when doing forced
unmount. In that case we cannot depend on the proper order of invalidating
vnodes, so we have to free resources when we have a chance.

PR: kern/139062
Reported by: trasz
MFC after: 3 days

14 years agoOn lookup error VFS expects *vpp to be set to NULL, be sure to do that.
pjd [Sat, 26 Sep 2009 00:08:44 +0000 (00:08 +0000)]
On lookup error VFS expects *vpp to be set to NULL, be sure to do that.

MFC after: 3 days

14 years agoUse traverse() function to find and return mount point's vnode instead of
pjd [Sat, 26 Sep 2009 00:07:14 +0000 (00:07 +0000)]
Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

MFC after: 3 days

14 years ago- Don't depend on value returned by gfs_*_inactive(), it doesn't work
pjd [Sat, 26 Sep 2009 00:04:30 +0000 (00:04 +0000)]
- Don't depend on value returned by gfs_*_inactive(), it doesn't work
  well with forced unmounts when GFS vnodes are referenced.
- Make other preparations to GFS for forced unmounts.

PR: kern/139062
Reported by: trasz
MFC after: 3 days

14 years agoSync with head
des [Fri, 25 Sep 2009 23:28:57 +0000 (23:28 +0000)]
Sync with head

14 years agoStyle
des [Fri, 25 Sep 2009 23:27:07 +0000 (23:27 +0000)]
Style

14 years agoWipe out mergeinfo.
des [Fri, 25 Sep 2009 23:14:43 +0000 (23:14 +0000)]
Wipe out mergeinfo.

14 years agoOther minor style issues.
des [Fri, 25 Sep 2009 23:03:24 +0000 (23:03 +0000)]
Other minor style issues.

14 years agoSync with head
des [Fri, 25 Sep 2009 22:45:59 +0000 (22:45 +0000)]
Sync with head

14 years agoSlight style cleanup.
des [Fri, 25 Sep 2009 22:20:30 +0000 (22:20 +0000)]
Slight style cleanup.

14 years agoFix couple of style nits missed in the previous commit.
jkim [Fri, 25 Sep 2009 20:06:31 +0000 (20:06 +0000)]
Fix couple of style nits missed in the previous commit.

14 years ago- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
jkim [Fri, 25 Sep 2009 19:49:07 +0000 (19:49 +0000)]
- Use x86bios_offset() instead of BIOS_PADDRTOVADDR() macro.[1]
- Clear all registers before calling real mode interrupt handlers as we did
for dpms and vesa and re-enable the function as it should be fixed by this.
- Tidy up register access.  For example, when we call INT 0x15, AH=0xc0,
we used to initialize AX=0xc000 to clear AL at the same time but it is
very confusing.  We don't have to do this any more because we are explicitly
clearing all registers now.
- Check size of system configuration table although it is almost always 8.
This is to make sure we are not reading some random low physical memory.
Hopefully it is just zero in that case. :-)
- Fix some style nits and add more comments.

Submitted by: paradox (ddkprog yahoo com)[1]

14 years agoFurther improve comments.
des [Fri, 25 Sep 2009 18:50:33 +0000 (18:50 +0000)]
Further improve comments.

14 years agoImprove comments, and remove a bogus 0 id check.
des [Fri, 25 Sep 2009 18:44:34 +0000 (18:44 +0000)]
Improve comments, and remove a bogus 0 id check.

14 years agoFletcher4 is not the default checksum algorithm.
pjd [Fri, 25 Sep 2009 18:24:21 +0000 (18:24 +0000)]
Fletcher4 is not the default checksum algorithm.

MFC after: 3 days

14 years agoSwitch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
pjd [Fri, 25 Sep 2009 18:19:50 +0000 (18:19 +0000)]
Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
be a bit weak and OpenSolaris also switched to fletcher4.

PR: kern/139072
Reported by: Daniel Grund <bugs@dgrund.de>
MFC after: 3 days

14 years agoReject some VESA graphics modes if the controller does not have enough
jkim [Fri, 25 Sep 2009 18:08:38 +0000 (18:08 +0000)]
Reject some VESA graphics modes if the controller does not have enough
memory to support them.  Some adapters have expansible memory slots but
video mode table is static.  In this case, unusable modes may be reported.

Submitted by: paradox (ddkprog yahoo com) (initial patch)

14 years ago- Reduce BIOS memory mapping. We want 1MB of physical memory, not 12MB[1].
jkim [Fri, 25 Sep 2009 17:56:32 +0000 (17:56 +0000)]
- Reduce BIOS memory mapping.  We want 1MB of physical memory, not 12MB[1].
- Remove CS and IP registers from x86bios.h.  They have no use for us.
- Adjust register dump to make it little bit more useful for debugging.

Submitted by: paradox (ddkprog yahoo com)[1] (initial version)

14 years agoMerge r194204 from amd64/i386:
marius [Fri, 25 Sep 2009 17:08:51 +0000 (17:08 +0000)]
Merge r194204 from amd64/i386:

Enable PRINTF_BUFR_SIZE by default.

PR: 139134
MFC after: 3 days

14 years agoAdd a new escape sequence to switch between cons25 and xterm.
ed [Fri, 25 Sep 2009 13:51:01 +0000 (13:51 +0000)]
Add a new escape sequence to switch between cons25 and xterm.

Just run this to switch to xterm:

printf '\e[=T'

If you get bored and want to switch back to cons25, run this:

printf '\e[=1T'

I can now send an email to the lists, asking whether people are
interested in trying the xterm emulator.

14 years agoConformance: ignore {delete,insert} line while outside the scrolling region.
ed [Fri, 25 Sep 2009 11:58:51 +0000 (11:58 +0000)]
Conformance: ignore {delete,insert} line while outside the scrolling region.

I noticed a small inconsistency in delete and insert line between xterm
and libteken. libteken allows these actions to happen while the cursor
is placed outside the scrolling region, while xterm does not.

This behaviour seems to be VT100-like. Confirmation:

http://www.vt100.net/docs/vt102-ug/chapter5.html
"This sequence is ignored when cursor is outside scrolling region."

MFC after: 1 month

14 years agoFix LINT build.
delphij [Fri, 25 Sep 2009 02:19:57 +0000 (02:19 +0000)]
Fix LINT build.

14 years agodon't report error if key was deleted.
davidxu [Fri, 25 Sep 2009 00:15:30 +0000 (00:15 +0000)]
don't report error if key was deleted.

PR: threads/135462

14 years agoIn function do_rw_wrlock, when a writer got an error and before returning,
davidxu [Fri, 25 Sep 2009 00:03:13 +0000 (00:03 +0000)]
In function do_rw_wrlock, when a writer got an error and before returning,
check if there are readers blocked by us via URWLOCK_WRITE_WAITERS flag,
and resume the readers. The error must be EAGAIN, otherwise there must
have memory problem, and nobody can rescue the buggy application.

The revision 197445 might be reverted.

14 years agoDump real mode registers under bootverbose to help debugging BIOS emulator.
jkim [Thu, 24 Sep 2009 22:42:35 +0000 (22:42 +0000)]
Dump real mode registers under bootverbose to help debugging BIOS emulator.

14 years agoAdd __unused.
ed [Thu, 24 Sep 2009 20:34:44 +0000 (20:34 +0000)]
Add __unused.

It turns out my previous commit does survive a buildkernel, but not
compilation of the individual test tools that use WARNS=6.

14 years agoMake SCS work in 8-bit mode.
ed [Thu, 24 Sep 2009 20:33:14 +0000 (20:33 +0000)]
Make SCS work in 8-bit mode.

This means we can finally do things like VT100 box drawing when using
Syscons (8-bit characters). As far as I know, the only remaining issue
is the absense of proper escape sequences for special keyboard
characters (cursor, F1 to F12, etc) and xterm emulation should be ready
for general use.

Enabling xterm would have the following advantages:

- Easier possible migration to Unicode. cons25 termcap entries are very
  8-bit centric. They use things like CP437 characters for box drawing,
  etc.

- Better support for SSH'ing to other operating systems/devices. Most
  switches use VT100-style admin interfaces.

- Reduced bandwidth, because applications can now use things like
  scrolling regions.

- You can finally use applications like dtach(1) on both the console and
  inside an xterm.

14 years agoInitialize registers to zero before calling the interrupt handlers inside
jkim [Thu, 24 Sep 2009 20:23:24 +0000 (20:23 +0000)]
Initialize registers to zero before calling the interrupt handlers inside
emulator as we did in r197424 for vesa.

Submitted by: paradox (ddkprog yahoo com)

14 years agoSome broken VESA BIOSes, e.g., IBM T23, return wrong value from
jkim [Thu, 24 Sep 2009 20:10:00 +0000 (20:10 +0000)]
Some broken VESA BIOSes, e.g., IBM T23, return wrong value from
vesa_bios_get_line_length() in graphics mode.  Always calculate the value
from known video info instead.

Submitted by: paradox (ddkprog yahoo com)

14 years agor197444 unnecessarily changed positions of these files. Re-sort.
jkim [Thu, 24 Sep 2009 19:42:56 +0000 (19:42 +0000)]
r197444 unnecessarily changed positions of these files.  Re-sort.

14 years ago- Use FreeBSD function naming convention.
jkim [Thu, 24 Sep 2009 19:24:42 +0000 (19:24 +0000)]
- Use FreeBSD function naming convention.
- Change x86biosCall() to more appropriate x86bios_intr().[1]

Discussed with: delphij, paradox (ddkprog yahoo com)
Submitted by: paradox (ddkprog yahoo com)[1]

14 years agoAlign Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
yongari [Thu, 24 Sep 2009 17:53:00 +0000 (17:53 +0000)]
Align Tx/Rx descriptors on 32 bytes boundary instead of PAGE_SIZE.
Also align setup descriptor on 32 bytes boundary. Tx buffer have no
alignment limitation so create dmamap without alignment
restriction[1]. Rx buffer still seems to require 4 bytes alignment
limitation but we can simply use MCLBYTES for size to map the
buffer instead of TULIP_DATA_PER_DESC as the buffer is allocated
with m_getcl(9).
de(4) supports up to TULIP_MAX_TXSEG segments for Tx buffers,
increase maximum dma segment size to TULIP_MAX_TXSEG * MCLBYTES.
While I'm here remove TULIP_DATA_PER_DESC as it is not used anymore.

This should fix de(4) breakage introduced after r176206.

Submitted by: jhb [1]
Reported by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >
Tested by: WATANABE Kazuhiro < CQG00620 <> nifty dot ne dot jp >,
Takahashi Yoshihiro < nyan <> jp dot freebsd dot org >

14 years agoDestroy dmamap in dma cleanup.
yongari [Thu, 24 Sep 2009 17:11:41 +0000 (17:11 +0000)]
Destroy dmamap in dma cleanup.

14 years agoConsistently use bus_addr_t.
yongari [Thu, 24 Sep 2009 17:07:04 +0000 (17:07 +0000)]
Consistently use bus_addr_t.

14 years agoDo not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
mav [Thu, 24 Sep 2009 17:03:32 +0000 (17:03 +0000)]
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems,
where some ata channels (usually ata1) was probed, but failed to attach.

Reviewed by: jhb, imp
Tested by: many

14 years agoUse __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
yongari [Thu, 24 Sep 2009 16:57:35 +0000 (16:57 +0000)]
Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
alignment fixup code for received frames on strict alignment
architectures.

14 years agoRemove unnecessary locking from attach(). This fixes a LOR between the
jhb [Thu, 24 Sep 2009 16:51:56 +0000 (16:51 +0000)]
Remove unnecessary locking from attach().  This fixes a LOR between the
acpi_ibm lock and the sysctl lock.

MFC after: 3 days

14 years agoBefore calling vflush(FORCECLOSE) mark file system as unmounted so the
pjd [Thu, 24 Sep 2009 15:56:26 +0000 (15:56 +0000)]
Before calling vflush(FORCECLOSE) mark file system as unmounted so the
following vnops will fail. This is very important, because without this change
vnode could be reclaimed at any point, even if we increased usecount. The only
way to ensure that vnode won't be reclaimed was to lock it, which would be very
hard to do in ZFS without changing a lot of code. With this change simply
increasing usecount is enough to be sure vnode won't be reclaimed from under
us. To be precise it can still be reclaimed but we won't be able to see it,
because every try to enter ZFS through VFS will result in EIO.

The only function that cannot return EIO, because it is needed for vflush() is
zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
z_teardown_lock and never returns EIO.

MFC after: 3 days

14 years agoClose race in zfs_zget(). We have to increase usecount first and then
pjd [Thu, 24 Sep 2009 15:49:15 +0000 (15:49 +0000)]
Close race in zfs_zget(). We have to increase usecount first and then
check for VI_DOOMED flag. Before this change vnode could be reclaimed
between checking for the flag and increasing usecount.

MFC after: 3 days

14 years agoAdd a backtrace to the "fpudna in kernel mode!" case, to help track down
emaste [Thu, 24 Sep 2009 14:26:42 +0000 (14:26 +0000)]
Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.

Reviewed by: bde

14 years agoUpdate the includes to two more levels of subdirs.
rpaulo [Thu, 24 Sep 2009 11:11:00 +0000 (11:11 +0000)]
Update the includes to two more levels of subdirs.

MFC after: 1 week

14 years agonumber of cleanups in i386 and amd64 pci md code
avg [Thu, 24 Sep 2009 07:11:23 +0000 (07:11 +0000)]
number of cleanups in i386 and amd64 pci md code

o introduce PCIE_REGMAX and use it instead of ad-hoc constant
o where 'reg' parameter/variable is not already unsigned, cast it to
  unsigned before comparison with maximum value to cut off negative
  values
o use PCI_SLOTMAX in several places where 31 or 32 were explicitly used
o drop redundant check of 'bytes' in i386 pciereg_cfgread() - valid
  values are already checked in the subsequent switch

Reviewed by: jhb
MFC after: 1 week

14 years agoDon't create more partitions than can fit in the table by checking
marcel [Thu, 24 Sep 2009 06:00:49 +0000 (06:00 +0000)]
Don't create more partitions than can fit in the table by checking
that the index is within bounds.

14 years agorwlock implemented from libthr need to fall through the 'hard path' and
attilio [Wed, 23 Sep 2009 21:38:57 +0000 (21:38 +0000)]
rwlock implemented from libthr need to fall through the 'hard path' and
query umtx also if the shared waiters bit is set on a shared lock.
The writer starvation avoidance technique, infact, can lead to shared
waiters on a shared lock which can bring to a missed wakeup and thus
to a deadlock if the right bit is not checked (a notable case is the
writers counterpart to be handled through expired timeouts).

Fix that by checking for the shared waiters bit also when unlocking the
shared locks.

That bug was causing a reported MySQL deadlock.
Many thanks go to Nick Esborn and his employer DesertNet which provided
time and machines to identify and fix this issue.

PR: thread/135673
Reported by: Nick Esborn <nick at desert dot net>
Tested by: Nick Esborn <nick at desert dot net>
Reviewed by: jeff

14 years agoMove sys/dev/x86bios to sys/compat/x86bios.
jkim [Wed, 23 Sep 2009 20:49:14 +0000 (20:49 +0000)]
Move sys/dev/x86bios to sys/compat/x86bios.

It may not be optimal but it is clearly better than the old place.

OK'ed by: delphij, paradox (ddkprog yahoo com)

14 years ago- Use spin lock instead of default mutex for safety. INT/IRET instructions
jkim [Wed, 23 Sep 2009 20:13:36 +0000 (20:13 +0000)]
- Use spin lock instead of default mutex for safety.  INT/IRET instructions
save/clear/restore flags but emulated flags have no effect on the host.
I believe BIOS writers never meant to run their code in emulated
environment with interrupt enabled. :-)
- Use memcpy(3) instead of copying individual members.  I believe struct
x86regs was intentionally copied from the first half of struct x86emu_regs
for this very purpose.
- Fix some style nits and consistencies.

Reviewed by: delphij, paradox (ddkprog yahoo com)

14 years agoReplace 'can not' with 'cannot' so that we use 'cannot' everywhere.
rpaulo [Wed, 23 Sep 2009 17:48:16 +0000 (17:48 +0000)]
Replace 'can not' with 'cannot' so that we use 'cannot' everywhere.

14 years agoExtract the code to find and map the MADT ACPI table during early kernel
jhb [Wed, 23 Sep 2009 15:42:35 +0000 (15:42 +0000)]
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.

14 years agoUninline an instance of STAILQ_FOREACH_SAFE().
jhb [Wed, 23 Sep 2009 15:39:54 +0000 (15:39 +0000)]
Uninline an instance of STAILQ_FOREACH_SAFE().

14 years agoUse %zu for size_t, not %zd.
emaste [Wed, 23 Sep 2009 15:32:59 +0000 (15:32 +0000)]
Use %zu for size_t, not %zd.

Submitted by: ru
MFC after: 1 week

14 years agoAdd cross-filesystem regression tests for ACLs.
trasz [Wed, 23 Sep 2009 15:12:20 +0000 (15:12 +0000)]
Add cross-filesystem regression tests for ACLs.

14 years agoIn VOP_SETACL(9) and VOP_GETACL(9), specifying wrong ACL type should result
trasz [Wed, 23 Sep 2009 15:09:34 +0000 (15:09 +0000)]
In VOP_SETACL(9) and VOP_GETACL(9), specifying wrong ACL type should result
in EINVAL, not EOPNOTSUPP.

14 years agoAdd ACL fuzzer. It's not used by the regression tests right now,
trasz [Wed, 23 Sep 2009 15:06:51 +0000 (15:06 +0000)]
Add ACL fuzzer.  It's not used by the regression tests right now,
but I'd prefert to have it here, so it won't get lost.

14 years agoImprove on r197334:
mlaier [Wed, 23 Sep 2009 14:48:13 +0000 (14:48 +0000)]
Improve on r197334:
Find the most recently merged svn revision, too. If we get a svn revision
that matches HEAD use rXXX=GIT otherwise use rXXX+GIT.

Submitted by: avg
MFC after: 3 days
X-MFC: not stable/8 before 8.0

14 years ago- Remove a bogus test: setsockopt() doesn't return a length, getsockopt()
jhb [Wed, 23 Sep 2009 14:23:09 +0000 (14:23 +0000)]
- Remove a bogus test: setsockopt() doesn't return a length, getsockopt()
  does.
- Use %z to printf a size_t to fix compile on 64-bit platforms.

14 years ago- Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent filter
stas [Wed, 23 Sep 2009 12:33:32 +0000 (12:33 +0000)]
- Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent filter
  has been implemented.

14 years agoDocument osrel node for procfs.
kib [Wed, 23 Sep 2009 12:10:13 +0000 (12:10 +0000)]
Document osrel node for procfs.

Approved by: des (procfs maintainer)
MFC after: 3 weeks

14 years agoAdd per-process osrel node to the procfs, to allow read and set p_osrel
kib [Wed, 23 Sep 2009 12:08:08 +0000 (12:08 +0000)]
Add per-process osrel node to the procfs, to allow read and set p_osrel
value for the process.

Approved by: des (procfs maintainer)
MFC after: 3 weeks

14 years agoRestore BSD behaviour - when creating new directory entry use parent directory
pjd [Wed, 23 Sep 2009 09:18:16 +0000 (09:18 +0000)]
Restore BSD behaviour - when creating new directory entry use parent directory
gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR: kern/139076
Reported by: Sean Winn <sean@gothic.net.au>
MFC after: 3 days

14 years agoIn netstat -x, do not try to print out tcp timer status for udp sockets.
silby [Wed, 23 Sep 2009 05:32:33 +0000 (05:32 +0000)]
In netstat -x, do not try to print out tcp timer status for udp sockets.

14 years agoInitialize registers to zero before calling the interrupt handlers inside
delphij [Wed, 23 Sep 2009 02:45:02 +0000 (02:45 +0000)]
Initialize registers to zero before calling the interrupt handlers inside
emulator.  This fixes VESA related freeze observed on some systems.

Submitted by: paradox <ddkprog yahoo com>

14 years agoMFp4:
mav [Tue, 22 Sep 2009 22:23:52 +0000 (22:23 +0000)]
MFp4:
If on sense request device returns no sence, give up and return,
or we may loop forever.

14 years agoLock bus scan.
mav [Tue, 22 Sep 2009 22:20:43 +0000 (22:20 +0000)]
Lock bus scan.

14 years agoMFp4:
mav [Tue, 22 Sep 2009 22:17:14 +0000 (22:17 +0000)]
MFp4:
Reduce code duplication.

14 years agoTemporarily disable typematic retrieving code until we get a real fix,
delphij [Tue, 22 Sep 2009 20:12:10 +0000 (20:12 +0000)]
Temporarily disable typematic retrieving code until we get a real fix,
which currently causes hangs in some configurations.

Reported by: joel
Submitted by: swell.k at gmail.com

14 years agoThe elements in the component arrays may be direct Package objects rather
jhb [Tue, 22 Sep 2009 18:34:23 +0000 (18:34 +0000)]
The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

I think a recent change to ACPI-CA is causing the interpreter to
automatically expand these references.

Reported by: Olivier Smedts  olivier gid0 org
MFC after: 3 days

14 years agoNote the D3.03 mesh changes.
rpaulo [Tue, 22 Sep 2009 18:19:18 +0000 (18:19 +0000)]
Note the D3.03 mesh changes.

MFC after: 1 week

14 years agoUpdate 802.11s mesh support to draft 3.03. This includes a revised frame
rpaulo [Tue, 22 Sep 2009 18:18:14 +0000 (18:18 +0000)]
Update 802.11s mesh support to draft 3.03. This includes a revised frame
format for peering and changes to the PERR frames.
Note that this is incompatible with the previous code.

Reviewed by: sam
MFC after: 1 week

14 years agoReserve events for XScale.
rpaulo [Tue, 22 Sep 2009 17:45:28 +0000 (17:45 +0000)]
Reserve events for XScale.

Reviewed by: jkoshy, gnn
MFC after: 1 week

14 years agoRemoved unused empty directory.
delphij [Tue, 22 Sep 2009 16:59:15 +0000 (16:59 +0000)]
Removed unused empty directory.

Submitted by: b. f. <bf1783 googlemail com>

14 years ago- Split the logic to parse an SMAP entry out into a separate function on
jhb [Tue, 22 Sep 2009 16:51:00 +0000 (16:51 +0000)]
- Split the logic to parse an SMAP entry out into a separate function on
  amd64 similar to i386.  This fixes a bug on amd64 where overlapping
  entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
  instead of an append to support systems with out-of-order SMAP entries.

PR: amd64/138220
Reported by: James R. Van Artsdalen  james of jrv org
MFC after: 3 days

14 years agoChange the command argument to ioctl routines to u_long to avoid
rdivacky [Tue, 22 Sep 2009 16:28:07 +0000 (16:28 +0000)]
Change the command argument to ioctl routines to u_long to avoid
truncating the command to 32bit on 64bit archs where int is 32bit
(ie. amd64).

Approved by: scottl
Approved by: ed (mentor, implicit)

14 years agoDon't build ufs_gjournal.c at all if UFS_GJOURNAL option is not given
rdivacky [Tue, 22 Sep 2009 16:22:05 +0000 (16:22 +0000)]
Don't build ufs_gjournal.c at all if UFS_GJOURNAL option is not given
instead of building an almost empty C file.

Approved by: pjd
Approved by: ed (mentor, implicit)

14 years agoChange unsigned foo to u_foo as required by style(9).
rdivacky [Tue, 22 Sep 2009 16:16:02 +0000 (16:16 +0000)]
Change unsigned foo to u_foo as required by style(9).

Requested by: bde
Approved by: ed (mentor)

14 years agoDon't reread the command register to see if enabling I/O or memory
jhb [Tue, 22 Sep 2009 15:43:03 +0000 (15:43 +0000)]
Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

PR: kern/137668
Tested by: Aurelien Mere  aurelien.mere  amc-os.com
MFC after: 3 days

14 years agoAdd pieces of infrastructure required for NFSv4 ACL support in UFS.
trasz [Tue, 22 Sep 2009 15:15:03 +0000 (15:15 +0000)]
Add pieces of infrastructure required for NFSv4 ACL support in UFS.

Reviewed by: rwatson

14 years agoMove es137x.c and es137x.h to a 2-clause BSD license. Also move a few
joel [Tue, 22 Sep 2009 13:23:59 +0000 (13:23 +0000)]
Move es137x.c and es137x.h to a 2-clause BSD license.  Also move a few
comments.

Submitted by: Joachim Kuebart
Approved by: core, Russell Cattelan <cattelan@thebarn.com>

14 years agoThe ndis_scan function may be started after ndis vap have been destroyed
cokane [Tue, 22 Sep 2009 12:36:51 +0000 (12:36 +0000)]
The ndis_scan function may be started after ndis vap have been destroyed

PR: kern/138632
Submitted by: Paul B. Mahol <onemda at gmail.com>
MFC after: 3 days