John Marino [Sat, 3 Nov 2012 15:32:51 +0000 (16:32 +0100)]
libutil: Implement hexdump(3)
Similar to hexdump(9) but available to userland.
Taken-from:
FreeBSD SVN 180161 (01 JUL 2008)
FreeBSD SVN 185729 (06 DEC 2008)
John Marino [Sat, 3 Nov 2012 15:19:12 +0000 (16:19 +0100)]
libutil: Implement group file utilities
Taken from FreeBSD's libutil
Sepherosa Ziehau [Sat, 3 Nov 2012 14:36:01 +0000 (22:36 +0800)]
bge: Switch from device_polling to ifpoll
Also fix a bug in the polling code when status tag is used:
status tag always needs to be written even if interrupt is not enabled.
Sepherosa Ziehau [Sat, 3 Nov 2012 14:26:12 +0000 (22:26 +0800)]
Revert "bge: Always configure MII mode register"
This reverts commit
dda43ff2bc5975a3cbd91838e7a46332039962f4.
Forcefully configure seems to break at least BCM5761 NIC auto-negotiation
Eitan Adler [Sat, 3 Nov 2012 04:00:25 +0000 (00:00 -0400)]
Bring in recent mktemp(1) changes from FreeBSD
Support the Sun/GNU/FreeBSD extension of mktemp
returning a file1 in /tmp when called without a path.
This also minimizes the difference between the DragonflyBSD
and FreeBSD version of the man page.
Sascha Wildner [Sat, 3 Nov 2012 11:23:14 +0000 (12:23 +0100)]
kernel: Simplify simq releasing in some RAID drivers.
Sascha Wildner [Sat, 3 Nov 2012 11:08:13 +0000 (12:08 +0100)]
kernel: Fix some wrong cam_simq_release() calls.
Our (refcounted) simq can be released right after allocating the sim.
These drivers were not doing it correctly.
Justin C. Sherrill [Sat, 3 Nov 2012 03:38:44 +0000 (23:38 -0400)]
Remove duplicate word.
Contributed-by: "eadler" <lists@eitanadler.com>
Matthew Dillon [Fri, 2 Nov 2012 21:07:10 +0000 (14:07 -0700)]
kernel - Force word-writes in syscons code (Intel hw character mode emulation)
* Observed on the Intel D2500HN. The system console in character map mode
fails utterly when a normal bcopy() is used to move stuff around. Employ
a specialized bcopy that uses 16-bit writes to work around the problem.
* Just do this generally, we don't care about syscons performance.
* This is possibly due to a hardware/text-mode emulation in the Intel D2500HN
and it will probably show up in the future as well. This could be related
to complaints about UEFI BIOSs (which the D2500HN mobo from Intel supports)
not handling text mode, but it handles it just fine if we only use 16-bit
writes.
Matthew Dillon [Fri, 2 Nov 2012 21:06:58 +0000 (14:06 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
John Marino [Fri, 2 Nov 2012 19:56:28 +0000 (20:56 +0100)]
libfetch: Implement HTTP digest authentication, HTTP 305, and HTTP 308
Implement HTTP status 305: Use proxy
Implement HTTP status 308: Permanent redirect
Implement HTTP Digest Authentication
Taken-from:
FreeBSD SVN 202613 (19 JAN 2010)
FreeBSD SVN 202623 (19 JAN 2010)
FreeBSD SVN 203028 (26 JAN 2010)
FreeBSD SVN 209632 (01 JUL 2010)
FreeBSD SVN 210563 (28 JUL 2010)
FreeBSD SVN 221820 (12 MAY 2011)
FreeBSD SVN 221821 (12 MAY 2011)
FreeBSD SVN 221822 (12 MAY 2011)
FreeBSD SVN 221823 (12 MAY 2011)
FreeBSD SVN 234838 (30 APR 2012)
FreeBSD SVN 240496 (14 SEP 2012)
FreeBSD SVN 241840 (21 OCT 2012)
FreeBSD SVN 241841 (21 OCT 2012)
John Marino [Fri, 2 Nov 2012 18:46:13 +0000 (19:46 +0100)]
libfetch: Use select(2) as a consequence of switching to non-blocking
Since the socket is non-blocking, it is necessary to use select(2) even
when there is no timeout, because read(2) will return immediately if there
is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on
slow connections.
Taken-from: FreeBSD SVN 234837 (30 APR 2012)
John Marino [Fri, 2 Nov 2012 17:59:00 +0000 (18:59 +0100)]
libfetch: Change FTP default to passive mode
1. The caller can select active mode using "P" flag.
2. If the "p" passive flag is also present, it takes precedence over "P"
so the connection will be attempted in passive mode.
Taken-from: FreeBSD SVN 225810 (27 SEP 2011)
Taken-from: FreeBSD SVN 225812 (27 SEP 2011)
John Marino [Fri, 2 Nov 2012 17:37:42 +0000 (18:37 +0100)]
libfetch: what happened to ftp-cached commit?
I thought I committed this fix last night. I don't know how it
disappeared. It's the fix documented in FreeBSD PR Kern/153748
where a ftp-cached connection will close the connection too early
when sending a request.
Matthew Dillon [Fri, 2 Nov 2012 00:46:03 +0000 (17:46 -0700)]
usb4bsd - Change M_NOWAIT to M_WAITOK
* M_NOWAIT really needs to be M_WAITOK in these places. It is unclear
why FreeBSD invites random device failures by using M_NOWAIT all over
the place.
John Marino [Fri, 2 Nov 2012 00:26:34 +0000 (01:26 +0100)]
libfetch: Avoid SIGPIPE on network connections
To avoid unexpected process termination from SIGPIPE when writing to a
closed network connection, enable SO_NOSIGPIPE on all network connections.
The POSIX standard MSG_NOSIGNAL is not used since it requires modifying all
send calls to add this flag. This is particularly nasty for SSL connections.
Taken-from: FreeBSD SVN 236193 (28 May 2012)
John Marino [Thu, 1 Nov 2012 22:54:16 +0000 (23:54 +0100)]
Implement SO_NOSIGPIPE
The SO_NOSIGPIPE socket option allows a user process to mark a socket so
that the socket does not generate SIGPIPE, only EPIPE, when a write is
attempted after socket shutdown.
Regression test added: tools/regression/sockets/sigpipe
John Marino [Thu, 1 Nov 2012 21:21:52 +0000 (22:21 +0100)]
fetch: Fix infinite loop on display progress
As reported by FreeBSD PR bin/153240, fetch can loop forever if it is
interrupted by a signal at just the right time.
Verbatim from FreeBSD SVN 230307 (18 JAN 2012):
Fix two issues related to the use of SIGINFO in fetch(1) to display
progress information. The first is that fetch_read() (used in the HTTP
code but not the FTP code) can enter an infinite loop if it has previously
been interrupted by a signal. The second is that when it is interrupted,
fetch_read() will discard any data it may have read up to that point.
Luckily, both bugs are extremely timing-sensitive and therefore difficult
to trigger.
John Marino [Thu, 1 Nov 2012 20:51:30 +0000 (21:51 +0100)]
libfetch: Change maximum redirect from 5 to 20
Libfetch gives up a little too soon. Chrome and Firefox allow 20
redirects with IE stops after 8.
Taken-from: FreeBSD SVN 241839 (21 OCT 2012)
John Marino [Thu, 1 Nov 2012 20:43:06 +0000 (21:43 +0100)]
libfetch: Support percent-encoded user and password
RFC 1738 specifies that any ":", "@", or "/" within a user name or
password in a URL is percent-encoded, to avoid ambiguity with the use
of those characters as URL component separators.
Taken-From: FreeBSD SVN 234138 (12 APR 2012)
John Marino [Thu, 1 Nov 2012 20:17:48 +0000 (21:17 +0100)]
libfetch: Fix failure to return to caller on error
As described in FreeBSD PR kern/171187, several error conditions were
missing return statements.
Taken-from: FreeBSD SVN 240595
John Marino [Thu, 1 Nov 2012 19:54:53 +0000 (20:54 +0100)]
libfetch: Mark all socket and file descriptors close-on-exec
This allows libfetch to close cached sockets.
Also add cast that helped FreeBSD move warns to 6
Taken-from: FreeBSD SVN 221822 (12 May 2011)
Taken-from: FreeBSD SVN 221830 (13 May 2011)
John Marino [Thu, 1 Nov 2012 19:31:08 +0000 (20:31 +0100)]
libfetch: Fix hang due to SSL server closing before read completes
If the server sends a close notification before before a SSL read
operation is complete, fetch will hang. Fix this by reworking
fetch_read() to use non-blocking sockets.
Taken-From: FreeBSD SVN 210568 (28 JUL 2010)
Taken-From: FreeBSD SVN 214256 (23 OCT 2010)
John Marino [Thu, 1 Nov 2012 19:02:52 +0000 (20:02 +0100)]
libfetch: Fix PROXY_HOST bug, socket leak, cache-crash
As described in FreeBSD PR kern/139751, NO_PROXY=localhost doesn't work
due to bad for loop count.
As described in FreeBSD PR kern/153748, an ftp-cached connection will
close the connection too early when trying to send a request.
There is a socket leak in ftp_request that occurs after a connection is
established. Make sure socket is disconnected before exiting.
Taken-From: FreeBSD SVN 198339 (21 OCT 2009)
Taken-From: FreeBSD SVN 199801 (25 NOV 2009)
Taken-From: FreeBSD SVN 217505 (17 JAN 2011)
Sepherosa Ziehau [Thu, 1 Nov 2012 01:29:53 +0000 (09:29 +0800)]
ioapic/i386: Allow GSI > 191
François Tigeot [Tue, 30 Oct 2012 08:01:26 +0000 (09:01 +0100)]
Unignore some files already present in repository
Matthew Dillon [Wed, 31 Oct 2012 02:35:36 +0000 (19:35 -0700)]
build - Fix handling of MACHINE_PLATFORM
* Generate MACHINE_PLATFORM from sysctl -n hw.platform, bmake does not
generate a default for this (it's DragonFly-specific).
* Fixes manual module builds e.g. building from the source dir instead of
as part of a kernel build.
John Marino [Tue, 30 Oct 2012 19:42:07 +0000 (20:42 +0100)]
Implement eaccess
It's just like access, but uses AT_EACCESS to check effective user ID
instead of the real user ID.
John Marino [Tue, 30 Oct 2012 18:14:57 +0000 (19:14 +0100)]
bug #2442: Fix bmake regression of kernel build
Kernel modules such as acpi.ko didn't load due to missing symbols after
bmake replaced legacy make. The cause was traced back to a badly
generated header which in turn was caused by the file kern.fwd.mk. That
file contained ":U" modifiers that should have been converted to ":tu"
modifiers.
The actual cause of the missing symbols were due to atomic.h not getting
included into atomic.c twice. Case sensitivity prevented a macro from
being properly unset. The modifiers in question turn everything to
upper case.
A full kernel build is required to fix the module loading.
Sepherosa Ziehau [Tue, 30 Oct 2012 02:53:59 +0000 (10:53 +0800)]
ioapic/x86_64: Allow GSI > 191
Some BIOSes seem to assume that all 256 IDT vectors could be used,
while we limit the available IDT vectors percpu to 192. Find an
unused IRQ for these GSIs, if this ever happens.
Reported-by: thowe on EFnet #dragonflybsd
John Marino [Mon, 29 Oct 2012 19:59:07 +0000 (20:59 +0100)]
Fix cross-build
The introduction of BTOOLMAKE and BTOOLCONFIG did not work when
cross-building. The value of BTOOLSDEST and CTOOLSDEST change when
starting stage 2 of the crossworld. This was never detected before
because these variables were only used in stage 1.
However, the absolute path to these tools aren't needed. The PATH
is defined in the environment to ensure the bootstrap tools are
used when appropriate. Previous errors leading me to think the host
tool was being used may have been caused by other things.
At the same time, all the "${MAKE}" variables were replaced with "make".
The make program defines "MAKE" as whatever was used to invoke it,
including paths. Since we are controlling the path, we don't want any
surprises. In any cases, we want "${MAKE}" to equal "make", so just
hardcode it that way.
Tested on cross-build, bmake-equipped system, and legacy make equipped
system.
Peter Avalos [Sun, 28 Oct 2012 19:42:44 +0000 (12:42 -0700)]
Update files for OpenSSH-6.1p1 import.
Peter Avalos [Sun, 28 Oct 2012 18:41:45 +0000 (11:41 -0700)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Sun, 28 Oct 2012 17:58:12 +0000 (10:58 -0700)]
Import OpenSSH-6.1p1.
Features:
* ssh-keygen(1): Add optional checkpoints for moduli screening
* ssh-add(1): new -k option to load plain keys (skipping certificates)
* sshd(8): Add wildcard support to PermitOpen, allowing things like
"PermitOpen localhost:*". bz #1857
* ssh(1): support for cancelling local and remote port forwards via the
multiplex socket. Use ssh -O cancel -L xx:xx:xx -R yy:yy:yy user@host"
to request the cancellation of the specified forwardings
* support cancellation of local/dynamic forwardings from ~C commandline
* sshd(8): This release turns on pre-auth sandboxing sshd by default for
new installs, by setting UsePrivilegeSeparation=sandbox in sshd_config.
* ssh-keygen(1): Add options to specify starting line number and number of
lines to process when screening moduli candidates, allowing processing
of different parts of a candidate moduli file in parallel
* sshd(8): The Match directive now supports matching on the local (listen)
address and port upon which the incoming connection was received via
LocalAddress and LocalPort clauses.
* sshd(8): Extend sshd_config Match directive to allow setting AcceptEnv
and {Allow,Deny}{Users,Groups}
* Add support for RFC6594 SSHFP DNS records for ECDSA key types. bz#1978
* ssh-keygen(1): Allow conversion of RSA1 keys to public PEM and PKCS8
* sshd(8): Allow the sshd_config PermitOpen directive to accept "none" as
an argument to refuse all port-forwarding requests.
* sshd(8): Support "none" as an argument for AuthorizedPrincipalsFile
* ssh-keyscan(1): Look for ECDSA keys by default. bz#1971
* sshd(8): Add "VersionAddendum" to sshd_config to allow server operators
to append some arbitrary text to the server SSH protocol banner.
Bugfixes:
* ssh(1): ensure that $DISPLAY contains only valid characters before
using it to extract xauth data so that it can't be used to play local
shell metacharacter games.
* ssh(1): unbreak remote portforwarding with dynamic allocated listen ports
* scp(1): uppress adding '--' to remote commandlines when the first
argument does not start with '-'. saves breakage on some
difficult-to-upgrade embedded/router platforms
* ssh(1)/sshd(8): fix typo in IPQoS parsing: there is no "AF14" class,
but there is an "AF21" class
* ssh(1)/sshd(8): do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during
rekeying
* ssh(1): skip attempting to create ~/.ssh when -F is passed
* sshd(8): unbreak stdio forwarding when ControlPersist is in use; bz#1943
* sshd(1): send tty break to pty master instead of (probably already
closed) slave side; bz#1859
* sftp(1): silence error spam for "ls */foo" in directory with files;
bz#1683
* Fixed a number of memory and file descriptor leaks
* ssh(1)/sshd(8): Don't spin in accept() in situations of file
descriptor exhaustion. Instead back off for a while.
* ssh(1)/sshd(8): Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs as
they were removed from the specification. bz#2023,
* sshd(8): Handle long comments in config files better. bz#2025
* ssh(1): Delay setting tty_flag so RequestTTY options are correctly
picked up. bz#1995
* sshd(8): Fix handling of /etc/nologin incorrectly being applied to root
on platforms that use login_cap.
John Marino [Sun, 28 Oct 2012 13:27:26 +0000 (14:27 +0100)]
usr.bin/make: Remove legacy make files
usr.bin/make has been replaced with usr.bin/bmake, retaining the program
name "make". usr.bin/make was previously disconnected from the build,
so these files were not longer used.
John Marino [Sun, 28 Oct 2012 12:38:32 +0000 (13:38 +0100)]
Replace legacy make with bmake
The proper way to detect which make is building the makefile is to check
for .PARSEDIR. If present, bmake is processing the makefile. For the
time being, both make will be supported for bootstrapping purposes, but
in time the check can be removed, say for the DragonFly 3.6 release.
The abundance of .ORDER commands in bsd.dep.mk caused a breakage when
building world in parallel with bmake. Likely some order constraints
were impossible to achieve, and bmake just stopped while legacy did the
best it could. In any case, the majority of the .ORDER commands were
replaced by a single .ORDER command which solved the problem.
The legacy make is disconnected in this commit set, but the source files
will be removed soon.
John Marino [Sun, 28 Oct 2012 12:32:36 +0000 (13:32 +0100)]
Random makefile cleanup prior to bmake import
Bmake does not like to encounter "exit 0" or "exit 1". It fails using the
exec command. Replace instances of "exit 1" with /usr/bin/false. There
was one instance of "exit 0" but it was at the end the target and thus
unnecessary.
The groff/tmac makefile was improved by providing a cd command for
every installed file.
Finally, one of the test makefiles was missing a single quote in one of
the targets.
Sepherosa Ziehau [Sun, 28 Oct 2012 13:11:43 +0000 (21:11 +0800)]
ifpoll: Factor out code for devices which does not support multiple queues
Mainly avoid code duplication.
While I'm here, fix a typo in em(4) which always enable interrupt during
interface initialization.
Sepherosa Ziehau [Sun, 28 Oct 2012 10:27:40 +0000 (18:27 +0800)]
em: Clear status polling count during interrupt disable handling
Sepherosa Ziehau [Sun, 28 Oct 2012 10:22:43 +0000 (18:22 +0800)]
em: Switch from device_polling to ifpoll
Sascha Wildner [Sun, 28 Oct 2012 01:13:07 +0000 (02:13 +0100)]
kernel/linprocfs: Add dependency on the linux module.
John Marino [Sat, 27 Oct 2012 22:55:14 +0000 (00:55 +0200)]
Restore build parallelism
The build parallelism was accidently disabled with recent commits.
First, relocate libobjc headers for gcc44 to /usr/libdata/gcc44/objc
and then remove all the strict ordering to maximize build parallelism.
Exception: the gcc47 library set requires libsupc++ to be built after
libstdc++ because they share object files built by libstdc++.
Sascha Wildner [Sat, 27 Oct 2012 11:38:56 +0000 (13:38 +0200)]
ndiscvt(8): Check an fread()
Found-by: gcc47
Sascha Wildner [Sat, 27 Oct 2012 11:30:57 +0000 (13:30 +0200)]
sort(1): Remove an unused variable.
Found-by: gcc47
Sascha Wildner [Sat, 27 Oct 2012 11:23:50 +0000 (13:23 +0200)]
installer: Remove some unused variables.
Found-by: gcc47
Sascha Wildner [Sat, 27 Oct 2012 11:17:49 +0000 (13:17 +0200)]
btconfig(8): Move some unused code into the #if 0.
John Marino [Sat, 27 Oct 2012 16:06:03 +0000 (18:06 +0200)]
bmake: rethink default mk search path again
Talking with swildner, we don't want the magic token to come before
/usr/share/mk because that would case the host make (after bootstrapping) to
seek files /usr/src/share/mk rather than the world mk files.
Also, it appears that the magic token won't even help with pkgsrc support
the mk files are in another branch (e.g. /usr/pkg/share/mk when the token
would look in /usr/pkgsrc/share/mk). We really don't have a use for
.../share/mk, but putting it after /usr/share/mk won't hurt anything.
Leave .../share/mk in place just in case it becomes a useful capability later.
John Marino [Sat, 27 Oct 2012 15:42:36 +0000 (17:42 +0200)]
gcc4X: rework some makefiles
These are various tweaks to improve compatibility between legacy make and
bmake. The biggest change was moving gnu/usr.bin dependencies outside to
Makefile.inc1 as part of _startup_lib* rather than fudge it with .PHONY
targets. This kludge was causing some issues, as well as the double .USE
trick.
John Marino [Sat, 27 Oct 2012 12:44:36 +0000 (14:44 +0200)]
bsd.dep.mk: Remove AINC knob
The AINC knob was removed from FreeBSD before DragonFly 1.0 was released.
It's not needed, so remove it to simplify bsd.dep.mk dependency makefile.
While here, convert SRCS and CLEANFILES to the new += method of augmenting
variables.
John Marino [Sat, 27 Oct 2012 14:00:56 +0000 (16:00 +0200)]
gcc41 removal: Part 3 of 2: library makefiles
I forgot there were GCC 4.1 files in the gnu/lib/gcc41 directory. These
should have been removed last night with the other makefiles.
Sascha Wildner [Fri, 26 Oct 2012 19:02:50 +0000 (21:02 +0200)]
natd(8): Add exit_delay (daemon exit delay after signal), from FreeBSD.
John Marino [Sat, 27 Oct 2012 09:13:14 +0000 (11:13 +0200)]
Tweak some makefiles to prepare for bmake
These makefiles build fine with legacy make but contain (or lack)
information that causes the build to fail when used with bmake. Make
small tweaks to makefiles to ensure they are compatible with both make
programs.
John Marino [Sat, 27 Oct 2012 09:01:53 +0000 (11:01 +0200)]
bmake: Update mk directory search path
Rather than hardcoding /usr/share/mk as the only source for bsd.*.mk files,
use the .../ magic token to cause bmake to search above it for a share/mk
in its tree as suggest by Simon Gerraty.
Also set up the bootstrap tool version of bmake to exclusively use
the src version of share/mk.
Sascha Wildner [Sat, 27 Oct 2012 09:15:46 +0000 (11:15 +0200)]
Sync zoneinfo database with tzdata2012h from ftp://ftp.iana.org/tz/releases
* asia:
Israel has new DST rules next year (thanks to Ephraim Silverberg).
Jordan stays on DST this winter (thanks to Steffen Thorsen).
* southamerica:
Bahia no longer has DST (thanks to Kelley Cook).
Tocantins has DST (thanks to Rodrigo Severo).
François Tigeot [Fri, 26 Oct 2012 20:57:47 +0000 (22:57 +0200)]
Change pkgsrc make targets to use pkgsrc -head
Sascha Wildner [Fri, 26 Oct 2012 22:50:00 +0000 (00:50 +0200)]
mdoc: Fix .Os version.
Sascha Wildner [Fri, 26 Oct 2012 22:21:13 +0000 (00:21 +0200)]
mdoc: Add DragonFly 3.3.
John Marino [Fri, 26 Oct 2012 19:50:35 +0000 (21:50 +0200)]
gcc41 removal: Part 2 of 2: contrib files
Complete the removal of GCC 4.1 by removing the contrib directory.
John Marino [Fri, 26 Oct 2012 19:49:50 +0000 (21:49 +0200)]
gcc41 removal: Part 1 of 2: makefiles
GCC 4.1 had been disconnected from the base build after GCC 4.7 was
brought in. The transition as gone relatively smoothly, so it's safe
to remove the rest of GCC 4.1 now, starting with the makefiles.
John Marino [Fri, 26 Oct 2012 14:35:25 +0000 (16:35 +0200)]
libssp47, libobjc47: install headers
Headers for both libssp and libobjc were not getting installed for the
gcc47 library set. As an aside, the gcc44 libobjc is also missing these
headers. There installation required an mtree change, but it can be
built with quickworld.
Additionally, CFLAGS were moved to above an include for libobjc which
should ensure the local config.h is included before a different version
and this in turn likely improves libobjc functionality.
John Marino [Fri, 26 Oct 2012 13:52:09 +0000 (15:52 +0200)]
libgomp47: Install libgomp.spec and omp.h
It was reported these files are needed by libgomp, so generate and
install them.
Matthew Dillon [Fri, 26 Oct 2012 15:38:37 +0000 (08:38 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 26 Oct 2012 15:37:37 +0000 (08:37 -0700)]
build - Use _KERNEL_STRUCTURES for struct disk
* Use _KERNEL and _KERNEL_STRUCTURES around struct disk as well
for correctness.
Sascha Wildner [Fri, 26 Oct 2012 15:33:49 +0000 (17:33 +0200)]
ps.1: Adjust info regarding SMP systems.
Matthew Dillon [Fri, 26 Oct 2012 15:08:02 +0000 (08:08 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Sascha Wildner [Fri, 26 Oct 2012 09:20:21 +0000 (11:20 +0200)]
<sys/dmsg.h>: Fix buildworld, ccdconfig(8) needs this (via <sys/disk.h>).
Reported-by: Siju George <sgeorge.ml2@gmail.com>
Matthew Dillon [Fri, 26 Oct 2012 04:50:50 +0000 (21:50 -0700)]
hammer2 - dmsg blockdev work (cleanup)
* Cleanup
Sascha Wildner [Fri, 26 Oct 2012 04:50:26 +0000 (06:50 +0200)]
mptable.1: Small SMP related adjustment.
Sascha Wildner [Fri, 26 Oct 2012 04:31:43 +0000 (06:31 +0200)]
vkernel.7: Remove SMP related info.
Matthew Dillon [Fri, 26 Oct 2012 02:57:12 +0000 (19:57 -0700)]
hammer2 - dmsg blockdev work
* Adjust the LNK_CONN and LNK_SPAN messages to provide a cluster label
and a filesystem label instead of just a filesystem label.
* Change the cluster controller to index clusters based on the
peer_type, pfs_clid, and cl_label instead of just the pfs_clid.
HAMMER2 PFS's are primarily identified by pfs_clid and unique nodes
are identified by pfs_fsid. fs_label holds the HAMMER2 super-root
name.
BLOCK devices are primarily identified by cl_label and unique nodes
are identified by pfs_fsid. pfs_clid and fs_label are empty.
* Adjust the cluster controller's matching filters such that, e.g.
BLOCK device clients only have visibility to the BLOCK device server
for the cl_label in question, and do not have visibility to other
BLOCK device clients.
* Flesh out the hammer2 service daemons disk monitoring, have it attach
a pipe to the in-kernel disk via an ioctl().
* Continued work on the skeleton network disk exporter (kern/subr_disk*) and
network disk importer (dev/disk/xdisk/*). xdisk has not been added to the
build yet.
* Move a few more definitions from HAMMER2 to DMSG.
Sascha Wildner [Fri, 26 Oct 2012 01:48:46 +0000 (03:48 +0200)]
vkernel.7: Add back some info I accidentally removed.
Sascha Wildner [Fri, 26 Oct 2012 01:46:47 +0000 (03:46 +0200)]
Adjust some manual pages for the recent SMP changes.
Matthew Dillon [Thu, 25 Oct 2012 23:00:47 +0000 (16:00 -0700)]
hammer2 - Add server-side disk advertisements
* The hammer2 service demon now tracks disks and connects the cluster
controller to each one.
* Add a new ioctl to the subr_disk subsystem and add subr_diskiocom.c
to implement it, associating a cluster controller messaging descriptor
with a disk device.
* disk device initiates LNK_CONN and LNK_SPAN. Disk block devices now
advertised through the spanning tree. Nothing else implemented yet.
Matthew Dillon [Thu, 25 Oct 2012 20:44:55 +0000 (13:44 -0700)]
kernel - cleanup subr_disk.c
* Formatting cleanup pass.
Matthew Dillon [Thu, 25 Oct 2012 18:31:27 +0000 (11:31 -0700)]
hammer2 - Messaging layer separation work part 5
* Fix debug shell callback issue
Matthew Dillon [Thu, 25 Oct 2012 18:09:16 +0000 (11:09 -0700)]
hammer2 - Messaging layer separation work part 4
* Cleanup, bug fixes, operations tests successful now.
Matthew Dillon [Thu, 25 Oct 2012 17:46:36 +0000 (10:46 -0700)]
hammer2 - Messaging layer separation work part 3
* Move more hammer2 vfs message code into kern_dmsg.c, renaming and
implementing callbacks as needed.
* Move hammer2_icrc.c (the iscsi crc support) to libkern/icrc32.c
Matthew Dillon [Thu, 25 Oct 2012 06:26:40 +0000 (23:26 -0700)]
hammer2 - Messaging layer separation work part 2
* Move most of the low-level message handling from the hammer2 utility
to a new library called libdmsg.
* Move additional message headers from the hammer2 vfs code to libdmsg,
cleanup.
* Rename and reorganize a ton of stuff.
Matthew Dillon [Thu, 25 Oct 2012 04:27:50 +0000 (21:27 -0700)]
hammer2 - Messaging layer separation work part 1
This work is to separate the network messaging format and various
lower layers out from hammer2 and into their own 'dmsg*' files.
* Factor low level messaging structures into sys/dmsg.h
* Rename HAMMER2 -> DMSG.
Matthew Dillon [Thu, 25 Oct 2012 03:04:45 +0000 (20:04 -0700)]
kernel - header file includes adjustment
* sys/udev.h ensures that libprop/proplib.h is included.
Matthew Dillon [Thu, 25 Oct 2012 02:53:08 +0000 (19:53 -0700)]
kernel - Implement UDEVWAIT ioctl for /dev/udev
* Implement an ioctl which interacts with a sequence number and waits for
a new event, so callers can avoid polling for events.
Matthew Dillon [Thu, 25 Oct 2012 02:12:50 +0000 (19:12 -0700)]
kernel - Auto-initiate message stream for udev on read()
* Ensure the device is initiated when read() is issued for /dev/udev,
otherwise no events will be queued.
This allows a simple cat /dev/udev to return the XML stream without
having to issue any ioctls.
* Reorder the devfs scan and initiation to close a race where an event could
be lost.
Matthew Dillon [Thu, 25 Oct 2012 01:31:53 +0000 (18:31 -0700)]
kernel - Allow multiple opens on /dev/udev
* Implement as an auto-clone device
* Refactor most of the code to use a new queueing mechanic. There is a single
queue and multiple markers pointing into the queue (one for each initiated
open'd device).
* Events broadcast to all initiated readers. We use a single-queue /
multiple-marker model. The event structure is only deleted once all markers
have iterated past it.
Matthew Dillon [Thu, 25 Oct 2012 00:05:29 +0000 (17:05 -0700)]
devattr - Add monitoring mode (-M).
* Add a new option, -M, which will monitor for events after doing the
initial iteration.
Matthew Dillon [Wed, 24 Oct 2012 22:59:03 +0000 (15:59 -0700)]
test - Adjust vnodeinfo
* Adjust vnodeinfo to provide more information about the
buffer cache.
Matthew Dillon [Wed, 24 Oct 2012 22:48:05 +0000 (15:48 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Wed, 24 Oct 2012 17:13:59 +0000 (19:13 +0200)]
UPDATING: Mention SMP is a no-op for now.
Sascha Wildner [Wed, 24 Oct 2012 17:05:48 +0000 (19:05 +0200)]
kernel: Add back 'options SMP' as a no-op.
This is to prevent people working with both 3.2 and master from needing
different kernel configs.
Pointed-out-by: dillon
Matthew Dillon [Wed, 24 Oct 2012 16:54:30 +0000 (09:54 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Wed, 24 Oct 2012 16:11:13 +0000 (18:11 +0200)]
ixgbe/netrate: Remove -DSMP from the Makefiles (no longer needed).
Sascha Wildner [Wed, 24 Oct 2012 16:04:05 +0000 (18:04 +0200)]
kernel: Make SMP support default (and non-optional).
The 'SMP' kernel option gets removed with this commit, so it has to
be removed from everybody's configs.
Reviewed-by: sjg
Approved-by: many
Sascha Wildner [Wed, 24 Oct 2012 14:19:31 +0000 (16:19 +0200)]
idr.9: Clean up a bit.
Matthew Dillon [Wed, 24 Oct 2012 03:29:25 +0000 (20:29 -0700)]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Vishesh Yadav [Thu, 23 Aug 2012 19:28:27 +0000 (00:58 +0530)]
idr: Integer ID management library
Derived from fd code. Almost compatible with Linux. Differences
mentioned in man page.
Sascha Wildner [Tue, 23 Oct 2012 09:10:28 +0000 (11:10 +0200)]
bsd-family-tree: Sync with FreeBSD (adds NetBSD 6.0).
Sascha Wildner [Tue, 23 Oct 2012 09:04:57 +0000 (11:04 +0200)]
LINT64: Remove comment. fe(4) is i386 specific.
Sascha Wildner [Mon, 22 Oct 2012 18:06:05 +0000 (20:06 +0200)]
Remove CAPS.
OK'd-by: dillon
Sascha Wildner [Mon, 22 Oct 2012 16:30:12 +0000 (18:30 +0200)]
condvar.9: Remove trailing whitespace.
Sascha Wildner [Mon, 22 Oct 2012 09:07:13 +0000 (11:07 +0200)]
kernel/kinfo: Don't use 'SMP' alone to check for userland compilation.
The code is used by both kernel and userland.
This is in preparation for removing UP code.
Thomas Nikolajsen [Sun, 21 Oct 2012 21:44:32 +0000 (23:44 +0200)]
usched_set.2: Add BUGS section and improve formatting