Commit Graph

160869 Commits

Author SHA1 Message Date
kientzle
6e9959a0d1 Rationalize the support for cryptographic hashes. 2009-12-29 06:39:07 +00:00
kientzle
3558b2ba52 Essentially eliminate problems with false hardlinks in POSIX cpio
archives by generating synthetic ino values and mapping values
from disk into the new values.
2009-12-29 06:34:23 +00:00
kientzle
4ccc9e75ff Clear extraneous error messages. 2009-12-29 06:27:19 +00:00
kientzle
98c884f078 Zip write support for libarchive.
The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.
2009-12-29 06:15:32 +00:00
kientzle
40c74f9008 If we're linking against liblzma, allow the decompressor to use up to
1<<30 bytes of memory, which is required for some streams.

Also, try to make the taster more discriminating about raw lzma streams.
The detection here is still really weak, though; please use xz instead
of lzma.
2009-12-29 06:06:20 +00:00
kientzle
54b5963bf8 ar only needs to support ar format. 2009-12-29 05:58:40 +00:00
kientzle
9f1cacc2a4 Minor style fixes plus a fix for an obscure crash on certain malformed
mtree files.
2009-12-29 05:52:13 +00:00
kientzle
a587aab420 Be a little more skeptical of dev/ino matches when reading cpio files.
This eliminates some false-positives in the hardlink detection logic.
2009-12-29 05:50:34 +00:00
kientzle
b51f9a7986 Style and portability fixes for pax writer. Mostly very routine, except for:
* Use ino64 where appropriate
 * Don't pass atime or nsec to ustar formatter
2009-12-29 05:47:46 +00:00
kientzle
97620eccc8 Style fixes to tar reader:
For portability, prefer int64_t to off_t.
  Improve numeric overflow handling when parsing.
  Fix some variable types.
  Eliminate some unused results.
2009-12-29 05:44:39 +00:00
kientzle
de6816e634 Various style fixes to the 'newc' cpio writer:
* Warn about truncation of ino
 * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation
 * Eliminate some unused variables
2009-12-29 05:41:57 +00:00
kientzle
cbe5f60f48 Various fixes when creating objects on disk:
* Write xattrs last instead of first (required on platforms that use
   system xattrs for security attributes)
 * Better handling of chdir() failures
 * Don't bother trying to shorten files via seek()/write()
 * Fix build on systems that lack link()/symlink()/mknod()
 * Prefer futimens()/utimensat() when they're present
2009-12-29 05:35:40 +00:00
kientzle
25112939de Catch decompression failures earlier. In particular, this gives
immediate feedback if we fail to fork an external decompression program.
2009-12-29 05:30:23 +00:00
kientzle
8471ffeefd Various style and portability fixes, including:
* Enforce option interface can only be used before the archive is opened
 * Correctly handle large skips on platforms with 32-bit off_t
 * Use int64_t instead of off_t
2009-12-29 05:28:28 +00:00
kientzle
7bdc19612b 64-bit ino support and discourage bad use of this header. 2009-12-29 05:20:12 +00:00
jkoshy
c2b52cffb7 Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele().
Reviewed by:	 kib
2009-12-29 02:35:50 +00:00
luigi
7236f425fc we really need htonl() here, see the comment a few lines above in the code. 2009-12-29 00:02:57 +00:00
ed
ce942064c6 Use ANSI declarations instead of K&R. 2009-12-28 23:12:55 +00:00
ed
3297cb3093 Don't forget to use `void' for sched_balance(). It has no arguments. 2009-12-28 23:12:12 +00:00
ed
f922449aa5 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
bfd388c026 (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
delphij
2414a09002 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
trasz
0b0591131c The net/if_slvar.h header is long gone. 2009-12-28 22:14:49 +00:00
bz
7eddc3a63a 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
5bf232465b 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
mav
f60568ce2e 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
gibbs
504913dcc8 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
delphij
2443a07e4f Grammar fix.
Submitted by:	Kenyon Ralph <kenyon kenyonralph com>
MFC after:	1 week
2009-12-28 18:51:26 +00:00
delphij
d56b669882 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
kib
56603546c6 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
1a1b4d40fb 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
65b8b0a614 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
9c18067568 + 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
b41c473d90 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
3065c48390 this file is also affected by the ipfw changes 2009-12-28 10:48:01 +00:00
luigi
483862a5a2 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
ffe8fa8dad readability fixes -- add braces on large blocks, remove unnecessary
initializations
2009-12-28 10:19:53 +00:00
luigi
5596409e34 explain details of operation of table lookups, and improve portability 2009-12-28 10:12:35 +00:00
trasz
e88226db95 Bump manual page dates. 2009-12-28 09:41:13 +00:00
trasz
0738292d17 Don't refer to pppd(8). 2009-12-28 09:37:33 +00:00
trasz
d764dd9021 Change u3g(4) and ucom(4) to not refer to pppd(8), which is gone. 2009-12-28 09:32:45 +00:00
trasz
664558bea0 Line discipline support is gone; update tty(4) manual page to reflect this.
Reviewed by:	ed
2009-12-28 09:28:22 +00:00
trasz
7a5cea503e Add references to termios-related stuff. 2009-12-28 09:26:46 +00:00
kientzle
e86a477412 Portability. 2009-12-28 06:59:35 +00:00
kientzle
1a725d203e Remove some dead assignments, fix some declarations. 2009-12-28 03:33:05 +00:00
kientzle
36429d6a27 Clarify an example so Linux folks won't keep getting confused by this point. 2009-12-28 03:31:29 +00:00
kientzle
751833b2d3 Compatibility with old systems with non-POSIX getpwuid_r/getgrgid_r. 2009-12-28 03:30:31 +00:00
kientzle
749f336c04 Fix some unused variables and dead assignments. 2009-12-28 03:28:21 +00:00
kientzle
2533f9e873 Remove an unused variable and an unreachable statement. 2009-12-28 03:25:33 +00:00
kientzle
8ae7c78a5f Fix line endings. 2009-12-28 03:24:56 +00:00