dragonfly.git
4 years agoAMD64 - Refactor uio_resid and size_t assumptions.
Matthew Dillon [Wed, 19 Aug 2009 03:30:09 +0000 (20:30 -0700)]
AMD64 - Refactor uio_resid and size_t assumptions.

* uio_resid changed from int to size_t (size_t == unsigned long equivalent).

* size_t assumptions in most kernel code has been refactored to operate in a
  64 bit environment.

* In addition, the 2G limitation for VM related system calls such as mmap()
  has been removed in 32 bit environments.  Note however that because
  read() and write() return ssize_t, these functions are still limited
  to a 2G byte count in 32 bit environments.

4 years agoChange typedefs for vm_offset_t, vm_size_t, and vm_pindex_t, add szmin/sz/max
Matthew Dillon [Wed, 19 Aug 2009 03:01:13 +0000 (20:01 -0700)]
Change typedefs for vm_offset_t, vm_size_t, and vm_pindex_t, add szmin/sz/max

* Generally change these types from unsigned int to unsigned long in
  order to better catch int/long issues on both 32 and 64 bit builds.

* Add szmin() and szmax() inlines which take and return size_t.

4 years agoFix miscellanious size_t related compiler warnings.
Matthew Dillon [Wed, 19 Aug 2009 02:59:59 +0000 (19:59 -0700)]
Fix miscellanious size_t related compiler warnings.

4 years agosize_t/ssize_t - change to [unsigned] long
Matthew Dillon [Wed, 19 Aug 2009 02:56:17 +0000 (19:56 -0700)]
size_t/ssize_t - change to [unsigned] long

* change size_t from unsigned int to unsigned long, and change ssize_t
  from int to long for both 32 and 64 bit builds.

  NOTE: This may not last for 32 bit builds, depending on what it breaks
  in pkgsrc land, but the change makes it easier to detect 32/64 bit
  issues with size_t, sizeof, and pointer arithmatic on 32 bit machines.

4 years agosystat.1: Document pvmmeter display.
Sascha Wildner [Tue, 18 Aug 2009 12:31:19 +0000 (14:31 +0200)]
systat.1: Document pvmmeter display.

Submitted-by: Antoniu Huete Jimenez <ahuete.devel@gmail.com>
4 years agoSync zoneinfo database with tzdata2009l from elsie.
Sascha Wildner [Tue, 18 Aug 2009 11:48:54 +0000 (13:48 +0200)]
Sync zoneinfo database with tzdata2009l from elsie.

africa:         8.22 -> 8.23
australasia:    8.11 -> 8.12

* africa: Egypt starts winter time on August 21.

* australasia: Add comment about the possibility of Samoa observing DST
      in 2009/2010.

4 years agodistrib-dirs: Create /sys only if it doesn't exist.
Sascha Wildner [Sun, 16 Aug 2009 20:59:33 +0000 (22:59 +0200)]
distrib-dirs: Create /sys only if it doesn't exist.

4 years agoinstaller: Fix creation of the /sys symlink.
Sascha Wildner [Sun, 16 Aug 2009 20:58:46 +0000 (22:58 +0200)]
installer: Fix creation of the /sys symlink.

4 years agomount_devfs.8: Update for new options. Add some EXAMPLES.
Sascha Wildner [Sun, 16 Aug 2009 12:58:15 +0000 (14:58 +0200)]
mount_devfs.8: Update for new options. Add some EXAMPLES.

Submitted-by: alexh
4 years agoAMD64 - Fix printf type
Matthew Dillon [Tue, 18 Aug 2009 00:11:47 +0000 (17:11 -0700)]
AMD64 - Fix printf type

4 years agoAMD64 - Move fdisk and nextboot up one level and remove src/sbin/i386.
Matthew Dillon [Tue, 18 Aug 2009 00:07:40 +0000 (17:07 -0700)]
AMD64 - Move fdisk and nextboot up one level and remove src/sbin/i386.

* Move fdisk and nextboot up, remove src/sbin/i386, and conditionalize
  the build to build it for amd64 as well.

Submitted-by: Antonio Huete <tuxillo@quantumachine.net>
4 years agoINSTALLER - Fix a bug with varargs
Antonio Huete [Mon, 17 Aug 2009 22:05:48 +0000 (22:05 +0000)]
INSTALLER - Fix a bug with varargs

