dragonfly.git
5 years agodisklabel* - Make disk and filesystem types case insensitive.
Matthew Dillon [Tue, 11 Aug 2009 17:06:01 +0000 (10:06 -0700)]
disklabel* - Make disk and filesystem types case insensitive.

* e.g. allow 'hammer' or 'HAMMER' to be specified when configuring a
  filesystem type for a partition.  When displayed the proper case will be
  used.

  This reduces confusion for people trying to partition a disk manually.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 11 Aug 2009 02:13:58 +0000 (19:13 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agonrelease - adjust usb disk-key image generator
Matthew Dillon [Tue, 11 Aug 2009 02:11:35 +0000 (19:11 -0700)]
nrelease - adjust usb disk-key image generator

* Add an explicit vfs.root.mountfrom line in loader.conf to point
  the boot loader at da8.

* Makefile cleanup.  Remove the one-huge-sh line and properly dismount and
  unconfigure any left over VN from previous attempts.

5 years agocrget(): use M_ZERO instead of bzero()
Nicolas Thery [Mon, 10 Aug 2009 21:29:52 +0000 (23:29 +0200)]
crget(): use M_ZERO instead of bzero()

5 years agogcc44: fix buildworld on amd64
Thomas E. Spanjaard [Mon, 10 Aug 2009 20:20:51 +0000 (20:20 +0000)]
gcc44: fix buildworld on amd64

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 10 Aug 2009 16:32:13 +0000 (09:32 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoUSB - Clean up address setting and softc allocations
Matthew Dillon [Mon, 10 Aug 2009 16:30:27 +0000 (09:30 -0700)]
USB - Clean up address setting and softc allocations

* Zero out the softc structure being allocated for ehci and ohci.

* When establishing a new connection and allocating an address for
  further communications, disconnect and reconnect the default pipe
  instead of just ripping up the underlying address.

Research-done-by: Rumko <rumcic@gmail.com>
Partially-taken-from: FreeBSD

5 years agoEHCI - Fix early probing problems.
Matthew Dillon [Mon, 10 Aug 2009 16:27:42 +0000 (09:27 -0700)]
EHCI - Fix early probing problems.

* When polling is used an actual interrupt will clear pending status to
  prevent an interrupt livelock.  However, if this occurs the polling code
  can wind up believing that no status change has occured.

  Add the cleared pending status to sc->sc_dintrs and then reincorporate
  into the status check when polling or running a normal interrupt.

* Code cleanup: NULL out some fields on termination.

5 years agoshlock(1): Remove a wrong free() of a stack variable.
Sascha Wildner [Mon, 10 Aug 2009 14:17:48 +0000 (16:17 +0200)]
shlock(1): Remove a wrong free() of a stack variable.

5 years agoahci.4: Oops forgot one .Nm
Sascha Wildner [Mon, 10 Aug 2009 14:15:02 +0000 (16:15 +0200)]
ahci.4: Oops forgot one .Nm

5 years agodevelopment.7: Improve markup a bit, bump .Dd.
Sascha Wildner [Mon, 10 Aug 2009 14:08:26 +0000 (16:08 +0200)]
development.7: Improve markup a bit, bump .Dd.

5 years agoahci.4: Improve markup, begin sentences on a new line, bump .Dd.
Sascha Wildner [Mon, 10 Aug 2009 14:07:38 +0000 (16:07 +0200)]
ahci.4: Improve markup, begin sentences on a new line, bump .Dd.

5 years agochmod.2/mountctl.2: Remove trailing whitespace.
Sascha Wildner [Mon, 10 Aug 2009 14:05:14 +0000 (16:05 +0200)]
chmod.2/mountctl.2: Remove trailing whitespace.

5 years agohexdump: always stat input when skipping
Sascha Wildner [Mon, 10 Aug 2009 08:30:20 +0000 (10:30 +0200)]
hexdump: always stat input when skipping

The previous code would not fstat(2) the input, if operating on stdin.
Still, it would use the uninitialized struct stat to decide whether to
seek in the input or not.  This could either lead to hexdump reading the
skipped input, instead of directly seeking, or, worse, trying a seek
even though this not being possible.

Fix this issue by always fstat()ing the input.

Submitted-by: corecode
5 years agoee(1): Fix some wrong usage of NULL.
Sascha Wildner [Mon, 10 Aug 2009 08:23:04 +0000 (10:23 +0200)]
ee(1): Fix some wrong usage of NULL.

5 years agoNFS - Cleanly unmount NFS on halt/shutdown/reboot
Matthew Dillon [Mon, 10 Aug 2009 06:17:32 +0000 (23:17 -0700)]
NFS - Cleanly unmount NFS on halt/shutdown/reboot

* Abort any in-transit RPCs, disallow new RPCs, and disconnect the
  socket (aka if TCP) when doing a forced NFS unmount.

  This fixes left over TCP sockets when doing a normal halt/shutdown/reboot.

* Related user processes will also unblock, but the unmount code will
  still block trying to look up the path and this commit does not quite
  solve that problem.

5 years agoDEVFS - Make synchronization prior to mountroot more robust
Matthew Dillon [Mon, 10 Aug 2009 03:25:57 +0000 (20:25 -0700)]
DEVFS - Make synchronization prior to mountroot more robust

* A single disk_config() + devfs_config() isn't enough, call them twice.
  (tested with TWA driver which seems to trigger the problem).

  Not exactly sure why one pass doesn't do the job but I think
  pending devfs commands might trigger additional disk probe
  operations.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 10 Aug 2009 00:21:18 +0000 (17:21 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoDEVTAB - Add support in umount, fsck, and hammer, and add sample /etc/devtab.
Matthew Dillon [Mon, 10 Aug 2009 00:20:34 +0000 (17:20 -0700)]
DEVTAB - Add support in umount, fsck, and hammer, and add sample /etc/devtab.

5 years agomknod(2) man: fix incorrect include
Nicolas Thery [Sun, 9 Aug 2009 21:01:42 +0000 (23:01 +0200)]
mknod(2) man: fix incorrect include

5 years agoAMD64 - Fix prototypes for atomic_cmpset_long()
Matthew Dillon [Sun, 9 Aug 2009 18:22:30 +0000 (11:22 -0700)]
AMD64 - Fix prototypes for atomic_cmpset_long()

Reported-by: smtms
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 9 Aug 2009 18:15:35 +0000 (11:15 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoAMD64 - Fix atomic_cmpset_long()
Matthew Dillon [Sun, 9 Aug 2009 18:15:14 +0000 (11:15 -0700)]
AMD64 - Fix atomic_cmpset_long()

5 years agoAMD64 - Fix 64 bit buildworld, missing compiler options in sys/boot
Matthew Dillon [Sun, 9 Aug 2009 18:14:33 +0000 (11:14 -0700)]
AMD64 - Fix 64 bit buildworld, missing compiler options in sys/boot

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 9 Aug 2009 17:23:57 +0000 (10:23 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoimprove a bit chmod(2) man page
Nicolas Thery [Sun, 9 Aug 2009 17:30:51 +0000 (19:30 +0200)]
improve a bit chmod(2) man page

5 years agoadd fchownat(2) system call
Nicolas Thery [Sun, 9 Aug 2009 17:33:23 +0000 (19:33 +0200)]
add fchownat(2) system call

Add also libc_r wrapper and man page.

5 years agoGCC - Add NO_GCC44 feature and use it in test/amd64/Makefile
Matthew Dillon [Sun, 9 Aug 2009 17:21:22 +0000 (10:21 -0700)]
GCC - Add NO_GCC44 feature and use it in test/amd64/Makefile

* Feature added primarily so we can get amd64 buildworlds working again,
  until gcc-4.4 starts building with it.

5 years agogcc44: adjust README.DELETED
Thomas E. Spanjaard [Sun, 9 Aug 2009 11:13:48 +0000 (11:13 +0000)]
gcc44: adjust README.DELETED

5 years agogcc44/gmp: add amd64 Makefile for gmp
Thomas E. Spanjaard [Sun, 9 Aug 2009 11:09:44 +0000 (11:09 +0000)]
gcc44/gmp: add amd64 Makefile for gmp

5 years agoMerge branch 'vendor/GCC44'
Thomas E. Spanjaard [Sun, 9 Aug 2009 10:59:53 +0000 (10:59 +0000)]
Merge branch 'vendor/GCC44'

5 years agogcc44: import forgotten file
Thomas E. Spanjaard [Sun, 9 Aug 2009 10:58:57 +0000 (10:58 +0000)]
gcc44: import forgotten file

5 years agonrelease: do not mount devfs for build
Simon Schubert [Sat, 8 Aug 2009 23:30:50 +0000 (01:30 +0200)]
nrelease: do not mount devfs for build

We should not rely on devfs being present on the build host, since it
might be running an older kernel (e.g. release).  Instead of mounting
/dev into the chroot via devfs, use a null mount of the host /dev.

Suggested-by: dillon@
5 years agogcc44: adjust README.DELETED
Simon Schubert [Sat, 8 Aug 2009 22:49:20 +0000 (00:49 +0200)]
gcc44: adjust README.DELETED

5 years agoMerge branch 'vendor/GCC44'
Simon Schubert [Sun, 9 Aug 2009 08:32:29 +0000 (10:32 +0200)]
Merge branch 'vendor/GCC44'

Merge commit '94905568eb324c454ac84bbe36580efad3a0a0a7' into HEAD

5 years agohammer util: rename function to match behavior
Simon Schubert [Tue, 4 Aug 2009 14:27:00 +0000 (16:27 +0200)]
hammer util: rename function to match behavior

cleanup_snapshots actually creates a snapshot

5 years agohammer util: avoid running concurrent cleanups
Simon Schubert [Tue, 4 Aug 2009 14:23:57 +0000 (16:23 +0200)]
hammer util: avoid running concurrent cleanups

If hammer cleanup gets called more frequently than the cleanup runs
take, they build up, all trying to run in parallel.  Prevent this by
locking the config file while cleanup is running.  If cleanup finds the
config file locked for a PFS, it will skip processing.

5 years agopcm: perform stereo volume mixing for vchans
Simon Schubert [Thu, 23 Jul 2009 14:09:15 +0000 (16:09 +0200)]
pcm: perform stereo volume mixing for vchans

The vchan code before only performed an average volume mix for both
channels, thus not allowing to pan between left and right vchan channel.
Now we perform actual stereo volume mixing for left and right channel.

5 years agobioq - Add a sysctl kern.bioq_barrier to control bioqdisksort()'s sorting.
Matthew Dillon [Sun, 9 Aug 2009 02:35:19 +0000 (19:35 -0700)]
bioq - Add a sysctl kern.bioq_barrier to control bioqdisksort()'s sorting.

Control how well sorted we want bioqdisksort() to be.  The value specified
in kern.bioq_barrier is the number of bio's that will be sorted until a
barrier is inserted, starting a new set.  The default value is 16.

This allows testing filesystem throughput under varying conditions.

Suggested-by: Jeffrey Hsu <hsu@dragonflybsd.org>
5 years agotsleep - close a tsleep/wakeup race.
Matthew Dillon [Sun, 9 Aug 2009 02:34:07 +0000 (19:34 -0700)]
tsleep - close a tsleep/wakeup race.

* Interlock the tsleep prior to releasing the current thread to close a
  sleep/wakeup race.

5 years agoPIPE - Fix bugs in pipe_shutdown(), and multiple readers.
Matthew Dillon [Sun, 9 Aug 2009 02:30:39 +0000 (19:30 -0700)]
PIPE - Fix bugs in pipe_shutdown(), and multiple readers.

* Pipe_shutdown() was setting the wrong EOF bits.

* When multiple readers are present pipe_end_uio() was trying test
  whether an unsigned value was negative, resulting in an endless
  tsleep().  Make the fields in question to signed.

Reported-by: Numerous people.
5 years agogcc44: import forgotten file
Simon Schubert [Sat, 8 Aug 2009 22:47:05 +0000 (00:47 +0200)]
gcc44: import forgotten file

5 years agoDEVFS - Cleanup. Remove svn_read() / svn_write() and specvnode_fileops.
Matthew Dillon [Sat, 8 Aug 2009 22:42:16 +0000 (15:42 -0700)]
DEVFS - Cleanup.  Remove svn_read() / svn_write() and specvnode_fileops.

5 years agofifos - fix broken mkfifo style fifos.
Matthew Dillon [Sat, 8 Aug 2009 22:40:57 +0000 (15:40 -0700)]
fifos - fix broken mkfifo style fifos.

* open()s of mkfifo style fifos with O_TRUNC were being disallow.
  Allow the flag (it is harmless and does nothing).

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 8 Aug 2009 22:09:51 +0000 (15:09 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agobioqdisksort - fixes to avoid starvation
Matthew Dillon [Sat, 8 Aug 2009 22:07:40 +0000 (15:07 -0700)]
bioqdisksort - fixes to avoid starvation

Long chains of pipelined write I/O were being sorted in front of other
requests.  Due to the pipelining these other requests would wind up
getting starved virtually permanently.

Prevent starvation by forcing one out of every 16 BIOs to be ordered.

This fixes issues with HAMMER which tends to have more of an absolute
ordering of meta data verses data then UFS.

5 years agoprintenv(1): Rework how env vars are looked up.
Stathis Kamperis [Fri, 24 Jul 2009 10:13:23 +0000 (13:13 +0300)]
printenv(1): Rework how env vars are looked up.

Before:
~% env foo=bar=lala printenv foo
bar=lala
~% env foo=bar=lala printenv foo=bar
lala
~%

After:
~% env foo=bar=lala printenv foo
bar=lala
~% env foo=bar=lala printenv foo=bar
~%

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1341>

5 years agoDEVFS - More GPT fixes. Fix serial number aliases for slice 0.
Matthew Dillon [Sat, 8 Aug 2009 17:31:18 +0000 (10:31 -0700)]
DEVFS - More GPT fixes.  Fix serial number aliases for slice 0.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 8 Aug 2009 17:10:48 +0000 (10:10 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoDEVFS - Factor out recursive code into iterate_topology
Alex Hornung [Sat, 8 Aug 2009 16:42:02 +0000 (17:42 +0100)]
DEVFS - Factor out recursive code into iterate_topology

* Factor out the recursive code which scans through all nodes in
  the topology into a function, devfs_iterate_topology, which takes
  a callback as argument, which is called for every node.

* Create new callback functions for all functions that were recursive
  before, containing the code that was executed for each node.

* Change all callers of recursive functions to call
  devfs_iterate_topology with the respective callback function
  instead of having their own recursive functions.

5 years agoDEVFS - probe for disklabels in GPT slices.
Matthew Dillon [Sat, 8 Aug 2009 17:10:34 +0000 (10:10 -0700)]
DEVFS - probe for disklabels in GPT slices.

5 years agoDEVFS - Cleanup pass.
Matthew Dillon [Sat, 8 Aug 2009 17:10:14 +0000 (10:10 -0700)]
DEVFS - Cleanup pass.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 8 Aug 2009 16:45:45 +0000 (09:45 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoDEVFS - Refactor the loop in disk_probe() to fix GPT partition #0 (s0).
Matthew Dillon [Sat, 8 Aug 2009 16:45:15 +0000 (09:45 -0700)]
DEVFS - Refactor the loop in disk_probe() to fix GPT partition #0 (s0).

5 years agoDEVFS - (temporarily) fix LINT kernel build
Alex Hornung [Sat, 8 Aug 2009 14:38:40 +0000 (15:38 +0100)]
DEVFS - (temporarily) fix LINT kernel build

Fix building LINT by removing a stray dev_ops_add in fb and
temporarily removing vinum from the build.

5 years agoACPICA-UNIX: Building fixup
Sepherosa Ziehau [Sat, 8 Aug 2009 05:22:31 +0000 (13:22 +0800)]
ACPICA-UNIX: Building fixup

Submitted-by: Alexander Polakov<polachok@gmail.com> w/ modification
5 years agoMerge branch 'vendor/ACPICA-UNIX'
Sepherosa Ziehau [Sat, 8 Aug 2009 13:13:47 +0000 (21:13 +0800)]
Merge branch 'vendor/ACPICA-UNIX'

5 years agocproj.3: Add missing man page.
Stathis Kamperis [Sat, 8 Aug 2009 05:14:52 +0000 (08:14 +0300)]
cproj.3: Add missing man page.

5 years agoImport acpica-unix-20090521 vendor/ACPICA-UNIX
Sepherosa Ziehau [Sat, 8 Aug 2009 05:00:47 +0000 (13:00 +0800)]
Import acpica-unix-20090521

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 8 Aug 2009 00:37:19 +0000 (17:37 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoDEVFS - Add required vget when disassociating a vnode from a node.
Matthew Dillon [Sat, 8 Aug 2009 00:35:36 +0000 (17:35 -0700)]
DEVFS - Add required vget when disassociating a vnode from a node.

* We have to protect the vnode when disconnecting the rdev and
  disassociating it from the devfs_node.

* This also has the side effect of properly cycling the vnode refs
  so the namecache gets cleaned up when a node is removed.  Otherwise
  the namecache entry will be left intact, resolved to the now dead
  vnode.

5 years agocacosh(3): Return correct principal value.
Stathis Kamperis [Fri, 7 Aug 2009 17:25:27 +0000 (20:25 +0300)]
cacosh(3): Return correct principal value.

Discussed with Matthias Drochner:
http://mail-index.netbsd.org/source-changes/2009/08/03/msg223605.html

5 years agoDEVFS - delete rule-created aliases on rule reset
Alex Hornung [Fri, 7 Aug 2009 21:32:29 +0000 (22:32 +0100)]
DEVFS - delete rule-created aliases on rule reset

* add a new devfs flag, DEVFS_RULE_CREATED, which is set for alias
  nodes created from within the rule system.

* On rule reset, if a node is an alias and has the flag set, it is
  unlinked and freed.

5 years agodirectory.3: Fix wrong date.
Sascha Wildner [Sun, 2 Aug 2009 20:58:52 +0000 (22:58 +0200)]
directory.3: Fix wrong date.

5 years agostat.2: Document fstatat().
Sascha Wildner [Sat, 1 Aug 2009 16:37:08 +0000 (18:37 +0200)]
stat.2: Document fstatat().

While here, clean up a bit (more is needed, though).

Most-of-it-taken-from: FreeBSD

5 years agodirectory.3: Add some lines about the new fdopendir() function.
Sascha Wildner [Sun, 2 Aug 2009 20:39:11 +0000 (22:39 +0200)]
directory.3: Add some lines about the new fdopendir() function.

5 years agoifconfig.8: Remove empty line.
Sascha Wildner [Sun, 2 Aug 2009 19:38:46 +0000 (21:38 +0200)]
ifconfig.8: Remove empty line.

5 years agomdoc cleanup: Add missing .Os
Sascha Wildner [Sun, 2 Aug 2009 16:39:56 +0000 (18:39 +0200)]
mdoc cleanup: Add missing .Os

5 years agodevelopment.7: add descrption on how to perform vendor imports
Simon Schubert [Thu, 6 Aug 2009 14:48:34 +0000 (16:48 +0200)]
development.7: add descrption on how to perform vendor imports

5 years agodevfsctl - Cleanup and several bugfixes
Alex Hornung [Fri, 7 Aug 2009 20:52:24 +0000 (21:52 +0100)]
devfsctl - Cleanup and several bugfixes

* split lines longer than 80 columns

* Moved TAILQ_INSERT* into get_rule to avoid a problem which
  caused groups to also be inserted and kept in the rule
  list

* Fix several bugs related to config file parsing, including:
  - a bug in the argument checker, which caused a SEGFAULT
  - a bug that would cause lines beginning with whitespaces
    to duplicate their first real token
  - an incorrect check for an empty line, which caused a
    warning about an incorrect verb instead of ignoring
    the line

5 years agovkernel build suite - add README describing network bridging.
Matthew Dillon [Fri, 7 Aug 2009 20:13:33 +0000 (13:13 -0700)]
vkernel build suite - add README describing network bridging.

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 7 Aug 2009 20:09:04 +0000 (13:09 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agovkernel build suite - change -I network from /dev/vknet to /var/run/vknet
Matthew Dillon [Fri, 7 Aug 2009 20:08:39 +0000 (13:08 -0700)]
vkernel build suite - change -I network from /dev/vknet to /var/run/vknet

5 years agosubr_disk - don't show 0-size slices
Alex Hornung [Fri, 7 Aug 2009 20:23:41 +0000 (21:23 +0100)]
subr_disk - don't show 0-size slices

When probing the disk, check for 0-size slices and avoid calling
make_dev for them.

Reported-By: Simon "corecode" Schubert
5 years agokern_memio: don't treat any memio device as /dev/zero
Simon Schubert [Fri, 7 Aug 2009 19:58:53 +0000 (21:58 +0200)]
kern_memio: don't treat any memio device as /dev/zero

We actually have to compare zerodev to the passed argument in
iszerodev(), and not compare it to NULL.

5 years agompfr: always include stdint.h to allow build from DragonFly-2.2
Simon Schubert [Fri, 7 Aug 2009 18:06:51 +0000 (20:06 +0200)]
mpfr: always include stdint.h to allow build from DragonFly-2.2

DragonFly 2.2 has some confused headers that define INTMAX_C et al
but don't define intmax_t.  This confuses mpfr and prevents building
mpfr and thus master on 2.2-release.  Work around this problem by always
including stdint.h.  This can go away as soon as we don't need 2.2
crossbuilding compatibility anymore.

5 years ago.gitignore: properly spell cscope, add empty vim swap files
Simon Schubert [Fri, 7 Aug 2009 11:30:10 +0000 (13:30 +0200)]
.gitignore: properly spell cscope, add empty vim swap files

5 years agoboot: consolidate per-platform settings
Simon Schubert [Fri, 7 Aug 2009 09:06:54 +0000 (11:06 +0200)]
boot: consolidate per-platform settings

The bootloader has very specific build requirements, such as absolutely
no floating point ops.

- Define the build options in ${MACHINE_PLATFORM}/Makefile.inc.
- Make amd64/pc64 include the pc32 settings, since they share the boot
  loader
- Build the pc32 boot loader with CPUTYPE=i386 to avoid all FPU ops
- Include these settings also from ficl

5 years agobsd.cpu.gcc44.mk: add i686/pentiumpro alias
Simon Schubert [Fri, 7 Aug 2009 08:58:37 +0000 (10:58 +0200)]
bsd.cpu.gcc44.mk: add i686/pentiumpro alias

We need to map i686 to pentiumpro since this is tested for
later on to set MACHINE_CPU.

5 years agoDEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup
Matthew Dillon [Fri, 7 Aug 2009 17:39:24 +0000 (10:39 -0700)]
DEVFS - Fix asynchronous race on reprobe, remove devfs_msg id, cleanup

* The synchronous DISK_DISK_REPROBE and DISK_SLICE_REPROBE messages
  return while make_dev devices are still queued to devfs.  Add
  a call to devfs_config() to wait for the creation of those devices
  to finish before returning.

  This fixes numerous problems with shell scripts which fdisk + disklabel +
  newfs in a batch.

* Remove devfs_msg->id, also fixing an issue where the id was retrieves
  after the message is freed.  Async entry points now return void instead
  of the id.

* Adjust devfs_msg_send() to execute the message directly if the calling
  thread is the devfs message thread.  This is not strictly needed right
  now but may be used in the future.

* General cleanup.

5 years agoKernel mtx - Add mtxsleep(), interlocked tsleep w/ mutexes
Matthew Dillon [Fri, 7 Aug 2009 06:09:19 +0000 (23:09 -0700)]
Kernel mtx - Add mtxsleep(), interlocked tsleep w/ mutexes

5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 7 Aug 2009 01:44:55 +0000 (18:44 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agoDEVFS - vknetd - Change default socket path from /dev/vknet to /var/run/vknet
Matthew Dillon [Fri, 7 Aug 2009 01:43:55 +0000 (18:43 -0700)]
DEVFS - vknetd - Change default socket path from /dev/vknet to /var/run/vknet

Move the default socket path to something not inside /dev.

5 years agokern_memio - fix check for zerodev to fix memory mappings
Alex Hornung [Thu, 6 Aug 2009 23:00:05 +0000 (00:00 +0100)]
kern_memio - fix check for zerodev to fix memory mappings

* Change iszerodev() to check against a saaved cdev_t returned by
  the make_dev creating /dev/zero instead of relying on some
  major/minor magic.

* This fixes a problem when running mono, which caused a segfault
  on memset().

Reported-By: Hasso Tepper
Reported-By: Matthew Dillon
5 years agomtree: No need to create the /dev/fd/ directory anymore.
Sascha Wildner [Thu, 6 Aug 2009 22:02:15 +0000 (00:02 +0200)]
mtree: No need to create the /dev/fd/ directory anymore.

5 years agoMakefile_upgrade.inc: Fix paths.
Sascha Wildner [Thu, 6 Aug 2009 21:34:30 +0000 (23:34 +0200)]
Makefile_upgrade.inc: Fix paths.

5 years agofchmodat.2: Fix MLINKS
Sascha Wildner [Thu, 6 Aug 2009 21:11:43 +0000 (23:11 +0200)]
fchmodat.2: Fix MLINKS

5 years agoDEVFS - Cleanup of devfs_core, devfs_rules and devfs_vfsops
Alex Hornung [Thu, 6 Aug 2009 19:18:53 +0000 (20:18 +0100)]
DEVFS - Cleanup of devfs_core, devfs_rules and devfs_vfsops

5 years agoDEVFS - Code Cleanup
Matthew Dillon [Thu, 6 Aug 2009 17:09:01 +0000 (10:09 -0700)]
DEVFS - Code Cleanup

5 years agoDEVFS - Code cleanup.
Matthew Dillon [Thu, 6 Aug 2009 16:52:42 +0000 (09:52 -0700)]
DEVFS - Code cleanup.

* Syntax, indentation, structure, and minor code changes to make it
  more readable.

5 years agoDEVFS - add vfs ops fhtovp, vptofh and vget
Alex Hornung [Thu, 6 Aug 2009 12:34:45 +0000 (13:34 +0100)]
DEVFS - add vfs ops fhtovp, vptofh and vget

* Add fhtovp and vptofh vfs ops in devfs_vfsops.c, which also fix
  an issue with coredumps. The issue was that, whenever a core
  dump should be generated of an image with a /dev/* node open,
  vptofh would return EOPNOTSUPP and hence the generated core
  would be 0 bytes.

* Add helper function for fhtovp, devfs_inode_to_vnode and
  family to devfs_core.c

* Also add vget vfs op, using the same mechanism as fhtovp.

Reported-By: Hasso Tepper
5 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 6 Aug 2009 15:00:37 +0000 (08:00 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

5 years agogetdevpath - support API moved to <fstab.h>
Matthew Dillon [Thu, 6 Aug 2009 15:00:21 +0000 (08:00 -0700)]
getdevpath - support API moved to <fstab.h>

5 years agoRevert "mount - Add missing LDADD and #include"
Alex Hornung [Thu, 6 Aug 2009 12:35:49 +0000 (13:35 +0100)]
Revert "mount - Add missing LDADD and #include"

This reverts commit 891d9aee856c439ef8fc18f5ee7ab785b6c7c899.

5 years agomount - Add missing LDADD and #include
Alex Hornung [Thu, 6 Aug 2009 11:13:16 +0000 (12:13 +0100)]
mount - Add missing LDADD and #include

In mount.c, libutil.h was not being included, but getdevpath() is
used.
Also, -lutil was missing for the link stage.

5 years agosubr_disk - Use serializing tokens for disklist acceses
Alex Hornung [Thu, 6 Aug 2009 08:12:30 +0000 (09:12 +0100)]
subr_disk - Use serializing tokens for disklist acceses

Add the use of lwkt serializing tokens for every operation on the
disklist to avoid possible races.

Reported-By: Antonio Huete
5 years agoDEVFS - Use dyn. memory for alias and clone handler
Alex Hornung [Thu, 6 Aug 2009 07:46:47 +0000 (08:46 +0100)]
DEVFS - Use dyn. memory for alias and clone handler

Change the ->name element for both alias and clone handler structs
to use dynamic memory, allocated just after allocation of the
structs.
Also fix a problem in devfs_make_alias_worker() which would have
caused a warning and non-creation of alias in case one requested
creation of da0 after da0s1a because of a missing length check.

Reported-By: Matthew Dillon
5 years agoadd fchmodat(2) system call
Nicolas Thery [Wed, 5 Aug 2009 20:05:00 +0000 (22:05 +0200)]
add fchmodat(2) system call

Add also its libc_r wrapper and man page.

5 years agoDEVTAB - Add devtab support for manual mounts
Matthew Dillon [Thu, 6 Aug 2009 05:06:13 +0000 (22:06 -0700)]
DEVTAB - Add devtab support for manual mounts

* 2-argument mounts now do a devtab lookup on the device being mounted,
  similar to the lookup done by the fstab scanning code.

5 years agoNFS - Fix crash on client on write attempt to ro fs. Fix ro-test on server.
Matthew Dillon [Thu, 6 Aug 2009 02:58:53 +0000 (19:58 -0700)]
NFS - Fix crash on client on write attempt to ro fs.  Fix ro-test on server.

* A NFS client attempting to create a file would crash on a read-only NFS
  mount instead of returning EROFS.  The bug was introduced with the nfsm
  commit.

* A NFS server was improperly allowing certain modifying operations through.