Commit Graph

151676 Commits

Author SHA1 Message Date
Luigi Rizzo
bcd3b68dd2 we really need htonl() here, see the comment a few lines above in the code. 2009-12-29 00:02:57 +00:00
Ed Schouten
01d716fc66 Use ANSI declarations instead of K&R. 2009-12-28 23:12:55 +00:00
Ed Schouten
62375ca8c1 Don't forget to use `void' for sched_balance(). It has no arguments. 2009-12-28 23:12:12 +00:00
Ed Schouten
2de7889ec8 Perform cleanups to rpc.rusersd:
- Perform whitespace fixes. Use tabs instead of 8 spaces.
- Make it build at WARNS=6.
2009-12-28 23:01:24 +00:00
Antoine Brodin
13e403fdea (S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
Fix some wrong usages.
Note: this does not affect generated binaries as this argument is not used.

PR:		137213
Submitted by:	Eygene Ryabinkin (initial version)
MFC after:	1 month
2009-12-28 22:56:30 +00:00
Xin LI
9189129097 Apply OpenSolaris revision 8012 which brings our zpool to version 14,
making it possible for zpools created on OpenSolaris 2009.06 be used
on FreeBSD.

PR:		kern/141800
Submitted by:	mm
Reviewed by:	pjd, trasz
Obtained from:	OpenSolaris
MFC after:	2 weeks
2009-12-28 22:15:11 +00:00
Edward Tomasz Napierala
bbf06fe11d The net/if_slvar.h header is long gone. 2009-12-28 22:14:49 +00:00
Bjoern A. Zeeb
fc74d005d9 Make the compiler happy after r201125:
- + remove two unnecessary initializations in ip_output;
+ + remove one unnecessary initializations in ip_output;
2009-12-28 21:14:18 +00:00
Ed Schouten
70ad88f354 Migrate finger(1) away from <utmp.h>.
Unfortunately it also uses lastlog, which means we must resort to local
extensions of the utmpx-interface. Because the user name and TTY name
are now nul-terminated, there is no need to copy around strings as
often.
2009-12-28 20:54:34 +00:00
Alexander Motin
1c80ec0a6b Add BIO_DELETE support to ada(4):
- For SSDs use TRIM feature of DATA SET MANAGEMENT command, as defined by
ACS-2 specification working draft.
- For CompactFlash use CFA ERASE command, same as ad(4) does.

With this patch, `newfs -E /dev/ada1` was able to restore write speed of
my heavily weared OCZ Vertex SSD (firmware 1.4) up to the initial level
for the most part of it's capacity. Previous 1.3 firmware, even reportiong
TRIM capabilty bit set, was not working, reporting ABORT error for every
DSM command.

I have no idea whether it is normal, but for some reason it takes 200ms
to handle any TRIM command on this drive, that was making delete extremely
slow. But TRIM command is able to accept long list of LBAs and the length of
that list seems doesn't affect it's execution time. Implemented request
clusting algorithm allowed me to rise delete rate up to reasonable numbers,
when many parallel DELETE requests running.
2009-12-28 20:08:01 +00:00
Justin T. Gibbs
a4660d594f Correct alignment and boundary constraints in blkfront's bus dma tag. The
blkif interface in Xen requires all I/O to be 512 byte aligned with each
segment bounded by a 4k page.

Note: This submission only documents the proper contraints for blkif I/O.
      The alignment code in busdma does not yet handle alignment constraints
      correctly in all cases.
2009-12-28 18:59:13 +00:00
Xin LI
31faa7deeb Grammar fix.
Submitted by:	Kenyon Ralph <kenyon kenyonralph com>
MFC after:	1 week
2009-12-28 18:51:26 +00:00
Xin LI
7f471a3289 Make umount(8) WARNS=6 clean:
- Cast delimiter width to integer [1]
 - Solve name conflicts against system header
 - Constify parameters to avoid qualifier conflict

PR:		bin/140017 [1]
Submitted by:	Ulrich Spörlein <uqs spoerlein net> [1]
MFC after:	1 month
Sponsored by:	iXsystems, Inc
2009-12-28 17:57:37 +00:00
Konstantin Belousov
a411786576 Add a knob to allow reclaim of the directory vnodes that are source of
the namecache records. The reclamation is not enabled by default because
for typical workload it would make namecache unusable, but large nested
directory tree easily puts any process that accesses filesystem into 1
second wait for vlru.

Reported by:	yar (long time ago)
MFC after:	3 days
2009-12-28 15:35:39 +00:00
Luigi Rizzo
ec396e61ed introduce a local variable rte acting as a cache of ro->ro_rt
within ip_output, achieving (in random order of importance):
- a reduction of the number of 'r's in the source code;
- improved legibility;
- a reduction of 64 bytes in the .text
2009-12-28 14:48:32 +00:00
Marius Strobl
4c6587a6cf Account for firmware versions which include the CDMA interrupts in
the OFW device tree.

MFC after:	3 days
2009-12-28 14:16:40 +00:00
Luigi Rizzo
ca8b83b0fa + remove an unused #define print_ip;
+ remove two unnecessary initializations in ip_output;
+ localize 'len';
+ introduce a temporary variable n to count the number of fragments,
  the compiler seems unable to identify a common subexpression
  (written 3 times, used twice);
+ document some assumptions on ip_len and ip_hl
2009-12-28 14:09:46 +00:00
Luigi Rizzo
e59084e086 bring the NGM_IPFW_COOKIE back into ng_ipfw.h, libnetgraph expects
to find it there. Unfortunately this reintroduces the dependency
on ip_fw_pfil.c
2009-12-28 12:29:13 +00:00
Luigi Rizzo
b6d33186d2 this file is also affected by the ipfw changes 2009-12-28 10:48:01 +00:00
Luigi Rizzo
830c6e2b97 bring in several cleanups tested in ipfw3-head branch, namely:
r201011
- move most of ng_ipfw.h into ip_fw_private.h, as this code is
  ipfw-specific. This removes a dependency on ng_ipfw.h from some files.

- move many equivalent definitions of direction (IN, OUT) for
  reinjected packets into ip_fw_private.h

- document the structure of the packet tags used for dummynet
  and netgraph;

r201049
- merge some common code to attach/detach hooks into
  a single function.

r201055
- remove some duplicated code in ip_fw_pfil. The input
  and output processing uses almost exactly the same code so
  there is no need to use two separate hooks.
  ip_fw_pfil.o goes from 2096 to 1382 bytes of .text

r201057 (see the svn log for full details)
- macros to make the conversion of ip_len and ip_off
  between host and network format more explicit

r201113 (the remaining parts)
- readability fixes -- put braces around some large for() blocks,
  localize variables so the compiler does not think they are uninitialized,
  do not insist on precise allocation size if we have more than we need.

r201119
- when doing a lookup, keys must be in big endian format because
  this is what the radix code expects (this fixes a bug in the
  recently-introduced 'lookup' option)

No ABI changes in this commit.

MFC after:	1 week
2009-12-28 10:47:04 +00:00
Luigi Rizzo
6cc7b9f5d9 readability fixes -- add braces on large blocks, remove unnecessary
initializations
2009-12-28 10:19:53 +00:00
Luigi Rizzo
6730dcaec7 explain details of operation of table lookups, and improve portability 2009-12-28 10:12:35 +00:00
Edward Tomasz Napierala
15db839614 Bump manual page dates. 2009-12-28 09:41:13 +00:00
Edward Tomasz Napierala
6fd04c3a67 Don't refer to pppd(8). 2009-12-28 09:37:33 +00:00
Edward Tomasz Napierala
8ae7052e5f Change u3g(4) and ucom(4) to not refer to pppd(8), which is gone. 2009-12-28 09:32:45 +00:00
Edward Tomasz Napierala
cf39698e16 Line discipline support is gone; update tty(4) manual page to reflect this.
Reviewed by:	ed
2009-12-28 09:28:22 +00:00
Edward Tomasz Napierala
1f83b37ee7 Add references to termios-related stuff. 2009-12-28 09:26:46 +00:00
Tim Kientzle
989f6ccc3f Portability. 2009-12-28 06:59:35 +00:00
Tim Kientzle
0d722d6394 Remove some dead assignments, fix some declarations. 2009-12-28 03:33:05 +00:00
Tim Kientzle
e15da0400a Clarify an example so Linux folks won't keep getting confused by this point. 2009-12-28 03:31:29 +00:00
Tim Kientzle
456bd00333 Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r. 2009-12-28 03:30:31 +00:00
Tim Kientzle
f773eba566 Fix some unused variables and dead assignments. 2009-12-28 03:28:21 +00:00
Tim Kientzle
108f9d8324 Remove an unused variable and an unreachable statement. 2009-12-28 03:25:33 +00:00
Tim Kientzle
409cc2477d Fix line endings. 2009-12-28 03:24:56 +00:00
Tim Kientzle
354c05f65d Discourage external use of this header. 2009-12-28 03:20:54 +00:00
Tim Kientzle
4ffba49a6f Remove unused variable. 2009-12-28 03:14:30 +00:00
Tim Kientzle
6f1d1a5084 O_BINARY for Windows. 2009-12-28 03:13:49 +00:00
Tim Kientzle
966062dd11 Handle Zip CRC validation for uncompressed Zip archives even on
platforms that lack zlib.
2009-12-28 03:11:36 +00:00
Tim Kientzle
10f117ebc2 Include limits.h; remove unused variable. 2009-12-28 03:06:27 +00:00
Tim Kientzle
09bf59d4b9 Use ino64 interface. 2009-12-28 03:05:31 +00:00
Tim Kientzle
2b1f175936 Use new ino64 interface. 2009-12-28 03:03:00 +00:00
Tim Kientzle
9adedf9679 New archive_file_count() utility. 2009-12-28 02:58:14 +00:00
Tim Kientzle
042c735c81 Portability fixes. 2009-12-28 02:45:56 +00:00
Tim Kientzle
65d5426feb Various portability fixes, plus:
* New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates
2009-12-28 02:41:27 +00:00
Tim Kientzle
13f322aec3 Remove an unused variable and an unnecessary increment. 2009-12-28 02:33:22 +00:00
Tim Kientzle
cc1e3ebe54 Eliminate an unused assignment. 2009-12-28 02:29:21 +00:00
Tim Kientzle
2866e9d5d0 Portability: Set the file descriptor to binary mode on Win32 2009-12-28 02:28:44 +00:00
Tim Kientzle
c0840e91d3 Discourage outside use of this internal header. 2009-12-28 02:26:06 +00:00
Tim Kientzle
c17fd585bb Remove dead assignment. 2009-12-28 02:22:41 +00:00
Tim Kientzle
a5a14ed059 Portability:
* some non-FreeBSD platforms do actually define __FBSDID() in sys/cdefs.h
 * Borland C <sigh>
2009-12-28 02:22:04 +00:00