In i_log() function, vfprintf() is used twice in a va_start()/va_end()
block.

Submitted-by: Antonio Huete <tuxillo@quantumachine.net>
4 years agoNFS - Fix socket race against nfs_timer.
Matthew Dillon [Mon, 17 Aug 2009 21:46:40 +0000 (14:46 -0700)]
NFS - Fix socket race against nfs_timer.

* Fix a socket race where the nfs_timer can sometimes operate on a
  TCP socket before the socket completes its connection to the target,
  resulting in a panic.

Tracked-down-by: Sepherosa Ziehau <sepherosa@gmail.com>
4 years agoHAMMER Util - Bulk transfer, SIGPIPE, more features.
Matthew Dillon [Mon, 17 Aug 2009 20:14:53 +0000 (13:14 -0700)]
HAMMER Util - Bulk transfer, SIGPIPE, more features.

* Add -B option for initial bulk transfer in a mirror-stream

* The parent process in a mirror-stream and mirror-copy operation
  now ignores SIGPIPE

* Use the smaller of ctime or mtime when calculating the real timestamp
  for a snapshot softlink in a prune operation.

* Sleep an additional 15 seconds before reconnecting a failed connection
  in a mirror-stream operation.

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

4 years agoHAMMER Util - Add new features, fix history retention bug in prune
Matthew Dillon [Mon, 17 Aug 2009 18:05:09 +0000 (11:05 -0700)]
HAMMER Util - Add new features, fix history retention bug in prune

* The prune code was not retaining the fine-grained history between
  the last snapshot and current.

* Add a new PFS config variable called 'prune-min' which may be used
  to set the minimum fine-grained history retention, in seconds.  The
  hammer prune code will not prune inbetween any snapshots that are
  within the fine-grained retention period.

* The mirror-stream directive now automatically loops and reconnects
  if the network connection fails.

* The mirror-stream directive now attempts to break-up a large initial
  bulk transfer into smaller transfers, inserting synchronization points
  so a failure in the middle of the large bulk transfer does not require
  starting from scratch again.

* The show directive (show btree) now takes an optional localization[:objid]
  argument (specified in hex).  If specified the directive will search
  the B-Tree for the key, printing nodes as it goes, and then continue
  with a normal iteration.

4 years agofd - Fix panic due to device_busy
Alex Hornung [Mon, 17 Aug 2009 17:37:53 +0000 (18:37 +0100)]
fd - Fix panic due to device_busy

* Fix panic introduced by 7ba1363dc2de5d52704, caused by a too
  early call to device_busy, before the device is marked as
  attached.

NOTE: This might have yet unknown repercussions on the use of
      floppies.

Suggested-By: Matthew Dillon
4 years agoDEVFS - Remove /usr/sbin/devfsctl when upgrading.
Matthew Dillon [Mon, 17 Aug 2009 15:30:45 +0000 (08:30 -0700)]
DEVFS - Remove /usr/sbin/devfsctl when upgrading.

* devfsctl has moved to /sbin.  Remove the /usr/sbin version.

4 years agopktgen - fix to work with devfs
Alex Hornung [Mon, 17 Aug 2009 09:09:14 +0000 (10:09 +0100)]
pktgen - fix to work with devfs

* Remove usage of dev_ops_add

* Move make_dev from open to MOD_LOAD

* Change dev_ops_remove to dev_ops_remove_all

NOTE: This limits pktgen to only one device, but pktgenctl doesn't
      seem to use more than one anyways, as it defaults to open
      pktg0.

4 years agomount_devfs(8) - Accept another argument as mount from
Alex Hornung [Mon, 17 Aug 2009 08:59:05 +0000 (09:59 +0100)]
mount_devfs(8) - Accept another argument as mount from

* Accept passing of another argument as mount does, but ignore it.
  This way we can accept mount_devfs devfs /mnt, and by extension
  mount -t devfs devfs /mnt

4 years agodevfsctl(8) - move devfsctl to sbin
Alex Hornung [Mon, 17 Aug 2009 07:33:28 +0000 (08:33 +0100)]
devfsctl(8) - move devfsctl to sbin

* move devfsctl from usr/sbin to sbin and link into build.

4 years agoDEVFS - move devfs headers to sys/sys; fix consumers
Alex Hornung [Mon, 17 Aug 2009 07:24:14 +0000 (08:24 +0100)]
DEVFS - move devfs headers to sys/sys; fix consumers

