Commit Graph

149967 Commits

Author SHA1 Message Date
Kirk McKusick
3af26d4abb Convert quotacheck to use new quotafile functions in libutil.
Still to come, conversion between 64-bit and 32-bit quotafile formats.
2009-12-27 06:28:01 +00:00
Kirk McKusick
c3616249ab Minor bugs turned up during conversion of quotacheck. 2009-12-27 06:26:04 +00:00
Kirk McKusick
e525d16a80 Add and document new quoat_on and quota_off functions. 2009-11-16 18:59:04 +00:00
Kirk McKusick
708a2897f1 Convert quotaon/quotaoff to use the new quotafile functions. 2009-11-16 18:50:51 +00:00
Kirk McKusick
37ed8e48db Update to work with quotafile functions in -libutil. 2009-10-21 04:35:09 +00:00
Kirk McKusick
4e717eeafc Claen up format when doing non-humanized output. 2009-10-20 17:50:27 +00:00
Kirk McKusick
88c01c7739 Update to work with quotafile functions in -libutil. 2009-10-20 16:46:39 +00:00
Kirk McKusick
0cf50fd7dc Update to work with quotafile functions in -libutil.
Add -h flag to provide humanized output.
2009-10-20 05:40:51 +00:00
Kirk McKusick
6197731d81 Add quota_maxid which returns the maximum user (or group) identifier
in an associated quotafile. Needed by repquota.

Bug fix in quota_read.
2009-10-20 05:37:54 +00:00
Dag-Erling Smørgrav
6cfc1c1e18 type / format fixup 2009-09-27 17:33:26 +00:00
Dag-Erling Smørgrav
3f89d457bf Sync from head. 2009-09-26 23:25:22 +00:00
Dag-Erling Smørgrav
5666aadb3d Further extend the quotafile API. 2009-09-26 23:16:06 +00:00
Dag-Erling Smørgrav
2db2319de5 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".
2009-09-26 23:05:01 +00:00
Hiroki Sato
97c8942c91 Use ipv6if() when $rtadvd_interfaces="AUTO". 2009-09-26 19:00:47 +00:00
Hiroki Sato
27fa984efd Move rc.d/{stf,faith} to just before rc.d/routing.
Pointed out by:	tegge
2009-09-26 19:00:20 +00:00
Hiroki Sato
2e77c5abfb 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).
2009-09-26 18:59:00 +00:00
Pawel Jakub Dawidek
5ff124a953 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
2009-09-26 18:23:16 +00:00
Alan Cox
b8947edcb6 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
2009-09-26 18:20:40 +00:00
Rui Paulo
98c53ad360 Promote the cpu_class local variable to global and expose it in md_var.h
Reviewed by:	freebsd-arm
2009-09-26 16:37:23 +00:00
Ed Schouten
56a4365bde 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>
2009-09-26 15:26:32 +00:00
Ed Schouten
f311d56014 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
2009-09-26 15:07:11 +00:00
Ed Schouten
cd531e74e9 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.
2009-09-26 15:03:42 +00:00
Ed Schouten
a78f7fafc0 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.
2009-09-26 15:00:42 +00:00
Bjoern A. Zeeb
4507f02e0e 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
2009-09-26 12:45:28 +00:00
Pawel Jakub Dawidek
ab711589df 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
2009-09-26 00:10:45 +00:00
Pawel Jakub Dawidek
a0b238644a On lookup error VFS expects *vpp to be set to NULL, be sure to do that.
MFC after:	3 days
2009-09-26 00:08:44 +00:00
Pawel Jakub Dawidek
a99aaff645 Use traverse() function to find and return mount point's vnode instead of
covered vnode when snapshot is already mounted.

MFC after:	3 days
2009-09-26 00:07:14 +00:00
Pawel Jakub Dawidek
1aba32d9b4 - 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
2009-09-26 00:04:30 +00:00
Dag-Erling Smørgrav
4085a92bc9 Sync with head 2009-09-25 23:28:57 +00:00
Dag-Erling Smørgrav
fdd356a8d1 Style 2009-09-25 23:27:07 +00:00
Dag-Erling Smørgrav
bc5fd90972 Wipe out mergeinfo. 2009-09-25 23:14:43 +00:00
Dag-Erling Smørgrav
95f1d628d9 Other minor style issues. 2009-09-25 23:03:24 +00:00
Dag-Erling Smørgrav
0fbc5fbedf Sync with head 2009-09-25 22:45:59 +00:00
Dag-Erling Smørgrav
ebb2b0f28a Slight style cleanup. 2009-09-25 22:20:30 +00:00
Jung-uk Kim
7ca724d57b Fix couple of style nits missed in the previous commit. 2009-09-25 20:06:31 +00:00
Jung-uk Kim
ee8cbcb471 - 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]
2009-09-25 19:49:07 +00:00
Dag-Erling Smørgrav
0bb2e5de60 Further improve comments. 2009-09-25 18:50:33 +00:00
Dag-Erling Smørgrav
91b2a3e204 Improve comments, and remove a bogus 0 id check. 2009-09-25 18:44:34 +00:00
Pawel Jakub Dawidek
18e16fbbce Fletcher4 is not the default checksum algorithm.
MFC after:	3 days
2009-09-25 18:24:21 +00:00
Pawel Jakub Dawidek
86758476b4 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
2009-09-25 18:19:50 +00:00
Jung-uk Kim
54680451c3 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)
2009-09-25 18:08:38 +00:00
Jung-uk Kim
6aabed1c77 - 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)
2009-09-25 17:56:32 +00:00
Marius Strobl
eaa817d661 Merge r194204 from amd64/i386:
Enable PRINTF_BUFR_SIZE by default.

PR:		139134
MFC after:	3 days
2009-09-25 17:08:51 +00:00
Ed Schouten
2c549cc439 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.
2009-09-25 13:51:01 +00:00
Ed Schouten
c56bcdbb96 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
2009-09-25 11:58:51 +00:00
Xin LI
57f20544f5 Fix LINT build. 2009-09-25 02:19:57 +00:00
David Xu
daf3ced72b don't report error if key was deleted.
PR:	threads/135462
2009-09-25 00:15:30 +00:00
David Xu
b101b127f3 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.
2009-09-25 00:03:13 +00:00
Jung-uk Kim
5ec510d8f4 Dump real mode registers under bootverbose to help debugging BIOS emulator. 2009-09-24 22:42:35 +00:00
Ed Schouten
64d0447d4e Add __unused.
It turns out my previous commit does survive a buildkernel, but not
compilation of the individual test tools that use WARNS=6.
2009-09-24 20:34:44 +00:00