* Move devfs.h and devfs_rules.h from sys/vfs/devfs/ to sys/sys/

* Fix all consumers of the devfs headers to use the new path

4 years agoDEVFS - add link-to-link support to nresolve
Alex Hornung [Mon, 17 Aug 2009 06:52:05 +0000 (07:52 +0100)]
DEVFS - add link-to-link support to nresolve

* Add support for devfs autolinks linking to other devfs autolinks, up
  to a level of 8, to avoid recursion.

4 years agoDEVFS - sync up mount with userland; fix bugs
Alex Hornung [Fri, 14 Aug 2009 16:34:18 +0000 (17:34 +0100)]
DEVFS - sync up mount with userland; fix bugs

* Add support for the userland mount options in kernel and rely
  on them to set the jailed property of the mount point.

* Fix comparison of mount points by changing it to use strcmp instead
  of relying on an always-0 length.

* Allow link rules to be created for links. (* possibly problematic? *)

4 years agodevfsctl - Disable ruletab support; use proper working dirs
Alex Hornung [Fri, 14 Aug 2009 16:31:11 +0000 (17:31 +0100)]
devfsctl - Disable ruletab support; use proper working dirs

* Disable (temporarily) all ruletab support in devfsctl.

* If a configuration file cannot be found, it is searched after in the
  default directory (/etc/devfs) before erroring out.

* When including a file in some other directory, the working directory
  is temporarily changed to that dir, so that further includes work
  as intended. After each include, the working directory is restored
  to the previous one.

* Make sure that all configuration files are owned by root so the
  system is protected from malicious rule files.

4 years agomount_devfs - Complete functionality; integrate rule support
Alex Hornung [Fri, 14 Aug 2009 16:27:29 +0000 (17:27 +0100)]
mount_devfs - Complete functionality; integrate rule support

* add support for -o ruleset=... and -o jail.

* After a successful mount, rules are cleared for that mount point
  and if -o ruleset=foo was specified, the rules in foo are applied
  to the mount point.

* Also do this if a devfs mp is being remounted, don't bother calling
  mount, just do the rule magic.

4 years agoDEVFS - Add support for wildcard link rules
Alex Hornung [Fri, 14 Aug 2009 08:23:57 +0000 (09:23 +0100)]
DEVFS - Add support for wildcard link rules

* Add support for link rules with wildcards like:
  link da0* backup.
  which would result in the following links:
  backup. -> da0
  backup.s1 -> da0s1
  backup.s1a -> da0s1a
  ...

4 years agodevfsctl - Add initial devfs/ruletab support
Alex Hornung [Thu, 13 Aug 2009 18:42:16 +0000 (19:42 +0100)]
devfsctl - Add initial devfs/ruletab support

* Add -t option, yet undocumented, to specify that one wants to use
  the ruletab mode. This mode allows to load either all rules for
  the specified mountpoints (1) in ruletab, just the generic rules (*)
  and for /dev (2), or all the rules specified in the ruletab (3).
  Mode (1) is entered by passing -m with a specific mount point
  that shall not be 'boot' or '*'.
  Mode (2) is entered by passing '-m boot'
  Mode (3) is entered by passing '-m *'

4 years agoDEVFS - don't apply generic rules to jailed mountpoints
Alex Hornung [Thu, 13 Aug 2009 13:56:50 +0000 (14:56 +0100)]
DEVFS - don't apply generic rules to jailed mountpoints

* Only apply rules intended for jails to jailed mountpoints, not
  any rule, as before.

4 years agodevfsctl - Bring in sync with kernel rule changes
Alex Hornung [Thu, 13 Aug 2009 11:28:31 +0000 (12:28 +0100)]
devfsctl - Bring in sync with kernel rule changes

* Sync up with kernel by changing to use devfs_rule_ioctl and separating
  rule_cmd from rule_type.

4 years agoDEVFS - Separate ioctl struct from in-kernel struct
Alex Hornung [Thu, 13 Aug 2009 11:06:00 +0000 (12:06 +0100)]
DEVFS - Separate ioctl struct from in-kernel struct

* Separate out an ioctl structure from the devfs_rule struct called
  devfs_rule_ioctl.
  This avoids unnecessary complications like copyin, and it avoids
  problems caused by userland reporting wrong sizes.

* Also separate the rule_type from the rule_cmd into different fields
  in both structs.

Suggested-By: Simon "corecode" Schubert
4 years agoAHCI - Chip reset, Inquiry alignment, ATAPI adjustments, Intel attach
Matthew Dillon [Mon, 17 Aug 2009 06:36:28 +0000 (23:36 -0700)]
AHCI - Chip reset, Inquiry alignment, ATAPI adjustments, Intel attach

* When resetting the chip set AE before issuing HR and leave AE set
  when issuing HR.  After reset is complete, set AE again.

* Do Intel hocus pocus at config register 0x92 for Intel chipsets.

* The only PIO request is basically the initial INQUIRY during probe.
  Make sure the structure does not cross a page boundary so only one
  DRQ buffer is needed.  Very old AHCI chipsets may need this.

* Make minor flags adjustments for PIO setup commands during the
  initial probe.

* Reduce verbosity slightly.

4 years agoKernel - Use built-in suffix handling for "hw.physmem" kenv.
Matthew Dillon [Mon, 17 Aug 2009 06:34:30 +0000 (23:34 -0700)]
Kernel - Use built-in suffix handling for "hw.physmem" kenv.

* Remove the roll-your-own code and use the suffix handling that is
  now built into kgetenv_quad().

4 years agoDEVFS - Call disk_setdiskinfo() for SCSI/ATAPI CDs.
Matthew Dillon [Mon, 17 Aug 2009 06:31:23 +0000 (23:31 -0700)]
DEVFS - Call disk_setdiskinfo() for SCSI/ATAPI CDs.

* When a CD drive is registered we need to call disk_setdiskinfo()
  after the initial probe whether a CD is in the drive or not
  before the disk subsystem will allow userland to open the device.

4 years agoAMD64 - Fix bogus signal interruption
Matthew Dillon [Mon, 17 Aug 2009 04:03:08 +0000 (21:03 -0700)]
AMD64 - Fix bogus signal interruption

* The TF_XFLAGS field in the trap frame was not getting cleared on trap and
  syscall entry.  This field can cause a mailbox signal to be flagged in
  the signal frame which in turn can cause the next blockable system call
  to return EINTR.

  This fixes the last issue with mount_mfs.

* Cast the signal function to intptr_t rather then int.

4 years agoMFS - Clean up debug code, remove stuff no longer needed for DEVFS
Matthew Dillon [Mon, 17 Aug 2009 04:00:20 +0000 (21:00 -0700)]
MFS - Clean up debug code, remove stuff no longer needed for DEVFS

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

4 years agoMFS - Fix bug in SIGUSR1 signaling.
Matthew Dillon [Mon, 17 Aug 2009 01:37:21 +0000 (18:37 -0700)]
MFS - Fix bug in SIGUSR1 signaling.

* The signaling code was using sigblock() improperly, not only passing
  the wrong mask but also trying to restore the original mask using
  sigblock() instead of sigsetmask().

4 years agousbd - Do not start moused by default when a usb mouse is connected
Matthew Dillon [Sun, 16 Aug 2009 23:31:27 +0000 (16:31 -0700)]
usbd - Do not start moused by default when a usb mouse is connected

* Because it interferes with X.  Better for X to just attach directly
  to the usb mouse.

4 years agoHAMMER - Add vfs.hammer.yield_check, yield on cpu intensive loops
Matthew Dillon [Sun, 16 Aug 2009 23:18:11 +0000 (16:18 -0700)]
HAMMER - Add vfs.hammer.yield_check, yield on cpu intensive loops

* When running in the kernel HAMMER can wind up cpu-bound.  This code
  allows it to yield to other processes during these periods.  This is
  a bit of a hack and may undergo further development.

* Default check for yield every 16 B-tree iterations.

4 years agoKernel - Instrumentation for experimentation, interrupt threads
Matthew Dillon [Sun, 16 Aug 2009 23:15:32 +0000 (16:15 -0700)]
Kernel - Instrumentation for experimentation, interrupt threads

* Add kern.intr_migrate (default off).  If set to 1 interrupt threads
  will chase the big giant lock around the cpu space instead of waiting
  for another cpu to release it.

* Add lwkt.bgl_yield, default 10 (uS).  Set the polling delay when
  yielding the BGL to another thread.

4 years agokernel - Fix bug in usched_set()
Matthew Dillon [Sun, 16 Aug 2009 23:12:50 +0000 (16:12 -0700)]
kernel - Fix bug in usched_set()

* usched_set() was returning EINVAL after successfully removing a cpu
  from the set of allowed cpus.

4 years agoSilence some 'unused variable' warnings in the kernel.
Sascha Wildner [Sun, 16 Aug 2009 20:02:26 +0000 (22:02 +0200)]
Silence some 'unused variable' warnings in the kernel.

4 years agodevfsctl(8): Fix WARNS regressions.
Sascha Wildner [Sun, 16 Aug 2009 19:19:21 +0000 (21:19 +0200)]
devfsctl(8): Fix WARNS regressions.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 16 Aug 2009 18:19:39 +0000 (11:19 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agodisk/fd - fix panics
Matthew Dillon [Sun, 16 Aug 2009 18:18:17 +0000 (11:18 -0700)]
disk/fd - fix panics

* Call disk_setdiskinfo() on startup.

* Adjust kernel to not panic if a disk device is opened before
  disk_setdiskinfo() has been called.

4 years agoACPICA-UNIX: Fix usr.sbin/acpi warning by properly define ACPI_THREAD_ID
Sepherosa Ziehau [Sun, 16 Aug 2009 11:45:01 +0000 (19:45 +0800)]
ACPICA-UNIX: Fix usr.sbin/acpi warning by properly define ACPI_THREAD_ID

Note, for kernel code, ACPI_THREAD_ID is left undefined in platform specific
header; default integer type in acpica-unix is taken instead.

Reported-by: swildner@
4 years agompt(4): Hook the module into the build.
Sascha Wildner [Sun, 16 Aug 2009 10:02:47 +0000 (12:02 +0200)]
mpt(4): Hook the module into the build.

4 years agompt.4: Update manual page.
Sascha Wildner [Sun, 16 Aug 2009 10:05:02 +0000 (12:05 +0200)]
mpt.4: Update manual page.

Submitted-by: Alexander Polakov <polachok@gmail.com>
4 years agoSync family tree with FreeBSD.
Sascha Wildner [Sat, 15 Aug 2009 23:36:27 +0000 (01:36 +0200)]
Sync family tree with FreeBSD.

4 years agosh(1): Expand $LINENO to the current line number.
Stathis Kamperis [Fri, 14 Aug 2009 19:10:28 +0000 (22:10 +0300)]
sh(1): Expand $LINENO to the current line number.

This is required by SUSv3's "User Portability Utilities" option.

Obtained-from: FreeBSD (SVN Revision 179022 by stefanf@)
Obtained-from: FreeBSD (SVN Revision 179387 by stefanf@)

4 years agoPIPE - Fix a blocking race.
Matthew Dillon [Sun, 16 Aug 2009 03:56:04 +0000 (20:56 -0700)]
PIPE - Fix a blocking race.

* A pipe can get stuck in "pipewr" due to a race caused by a selwakeup()
  before a tsleep().  Fix the race.

4 years agoMPI Driver update - additional merge work.
Matthew Dillon [Sun, 16 Aug 2009 02:12:31 +0000 (19:12 -0700)]
MPI Driver update - additional merge work.

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
4 years agoMPT - fix all compiler warnings
Matthew Dillon [Sun, 16 Aug 2009 02:10:58 +0000 (19:10 -0700)]
MPT - fix all compiler warnings

4 years agoMPI Driver update - additional merge work.
Matthew Dillon [Sun, 16 Aug 2009 01:57:23 +0000 (18:57 -0700)]
MPI Driver update - additional merge work.

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
4 years agoMPI Driver update
Matthew Dillon [Sat, 15 Aug 2009 22:30:10 +0000 (15:30 -0700)]
MPI Driver update

Ported-from: FreeBSD
Submitted-by: Alexander Polakov <polachok@gmail.com>
4 years agopcidevs - Add entry for SYMBIOS SAS1068
Matthew Dillon [Sat, 15 Aug 2009 22:24:34 +0000 (15:24 -0700)]
pcidevs - Add entry for SYMBIOS SAS1068

Submitted-by: Alexander Polakov <polachok@gmail.com>
4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 15 Aug 2009 20:07:57 +0000 (13:07 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoBIO - Do not try to redirty a bp on error unless it has a vnode association.
Matthew Dillon [Sat, 15 Aug 2009 20:06:39 +0000 (13:06 -0700)]
BIO - Do not try to redirty a bp on error unless it has a vnode association.

* vinum buffers may not have a b_vp association.  bdirty() and friends
  requires b_vp to be present.  Simply do not try to re-dirty buffers
  after a failed write unless they have a b_vp association.

  Note that only vinum constructs these manually-kmalloc()'d buffers
  and has this behavior.

4 years agoVINUM - Support geometries > 2TB
Matthew Dillon [Sat, 15 Aug 2009 20:03:23 +0000 (13:03 -0700)]
VINUM - Support geometries > 2TB

* Convert remaining 32 bit block number calculations to 64 bit calculations.

4 years agoRevert "installer: use cmd_name()"
Sascha Wildner [Sat, 15 Aug 2009 19:52:48 +0000 (21:52 +0200)]
Revert "installer: use cmd_name()"

This reverts commit 2ec8237911ca1750232f8b1ae48263329acdf931.

The change actually broke cmd_name() completely. :)

4 years agoVINUM - correct deadlock, correct 32 bit truncation, cleanup string copies
Matthew Dillon [Sat, 15 Aug 2009 19:42:27 +0000 (12:42 -0700)]
VINUM - correct deadlock, correct 32 bit truncation, cleanup string copies

* Correct a deadlock when reading a configuration from disk via
  the command line.

* Correct numerous 32 bit truncations due to the use of min/max.

* Cleanup string copies, use ksnprintf() when possible.

4 years agoAdd umax, umin, i64max, i64min, u64max, u64min.
Matthew Dillon [Sat, 15 Aug 2009 19:23:22 +0000 (12:23 -0700)]
Add umax, umin, i64max, i64min, u64max, u64min.

4 years agoVINUM - Fix reinitialization bug
Matthew Dillon [Sat, 15 Aug 2009 17:33:02 +0000 (10:33 -0700)]
VINUM - Fix reinitialization bug

* If the vinum config is destroyed vinum_conf is zerod, which
  unfortunately wipes out the pbuf counter.

  Generally refactor the vinum_conf init code into its own procedure.

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

4 years agoAdd more intel stuff to pcidevs.
Matthew Dillon [Sat, 15 Aug 2009 17:13:51 +0000 (10:13 -0700)]
Add more intel stuff to pcidevs.

4 years agoDEVFS - Add sync_devs()
Matthew Dillon [Sat, 15 Aug 2009 17:12:45 +0000 (10:12 -0700)]
DEVFS - Add sync_devs()

* Add a function called sync_devs() which synchronizes the disk
  and devfs subsystems.  Call the function where appropriate.

4 years agoDEVFS - Refactor vinum to operate with devfs
Matthew Dillon [Sat, 15 Aug 2009 17:09:44 +0000 (10:09 -0700)]
DEVFS - Refactor vinum to operate with devfs

* vinum now accepts devtab labels and device paths (such as serial numbers)
  in drive specifications.  Note that devtab labels will be convreted to
  device serial numbers in the on-disk configuration.

* vinum now creates and destroys its own devices via DEVFS.

* Fix some buf/bio issues related to recent buf/bio work.  bio_done is
  required for ad-hoc buffers such as the kind vinum uses, and also
  required for any synchronous IO.

* Remove adhoc device associations.  Instead store the device returned
  by make_dev() in appropriate internal structures.

4 years agoDEVTAG - Add devtab suppor for disklabel, disklabel64, and fdisk
Matthew Dillon [Sat, 15 Aug 2009 16:59:39 +0000 (09:59 -0700)]
DEVTAG - Add devtab suppor for disklabel, disklabel64, and fdisk

4 years agoVINUM - Fix 64 bit compiler warnings
Matthew Dillon [Sat, 15 Aug 2009 05:12:30 +0000 (22:12 -0700)]
VINUM - Fix 64 bit compiler warnings

4 years agoVINUM - header file syntax cleanup
Matthew Dillon [Sat, 15 Aug 2009 05:08:16 +0000 (22:08 -0700)]
VINUM - header file syntax cleanup

4 years agodevfsctl.8: Fix some references.
Sascha Wildner [Fri, 14 Aug 2009 21:52:23 +0000 (23:52 +0200)]
devfsctl.8: Fix some references.

4 years agomount_devfs(8): Add a manual page.
Sascha Wildner [Fri, 14 Aug 2009 19:07:21 +0000 (21:07 +0200)]
mount_devfs(8): Add a manual page.

4 years agoNFS - Do not allow rsize/wsize or the socket proto to be changed on mount -u
Matthew Dillon [Fri, 14 Aug 2009 15:45:23 +0000 (08:45 -0700)]
NFS - Do not allow rsize/wsize or the socket proto to be changed on mount -u

* Changing these fields can interfere with already-instantiated buffer
  cache buffers and cause an assertion panic.

Reported-by: Matthias Schmidt
4 years agoDEVFS - Fix xterm pty allocation, permanently fix pty permissions & ownership
Matthew Dillon [Fri, 14 Aug 2009 03:25:43 +0000 (20:25 -0700)]
DEVFS - Fix xterm pty allocation, permanently fix pty permissions & ownership

* Remove the hack that was put in place to support sshd and other remote
  terminal programs.

* Add an override mechanic (SI_OVERRIDE) that allows the cdev to take
  over uid, gid, and perms management from the devfs_node.

* Use the override mechanic in the pty code to formally set ownership and
  permissions for the pty/tty pair.

4 years agoAMD64 - Fix file descriptor passing.
Matthew Dillon [Thu, 13 Aug 2009 23:07:55 +0000 (16:07 -0700)]
AMD64 - Fix file descriptor passing.

* The kernel was improperly assuming that the cmsghdr structure is
  aligned.  It is not on 64-bit architectures.

Reported-by: Antonio Huete <ahuete.devel@gmail.com>
4 years agoAMD64 - Properly detect kernel thread register frames.
Matthew Dillon [Thu, 13 Aug 2009 20:41:59 +0000 (13:41 -0700)]
AMD64 - Properly detect kernel thread register frames.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 13 Aug 2009 20:27:26 +0000 (13:27 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoAMD64 - Fix kgdb for kernel core files.
Matthew Dillon [Thu, 13 Aug 2009 20:26:37 +0000 (13:26 -0700)]
AMD64 - Fix kgdb for kernel core files.

* Add a dummy sniffer to set the osabi, as the kernel binary may not
  have an ABI tag.

4 years agodevfsctl.8: Add a description of the rule syntax.
Sascha Wildner [Thu, 13 Aug 2009 19:20:55 +0000 (21:20 +0200)]
devfsctl.8: Add a description of the rule syntax.

Submitted-by: alexh
4 years agoAMD64 - Use Elf_Word for note alignment
Matthew Dillon [Thu, 13 Aug 2009 17:00:24 +0000 (10:00 -0700)]
AMD64 - Use Elf_Word for note alignment

* gnu utilities such as objdump and gdb appear to assume that notes
  are 4-byte aligned.

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

4 years agoGDB - Fix register layout for 64-bit builds.
Matthew Dillon [Thu, 13 Aug 2009 16:58:56 +0000 (09:58 -0700)]
GDB - Fix register layout for 64-bit builds.

* Our register layout has changed radically since the last time we
  synced this up.

* The size of the register structure has changed as well.

4 years agoAMD64 - Enable TSC functions.
Matthew Dillon [Thu, 13 Aug 2009 16:39:53 +0000 (09:39 -0700)]
AMD64 - Enable TSC functions.

4 years agoDEVTAB - dumpon now supports devtab
Matthew Dillon [Thu, 13 Aug 2009 15:19:08 +0000 (08:19 -0700)]
DEVTAB - dumpon now supports devtab

4 years agoAdd support for radeon RS880 IGP chips to drm.
Hasso Tepper [Thu, 13 Aug 2009 09:32:23 +0000 (12:32 +0300)]
Add support for radeon RS880 IGP chips to drm.

Obtained-from: FreeBSD

4 years agoAdd some additional radeon pci ids to drm.
Hasso Tepper [Thu, 13 Aug 2009 09:31:37 +0000 (12:31 +0300)]
Add some additional radeon pci ids to drm.

Obtained-from: FreeBSD

4 years agodevtab - swapon now supports /etc/devtab
Matthew Dillon [Wed, 12 Aug 2009 23:27:45 +0000 (16:27 -0700)]
devtab - swapon now supports /etc/devtab

4 years agoFix swaponvp prototype.
Matthew Dillon [Wed, 12 Aug 2009 22:21:05 +0000 (15:21 -0700)]
Fix swaponvp prototype.

Reported-by: Rumko
4 years agoDEVFS - change leak_count from size_t to long and use the correct atomic op.
Matthew Dillon [Wed, 12 Aug 2009 21:41:13 +0000 (14:41 -0700)]
DEVFS - change leak_count from size_t to long and use the correct atomic op.

4 years agoAMD64 - Change VM_SWZONE_SIZE_MAX from 32M to 512M
Matthew Dillon [Wed, 12 Aug 2009 21:38:50 +0000 (14:38 -0700)]
AMD64 - Change VM_SWZONE_SIZE_MAX from 32M to 512M

* Increase the KVM reservation for the swap zone structure on amd64.
  Space is reserved for enough swzone structures to cover around
  512G of swap.

4 years agoAMD64 - Fix bugs in pmap_growkernel()
Matthew Dillon [Wed, 12 Aug 2009 18:02:40 +0000 (11:02 -0700)]
AMD64 - Fix bugs in pmap_growkernel()

* The iterator was not being iterated when allocating a PDPE.

* pmap_zero_page() was being called with a vm_page_t instead of a physical
  address.  (FreeBSD's version uses a vm_page_t, ours uses a physical
  address).

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 12 Aug 2009 16:57:38 +0000 (09:57 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoAMD64 - Fix bug in pmap_prefault, adjust vn kprintfs to conform to amd64.
Matthew Dillon [Wed, 12 Aug 2009 16:56:03 +0000 (09:56 -0700)]
AMD64 - Fix bug in pmap_prefault, adjust vn kprintfs to conform to amd64.

* The pde was being indirected without first checking to see if it was NULL.

* Fix kprintf()'s in the VN device to build without warning on amd64.

4 years agoswap, amd64 - increase maximum swap space to 1TB x 4
Matthew Dillon [Wed, 12 Aug 2009 16:52:29 +0000 (09:52 -0700)]
swap, amd64 - increase maximum swap space to 1TB x 4

* The radix can overflow a 32 bit integer even if swblk_t fits in 32 bits.
  Expand the radix to 64 bits and thus allow the subr_blist code to operate
  up to 2 billion blocks (8TB total).

* Shortcut the common single-swap-device case.  We do not have to scan
  the radix tree to get available space in the single-device case.

* Change maxswzone and maxbcache to longs and add TUNABLE_LONG_FETCH().

* All the TUNEABLE_*_FETCH() calls and kgetenv_*() calls for integers
  call kgetenv_quad().

  Adjust kgetenv_quad() to accept a suffix for kilobytes, megabytes,
  gigabytes, and terrabytes.

4 years agodevfsctl(8): Add a manual page.
Sascha Wildner [Wed, 12 Aug 2009 10:49:48 +0000 (12:49 +0200)]
devfsctl(8): Add a manual page.

Submitted-by: alexh
4 years agoDisable telnet autologin by default.
Hasso Tepper [Wed, 12 Aug 2009 09:45:51 +0000 (12:45 +0300)]
Disable telnet autologin by default.

I doubt that anyone really uses it nowadayas, but it confuses a lot
a vendor "C" equipment making it to complain about missing kerberos
configuration.

4 years agoRemove historic _physadr and label_t typedefs.
Hasso Tepper [Wed, 12 Aug 2009 09:30:59 +0000 (12:30 +0300)]
Remove historic _physadr and label_t typedefs.

These were never used in DragonFly and conflict with some thirdparty
software.

4 years agoNFS - Implement statvfs to take advantage of 64-bit fields
Alex Hornung [Tue, 11 Aug 2009 22:33:20 +0000 (23:33 +0100)]
NFS - Implement statvfs to take advantage of 64-bit fields

* Implement statvfs vfsop to take advantage of statvfs' 64-bit fields
  instead of statfs 32-bit fields.
  This also solves an issue which caused incorrect display of space
  for large NFS mounts.

Dragonfly-Bug: http://bugs.dragonflybsd.org/issue1401
Reported-By: Simon "corecode" Schubert
4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 12 Aug 2009 04:53:45 +0000 (21:53 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly