dragonfly.git
14 years agonrelease.7: /dev/da8 is the default IMGUSBDEV.
Sascha Wildner [Fri, 4 Sep 2009 20:32:37 +0000 (22:32 +0200)]
nrelease.7: /dev/da8 is the default IMGUSBDEV.

Reported-by: Johannes Hofmann
14 years agomodules: Kill debugging.
Matthew Dillon [Thu, 3 Sep 2009 23:53:50 +0000 (16:53 -0700)]
modules: Kill debugging.

Requested-by: corecode
14 years agomodules: correct dependencies / version declarations
Simon Schubert [Thu, 3 Sep 2009 22:47:11 +0000 (00:47 +0200)]
modules: correct dependencies / version declarations

14 years agotest/amd64: build and install modules
Simon Schubert [Thu, 3 Sep 2009 20:42:52 +0000 (22:42 +0200)]
test/amd64: build and install modules

also don't try to install gcc44 since we don't build it.

14 years agoloader: update elf module code from FreeBSD
Simon Schubert [Thu, 3 Sep 2009 21:59:53 +0000 (23:59 +0200)]
loader: update elf module code from FreeBSD

14 years agomodules: add elf_obj linker for amd64
Simon Schubert [Thu, 3 Sep 2009 21:58:17 +0000 (23:58 +0200)]
modules: add elf_obj linker for amd64

Obtained-from:  FreeBSD

14 years agomodules: pull in most of FreeBSD's module linker changes
Simon Schubert [Thu, 3 Sep 2009 23:17:18 +0000 (01:17 +0200)]
modules: pull in most of FreeBSD's module linker changes

The big user-visible difference is that the module dependency
system changed.  Module dependencies are now the same as for
the loader, and the hack linker (and Makefile) magic is not
needed anymore.

Obtained-from:  FreeBSD

14 years agomodules: disable dummy module declarations
Simon Schubert [Thu, 3 Sep 2009 20:45:30 +0000 (22:45 +0200)]
modules: disable dummy module declarations

dummy modules serve a questionable goal and conflict with the
module linker update.

14 years agomodules: drop a.out module support
Simon Schubert [Thu, 3 Sep 2009 20:29:02 +0000 (22:29 +0200)]
modules: drop a.out module support

14 years agoamd64: declare initializecpu outside of SMP
Simon Schubert [Thu, 3 Sep 2009 20:41:01 +0000 (22:41 +0200)]
amd64: declare initializecpu outside of SMP

initializecpu() is not a SMP-only function; we have to
always declare it.  smp.h is the wrong file, but I didn't
find any better location.

14 years agoacpi: restructure genwakecode.sh
Simon Schubert [Thu, 3 Sep 2009 20:34:03 +0000 (22:34 +0200)]
acpi: restructure genwakecode.sh

genwakecode.sh used some obscure hexdump/sed magic to embed a binary
into source.  The specific usage of sed breaks in at least the UTF-8
locale.  Rework the script to use hexdump and sed in a less obscure
way.

14 years agoHAMMER Util - hammer iostats now reports undo space used.
Matthew Dillon [Thu, 3 Sep 2009 20:37:20 +0000 (13:37 -0700)]
HAMMER Util - hammer iostats now reports undo space used.

14 years agoHAMMER - Add vfs.hammer.stats_undo
Matthew Dillon [Thu, 3 Sep 2009 20:36:32 +0000 (13:36 -0700)]
HAMMER - Add vfs.hammer.stats_undo

* Statistics on number of bytes of undo space written.

14 years agoCAM - Check DA media on open, basic suppor for removable DA media (vs CD).
Matthew Dillon [Thu, 3 Sep 2009 15:26:26 +0000 (08:26 -0700)]
CAM - Check DA media on open, basic suppor for removable DA media (vs CD).

* Install setdiskinfo on probe for DA if no media is present, similar to how
  the CD works.  This allows open() to function.

* Recheck media presence on open().

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 3 Sep 2009 15:25:26 +0000 (08:25 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoHAMMER - Fix lost inode issue (primarily with nohistory mounts)
Matthew Dillon [Thu, 3 Sep 2009 15:18:43 +0000 (08:18 -0700)]
HAMMER - Fix lost inode issue (primarily with nohistory mounts)

* When a HAMMER cursor is unlocked it becomes tracked and unrelated
  B-Tree operations will cause the tracked cursor's nodes and indices
  to be updated.  The cursor structure also has a leaf element pointer
  which was not being properly updated.  This could lead to panics and
  lost inodes.

  Properly adjust the leaf element pointer in tracked cursors.

* The bug primarily occurs with nohistory mounts or nohistory sub-trees
  due to the larger number of physical deletions made to the B-Tree, but
  could also occur (rarely) with normal mounts.

* Add additional assertions to catch any further occurrences (though I
  think all the cases have been covered now).

* Add a new sysctl vfs.hammer.error_panic which can be set to e.g. 9 to
  cause critical errors to panic immediately instead of returning
  through the call stack, making debugging possible.

Reported-by: Numerous people
14 years agosubr_disk - add debug info
Alex Hornung [Thu, 3 Sep 2009 13:18:25 +0000 (14:18 +0100)]
subr_disk - add debug info

* Add tunable and sysctl int kern.disk_debug which enables debug info
  in critical parts of subr_disk (probing, creating, unprobing,
  destroying).

14 years agoacpi_wakeup - Mark used vars with attribute used
Alex Hornung [Thu, 3 Sep 2009 07:57:34 +0000 (08:57 +0100)]
acpi_wakeup - Mark used vars with attribute used

* Mark obscurely used variables (such as variables only used from inside
  inline assembly) with __attribute__((used)).
  This also solves an issue with llvm/clang.

14 years agomxge - Avoid using #cpu
Alex Hornung [Thu, 3 Sep 2009 07:54:41 +0000 (08:54 +0100)]
mxge - Avoid using #cpu

* Don't use #cpu preprocessor macro, as it isn't needed. CPU is detected
  properly by defines as CPU __CPU__ __CPU.
  This also fixes compilation problems with llvm/clang.

14 years agolinuxemu - fix typo
Alex Hornung [Thu, 3 Sep 2009 09:33:22 +0000 (10:33 +0100)]
linuxemu - fix typo

* Commit e54488bbec5c9f80e95cedd395b0e3d31fde253d introduced a typo
  in linux_file breaking anything using linux getdents stuff.
  This also fixes issue 1471 and brings linuxulator back into working
  condition.

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1471
Reported-By: ftigeot
14 years agoTCP - Reduce context switching when handling large send*() or write()'s
Matthew Dillon [Thu, 3 Sep 2009 05:15:12 +0000 (22:15 -0700)]
TCP - Reduce context switching when handling large send*() or write()'s

* Large sends or writes would cause sosend() to sleep and wakeup for every
  tcp segment acknowledged, resulting in massive inefficiencies.  To deal
  with this, if no LOWAT is set we automatically set the LOWAT to 1/2 the
  send buffer size and adjust the wakeup code.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 3 Sep 2009 05:12:06 +0000 (22:12 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoNFE - Fix bug with imtimer transitions and improve performance
Matthew Dillon [Thu, 3 Sep 2009 05:06:22 +0000 (22:06 -0700)]
NFE - Fix bug with imtimer transitions and improve performance

* When the imtimer transitions to a new state via a sysctl the
  code called ifp->if_init() which more often then not caused
  the device to stop taking all interrupts.

* Change the way dynamic interrupt moderation works.  Timer moderation is
  not turned on until the discrete interrupt rate exceeds the threshold.
  e.g. by default 500uS is 2000 interrupts/second so timer moderation
  is not turned on until the discrete interrupt rate exceeds 2000 ips.

  This allows the device to respond interactively as long as traffic levels
  are reasonable, before converting into moderation-timer-based batching.

  Timer moderation is turned off and we go back to discrete interrupts
  if the average rate over ~4 seconds falls below the threshold.

* Change the interrupt moderation default from 125uS to 500uS.  125uS can
  saturate the cpu if the interrupt line is shared with other devices.
  A larger moderation timer is also more reasonable now that discrete
  interrupts are left intact until the rate exceeds the threshold.

  The moderation timer should be roughly designed to deal with the txring
  and rxring size.

14 years agotest commit
Alexander Polakov [Wed, 2 Sep 2009 15:25:08 +0000 (19:25 +0400)]
test commit

14 years agocitrus: add a list of supported locales and build UTF8 by default.
Alexander Polakov [Wed, 2 Sep 2009 14:54:57 +0000 (18:54 +0400)]
citrus: add a list of supported locales and build UTF8 by default.

14 years agocitrus: fix libc_rtld build with STATIC_LOCALES set.
Alexander Polakov [Wed, 2 Sep 2009 13:38:51 +0000 (17:38 +0400)]
citrus: fix libc_rtld build with STATIC_LOCALES set.

Fix locales build for libc_rtld
Disabled locales for libc_rtld.

14 years agomake.conf(5): mention STATIC_LOCALES
Alexander Polakov [Wed, 2 Sep 2009 12:54:19 +0000 (16:54 +0400)]
make.conf(5): mention STATIC_LOCALES

14 years agolibobjc (gcc44): Don't build when NO_OBJC is set.
Sascha Wildner [Wed, 2 Sep 2009 13:17:55 +0000 (15:17 +0200)]
libobjc (gcc44): Don't build when NO_OBJC is set.

Reported-by: Venkatesh Srinivas
14 years agottyslot(3) - Update for unix98 ptys
Alex Hornung [Wed, 2 Sep 2009 08:12:58 +0000 (09:12 +0100)]
ttyslot(3) - Update for unix98 ptys

* Update ttyslot(3) to be compatible with unix98 ptys. This fixes
  problems with logins on unix98 ptys not appearing in utmp.

* ttyslot was calling rindex, which is invalid for unix98 pty files,
  so now we just strip "/dev/".

Obtained-from: FreeBSD

14 years agogetttyent(3) - Update for unix98 ptys
Alex Hornung [Wed, 2 Sep 2009 07:26:26 +0000 (08:26 +0100)]
getttyent(3) - Update for unix98 ptys

* Update getttyent(3) to be compatible with unix98 ptys. This fixes
  problems with logins on unix98 ptys not appearing in utmp.

Obtained-from: FreeBSD

14 years agowall(1) - Fix for unix98 ptys
Alex Hornung [Wed, 2 Sep 2009 06:26:29 +0000 (07:26 +0100)]
wall(1) - Fix for unix98 ptys

* Wall didn't know about unix98 ptys, so it errored out about too many
  slashes in the terminal name, as pts/X, still contains a slash.

Obtained-from: FreeBSD

14 years agolibc: locale support for static binaries.
Alexander Polakov [Tue, 1 Sep 2009 21:09:48 +0000 (01:09 +0400)]
libc: locale support for static binaries.

Compile a fixed set of locales definable by STATIC_LOCALES into libc.

Partially-Obtained-From: http://osdir.com/ml/os.netbsd.bugs/2002-09/msg00025.html
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1362

14 years agoamd64: sync missing functions/config from i386
Simon Schubert [Sun, 30 Aug 2009 08:55:58 +0000 (10:55 +0200)]
amd64: sync missing functions/config from i386

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 1 Sep 2009 18:22:22 +0000 (11:22 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoKernel - Minor cleanup.
Matthew Dillon [Tue, 1 Sep 2009 18:22:05 +0000 (11:22 -0700)]
Kernel - Minor cleanup.

14 years agoKernel - remove the old specfs trialings.
Matthew Dillon [Tue, 1 Sep 2009 18:21:28 +0000 (11:21 -0700)]
Kernel - remove the old specfs trialings.

14 years agoKernel - Disk - do not bother trying to read the MBR if media_size is 0
Matthew Dillon [Tue, 1 Sep 2009 18:18:57 +0000 (11:18 -0700)]
Kernel - Disk - do not bother trying to read the MBR if media_size is 0

* Do not bother trying to read the MBR if media_size is 0, typically
  indicating removable media with no media present.

14 years agoKernel - add missing crfree() calls to two linux emulation functions
Matthew Dillon [Tue, 1 Sep 2009 18:18:11 +0000 (11:18 -0700)]
Kernel - add missing crfree() calls to two linux emulation functions

14 years agoopenpty(3) - change to use unix98 ptys
Alex Hornung [Tue, 18 Aug 2009 17:50:26 +0000 (18:50 +0100)]
openpty(3) - change to use unix98 ptys

* Try, by default, to use unix98 ptys first. If they fail at any
  point, fall back to bsd ptys (/dev/[pt]ty*).

Partially-Obtained-From: FreeBSD

14 years agopty - Introduce unix98 ptys
Alex Hornung [Tue, 1 Sep 2009 13:00:15 +0000 (14:00 +0100)]
pty - Introduce unix98 ptys

* Add the clone base device, /dev/ptmx.

* Add TIOCISPTMASTER ioctl, which returns successfully if the
  device is a unix98 pty master.

* Add sysctl kern.pty_debug, default to 0, to control pty debug
  info printing.

* Remove old unix98 pty code, which was inactive and inherited
  from an initial implementation during devfs development.

* Add userland functions:
  - posix_openpt (is equivalent to opening /dev/ptmx)
  - ptsname (as described in standard but thread-safe)
  - unlockpt (no op)
  - grantpt (no op)

* Implement proper permissions for unix98 pty slaves.
  Set them to real uid - group "tty" - 0620 for
  the slave device, as specified in standard (for grantpt).
  Master's permissions don't matter as the device cannot be opened
  again.
  Set the permissions of the unix98 ptys to be overridable by
  setattr() as the old ptys are.

* Use the define UNIX98_PTYS to activate/deactivate the unix98
  pty code in tty_pty.c. By default it is enabled.

NOTE: due to the permission handling on cloning of the slave
      pty, grantpt is not needed and would only pose a security
      risk.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 1 Sep 2009 14:38:50 +0000 (07:38 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoMFS - Fix MFS size passed to kernel mfs component
Matthew Dillon [Tue, 1 Sep 2009 14:37:42 +0000 (07:37 -0700)]
MFS - Fix MFS size passed to kernel mfs component

* Half the size was being passed because fssize is adjusted by
  mkfs from a sector-based count to a filesystem-block-based count.
  This caused failures as the MFS filesystem filled up.

14 years agomath(3): Remove some dead initialization.
Sascha Wildner [Tue, 1 Sep 2009 12:00:49 +0000 (14:00 +0200)]
math(3): Remove some dead initialization.

In-discussion-with: Stathis Kamperis <ekamperi@gmail.com>

14 years agoELF - allow execution of shared objects
Alex Hornung [Tue, 1 Sep 2009 09:42:56 +0000 (10:42 +0100)]
ELF - allow execution of shared objects

* Allow execution of shared ELF objects by default.

* Add a sysctl kern.elf_exec_dyn, default to 1, to control permission
  to execute shared elf objects.

* Incidentally, this also makes PIE work, at least for basic testcases
  as ncal, whereis, ...

Obtained-from: FreeBSD
Reported-By: Hasso Tepper
14 years agoUse pseudo-device to specify number of precreated devs
Alex Hornung [Tue, 1 Sep 2009 06:55:15 +0000 (07:55 +0100)]
Use pseudo-device to specify number of precreated devs

* use pseudo-device <dev> <n> in the kernel config to specify
  the number of devices to precreate (<n>) for snp, tun, vn, bpf.

* The full rationale (for vn, snp, bpf and tun) is:
  - if NO pseudo-device foo is specified, 4 devices will be
    precreated.
  - if pseudo-device foo is specified, 4 devices will be
    precreated.
  - if pseudo-device foo N, where N > 1 is specified, N devices
    will be precreated.

14 years agorpc.statd(8): Fix 2 cases where syslog() was passed too many args.
Sascha Wildner [Tue, 1 Sep 2009 08:21:37 +0000 (10:21 +0200)]
rpc.statd(8): Fix 2 cases where syslog() was passed too many args.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 31 Aug 2009 21:54:43 +0000 (14:54 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoMFS - Fix mmap issues with files under MFS
Matthew Dillon [Mon, 31 Aug 2009 21:52:08 +0000 (14:52 -0700)]
MFS - Fix mmap issues with files under MFS

* MFS relied on specfs to supply a getpages function.  specfs no longer
  exists and MFS's constructed vnode did not point at devfs.

  Instead of synthesizing a vnode access the real devfs vnode associated
  with /dev/mfs%d.

* Remove the MFS vnops for its synthesized vnode.  MFS now uses a devfs
  vnode which uses the devfs vnops.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>:
14 years agovn - enable autocloning
Alex Hornung [Mon, 31 Aug 2009 18:18:32 +0000 (19:18 +0100)]
vn - enable autocloning

* Create /dev/vn as autoclone device, but keep precreating 4
  vn devices (vn0 .. vn3).

* When "vn" is specified to vnconfig instead of "vnXX", the vn
  device is cloned and the name of the new device is printed
  on screen in a message of the form:
  "Using: vn6".

* On detach of the vn device (vnconfig -u) the cloned device is
  destroyed. This only happens for cloned vn devices (vn4 ..vnX).

14 years agotap - Don't make_dev if dev already exists
Alex Hornung [Sun, 30 Aug 2009 17:44:30 +0000 (18:44 +0100)]
tap - Don't make_dev if dev already exists

* If the unit already exists when calling tap_clone_create,
find the corresponding cdev by calling
devfs_find_device_by_name.
* If the unit doesn't exist, call make_dev.
* Assert that dev != NULL before calling tapcreate()

Dragonfly-bug: http://bugs.dragonflybsd.org/issue1453
Reported-By: Rumko
14 years agotrek(6): Drop fast/slow modes and the broken autodetection
Sascha Wildner [Sun, 30 Aug 2009 09:58:32 +0000 (11:58 +0200)]
trek(6): Drop fast/slow modes and the broken autodetection

These modes were not documented in the manpage, the autodetect
logic was reversed (only terminals with baud < 1200 would get the fast
flag) and even the source was confused claiming this fast setting was
for terminals with baud > 300.

The only thing that changes is the automatic short range scan output
down when entering a new sector. Now the full report is shown always
but can still be somewhat customized.

Incidentally, this also obviates the need for termios. yay!

Submitted-by: Ulrich Spoerlein <uqs@spoerlein.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1470>

14 years agoSome small fixes in the iscsi manual pages.
Sascha Wildner [Sun, 30 Aug 2009 09:36:10 +0000 (11:36 +0200)]
Some small fixes in the iscsi manual pages.

14 years agomake_dev.9: Use .Dx and fix a typo.
Sascha Wildner [Sun, 30 Aug 2009 09:26:15 +0000 (11:26 +0200)]
make_dev.9: Use .Dx and fix a typo.

14 years agoFix registration issue in the devfs rc script.
Sascha Wildner [Sun, 30 Aug 2009 09:19:28 +0000 (11:19 +0200)]
Fix registration issue in the devfs rc script.

rc.d/devfs is not controlled by an _enable variable so just register properly
as being configured, so that later scripts indirectly depending on it will
not fail when being started by rcrun(8).

Reported-by: hasso
While here, add some comments about the scripts purpose and print rules files
as they are applied.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 30 Aug 2009 03:48:42 +0000 (20:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoKernel - replace unbounded uses of kvcprintf() and reduce stack use by devfs
Matthew Dillon [Sun, 30 Aug 2009 03:46:41 +0000 (20:46 -0700)]
Kernel - replace unbounded uses of kvcprintf() and reduce stack use by devfs

* Replace unbounded uses of kvcprintf() to guarantee that buffers do not
  overflow.

* Do not declare PATH_MAX buffers on the stack.  Use kvasnrprintf() or
  kmalloc() to allocate space.

* In make_autoclone_dev() fix an improper use of a buffer passed as the
  fmt argument to make_dev().

14 years agoKernel - add ksnrprintf() and friends.
Matthew Dillon [Sun, 30 Aug 2009 03:44:30 +0000 (20:44 -0700)]
Kernel - add ksnrprintf() and friends.

* Add ksnrprintf(), kvsnrprintf(), kvasnrprintf(), and kvasfree(),
  functions to replace unbounded uses of kvcprintf().

14 years agoFix some more typos in manual pages and messages.
Sascha Wildner [Sat, 29 Aug 2009 21:55:15 +0000 (23:55 +0200)]
Fix some more typos in manual pages and messages.

14 years agoFix typo: aquire -> acquire.
Sascha Wildner [Sat, 29 Aug 2009 21:04:45 +0000 (23:04 +0200)]
Fix typo: aquire -> acquire.

14 years agoFix installing from read-only ${.OBJDIR}
YONETANI Tomokazu [Fri, 28 Aug 2009 10:06:32 +0000 (19:06 +0900)]
Fix installing from read-only ${.OBJDIR}

By default, install command preserves mtime, and files in the source tree
always have older mtime than a file created by touch command, in this case
${.OBJDIR}/openssl/.dummy, even though it's created earlier by dependency.
Since .dummy is newer, header files get created in objdir at install target
and that requires write permission on ${.OBJDIR}.

14 years agoFix installing from read-only ${.OBJDIR}
YONETANI Tomokazu [Thu, 27 Aug 2009 08:06:34 +0000 (17:06 +0900)]
Fix installing from read-only ${.OBJDIR}

creating a file in beforeinstall target requires write permission
in ${.OBJDIR} on machines to run installworld, making it impossible
if mounted read-only via NFS.

14 years agomalloc.3: IMPLEMENTATION NOTES were moved to posix_memalign.3.
Sascha Wildner [Sat, 29 Aug 2009 02:20:37 +0000 (04:20 +0200)]
malloc.3: IMPLEMENTATION NOTES were moved to posix_memalign.3.

14 years agodevice.h: Properly tabify
Sascha Wildner [Fri, 28 Aug 2009 20:07:06 +0000 (22:07 +0200)]
device.h: Properly tabify

14 years agoUpdate the make_dev(9) manual page for devfs.
Sascha Wildner [Fri, 28 Aug 2009 20:06:35 +0000 (22:06 +0200)]
Update the make_dev(9) manual page for devfs.

Submitted-by: alexh
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 28 Aug 2009 17:54:21 +0000 (10:54 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoNFS - Fix remaining VM/BIO issues
Matthew Dillon [Fri, 28 Aug 2009 16:47:44 +0000 (09:47 -0700)]
NFS - Fix remaining VM/BIO issues

The only bug that could not be resolved by the previous commit is related
to the use of dynamic buffer sizing for the buffer that straddles the
EOF of the file.  For example, if a file is 32768+4127 bytes then the
second buffer cache buffer would have a size of 4127 bytes instead of
32768 bytes.  Because the EOF point can move around and NFS does not
keep good track of it buffers with weird sizes could build up in the
system and interfere with operations against backing VM pages.

In particular truncations followed by seek-write extensions would
interfere with mmap()'s areas around the original (now non-applicable)
truncation point.

It was not possible to fix this bug while still keeping the dynamic
buffer sizing, so this patch converts NFS's buffer cache operations
to use fixed-sized buffers in all cases.  This leads to more wasted
memory when dealing with small files and further optimizations may be
attempted in the future, but it seems to solve issues with BIO/VM
interactions.

* Fsx now survives an overnight pass.

* Buildworld now survives multiple passes when using a writable NFS /usr/obj.

* Fix umount sequencing.  Sometimes the rxthread would get into a
  reconnect loop and not exit.

14 years agoAdd iscsi_initiator(4) manual page to the build.
Sascha Wildner [Fri, 28 Aug 2009 11:21:34 +0000 (13:21 +0200)]
Add iscsi_initiator(4) manual page to the build.

14 years agodma: add TODO
Simon Schubert [Fri, 28 Aug 2009 11:00:33 +0000 (13:00 +0200)]
dma: add TODO

14 years agoMerge commit 'crater/master'
Simon Schubert [Fri, 28 Aug 2009 10:33:13 +0000 (12:33 +0200)]
Merge commit 'crater/master'

14 years agogcc44: install mm_malloc.h
Simon Schubert [Fri, 28 Aug 2009 10:29:46 +0000 (12:29 +0200)]
gcc44: install mm_malloc.h

14 years agogcc41: install mm_malloc.h
Simon Schubert [Fri, 28 Aug 2009 10:29:35 +0000 (12:29 +0200)]
gcc41: install mm_malloc.h

14 years agogcc44: update README.DELETED
Simon Schubert [Fri, 28 Aug 2009 10:29:04 +0000 (12:29 +0200)]
gcc44: update README.DELETED

14 years agoMerge branch 'vendor/GCC44'
Simon Schubert [Fri, 28 Aug 2009 10:28:55 +0000 (12:28 +0200)]
Merge branch 'vendor/GCC44'

14 years agogcc44: add forgotten file
Simon Schubert [Fri, 28 Aug 2009 10:28:45 +0000 (12:28 +0200)]
gcc44: add forgotten file

14 years agogcc41: update README.DELETED
Simon Schubert [Fri, 28 Aug 2009 10:26:29 +0000 (12:26 +0200)]
gcc41: update README.DELETED

14 years agoMerge branch 'vendor/GCC'
Simon Schubert [Fri, 28 Aug 2009 10:26:18 +0000 (12:26 +0200)]
Merge branch 'vendor/GCC'

14 years agogcc41: add forgotten file vendor/GCC
Simon Schubert [Fri, 28 Aug 2009 10:16:49 +0000 (12:16 +0200)]
gcc41: add forgotten file

14 years agoDEVFS - Change rc.d script and add rc.conf(5) entry
Matthias Schmidt [Fri, 28 Aug 2009 09:04:38 +0000 (11:04 +0200)]
DEVFS - Change rc.d script and add rc.conf(5) entry

- Only read the config file with devfsctl if the file is present and
  readable
- Add an entry to ec.conf(5)

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 28 Aug 2009 05:47:13 +0000 (22:47 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoKernel - Close VM/BIO races and document.o
Matthew Dillon [Fri, 28 Aug 2009 03:34:50 +0000 (20:34 -0700)]
Kernel - Close VM/BIO races and document.o

* Remove vfs_setdirty(), it is no longer used.
  Remove vfs_page_set_valid(), it is no longer used.
  Remove vfs_bio_set_valid(), it is no longer used.

* When acquiring a buffer with getblk() whos size differs from the
  buffer already cached, no longer destroy the VM pages backing
  the buffer after completing the write.  Instead just release
  the buffer so a new, larger one can be constructed.

  NFS buffers which straddle file EOF can remain cached after the
  file has been extended via seek/write or ftruncate, and their
  underlying VM pages may become dirty via mmap.  If the buffer
  is acquired later the underlying VM pages beyond the buffer's
  original b_bcount size must be retained, not destroyed.

* No longer try to clear the pmap modified bit from misc vm_page_*()
  functions.  In cases where we desire the pmap modified bit to be
  clear, it should *already* have been cleared in the run-up to the
  I/O.  Clearing it later may cause the buffer cache to lose track
  of the fact that underlying VM pages may have been modified again.

  NFS buffers use b_dirtyoff/b_dirtyend to determine what to actually
  write.  If the VM page is modified again the current write operation
  will not cover all the dirty parts of the buffer and another write
  will have to be issued.  Clearing the pmap modified bit at later
  stages did not properly track changes in b_dirtyoff/b_dirtyend and
  resulted in dirty data being lost.

* Implement vfs_clean_one_page() to deal with nearly all buffer cache vs
  backing VM page dirty->clean handling at the appropriate time.

  In addition, this function now detects the case where a buffer has
  B_NEEDCOMMIT set but the underlying VM page is dirty.  This
  function necessarily only clears the dirty bits associated
  with the buffer because buffer sizes are not necessarily page aligned,
  which is different from clearing ALL the dirty bits as the putpages
  code is able to do.  So the B_NEEDCOMMIT test is only against those
  dirty bits associated with the buffer.  If this is found to be the
  case the B_NEEDCOMMIT flag is cleared.

  This fixes a race where VM pages backing a dirty buffer which has gone
  through the phase-1 commit are dirtied via a mmap, and NFS then goes
  through with the phase-2 commit and throws the data away when it really
  needed to go back and do another phase-1 commit.

* In vnode_generic_put_pages() no longer clear the VM page dirty bits
  associated with bits of a file which extend past file EOF in the
  page straddling the EOF.  We used to do this with the idea that
  we would only clear the dirty bits up to the file EOF later on
  in the I/O completion code.

  However, this was too fragile.  If a page ended up with any dirty
  bits left set it would remain endless dirty and be reflushed forever.

  We now clear the dirty bits for the entire page after a putpages
  operation completes without error, and don't bother doing it
  prior to I/O initiation.

* Call nfs_meta_setsize() for both seek+write extensions (holes) and for
  ftruncate extensions (holes).

  nfs_meta_setsize() now deterministically adjusts the size of the buffer
  that was straddling the PRIOR EOF point, fixing an issue where
  write-extending a file to near the end of a nfs buffer boundary (32K),
  then seek-write extending it further by creating a hole, then
  mmap()ing the end of the first chunk and modifying data past the
  original write-extend point... would lose the extra data because
  the original buffer was still intact and was still sized for the
  original EOF.  This was difficult to reproduce because it only occurred
  if all the dirty bits got cleared when the original buffer is flushed,
  meaning the original write-extend point had to be within 511 bytes of
  the end of a 32K boundary.

14 years agodma: bump man page date
Simon Schubert [Thu, 27 Aug 2009 15:19:38 +0000 (17:19 +0200)]
dma: bump man page date

14 years agodma: man page cleanup
Simon Schubert [Thu, 27 Aug 2009 15:19:13 +0000 (17:19 +0200)]
dma: man page cleanup

14 years agodma: add recipient parsing from headers
Simon Schubert [Thu, 27 Aug 2009 20:20:38 +0000 (22:20 +0200)]
dma: add recipient parsing from headers

14 years agodma: convert to more extensible queue file format
Simon Schubert [Thu, 27 Aug 2009 16:24:50 +0000 (18:24 +0200)]
dma: convert to more extensible queue file format

14 years agodma: beautify queue listing output
Simon Schubert [Thu, 27 Aug 2009 15:23:09 +0000 (17:23 +0200)]
dma: beautify queue listing output

14 years agodma: add queue-only mode (no instant delivery attempt)
Simon Schubert [Thu, 27 Aug 2009 15:08:49 +0000 (17:08 +0200)]
dma: add queue-only mode (no instant delivery attempt)

This acts like the DEFER config option, just from the command line.

14 years agodma: move sender into queue
Simon Schubert [Thu, 27 Aug 2009 14:32:19 +0000 (16:32 +0200)]
dma: move sender into queue

14 years agodma: initialize queue structures
Simon Schubert [Thu, 27 Aug 2009 14:38:51 +0000 (16:38 +0200)]
dma: initialize queue structures

14 years agodma: factor out mail handling code
Simon Schubert [Thu, 27 Aug 2009 11:52:43 +0000 (13:52 +0200)]
dma: factor out mail handling code

14 years agogames/quiz: add another president answer section and update data
Simon Schubert [Thu, 27 Aug 2009 11:32:47 +0000 (13:32 +0200)]
games/quiz: add another president answer section and update data

Submitted-by: Ulrich Spoerlein
Taken-from:  FreeBSD ports

14 years agoppi.4: remove wrong statement
Simon Schubert [Wed, 26 Aug 2009 00:46:59 +0000 (02:46 +0200)]
ppi.4: remove wrong statement

14 years agoinstaller: Enable writing to the disk label area prior to wiping it.
Sascha Wildner [Thu, 27 Aug 2009 07:13:22 +0000 (09:13 +0200)]
installer: Enable writing to the disk label area prior to wiping it.

While here, move the few lines of fn_create_subpartitions() to flow.c.

Suggested-by: dillon
Reported-by: <elekktretterr@exemail.com.au>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1461>

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

14 years agoKernel - fix access checks
Matthew Dillon [Wed, 26 Aug 2009 17:40:41 +0000 (10:40 -0700)]
Kernel - fix access checks

* VOP_ACCESS() is used for more then just access().  UFS and other
  filesystems (but not HAMMER) were calling it in the open/create/rename/
  unlink paths.  The uid/gid must be used in those cases, not the ruid/rgid.

  Add a VOP_EACCESS() macro which passes the appropriate flag to use the
  uid/gid instead of the ruid/rgid, and adjust the filesystems to use this
  macro.

Reported-by: Stathis Kamperis <ekamperi@gmail.com>
14 years agoAutomatic login isn't the default any more.
Hasso Tepper [Wed, 26 Aug 2009 08:41:15 +0000 (11:41 +0300)]
Automatic login isn't the default any more.

Reported-by: matthias@
14 years agoAdd LIBEDIT_MAJOR and LIBEDIT_MINOR defines.
Hasso Tepper [Wed, 26 Aug 2009 08:37:17 +0000 (11:37 +0300)]
Add LIBEDIT_MAJOR and LIBEDIT_MINOR defines.

Some thirdparty software pieces use these to detect usability of the
libedit.

Obtained-from: NetBSD

14 years agoOops, remove the correct file via 'make upgrade' (gcc41 -> gcc34).
Sascha Wildner [Wed, 26 Aug 2009 07:53:22 +0000 (09:53 +0200)]
Oops, remove the correct file via 'make upgrade' (gcc41 -> gcc34).

Noticed-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
14 years agoAMD64 - Ansification of fsx to deal with misc 64-bit issues.
Matthew Dillon [Wed, 26 Aug 2009 07:04:47 +0000 (00:04 -0700)]
AMD64 - Ansification of fsx to deal with misc 64-bit issues.

14 years agoAMD64 - Fix minor issues.
Matthew Dillon [Wed, 26 Aug 2009 07:02:05 +0000 (00:02 -0700)]
AMD64 - Fix minor issues.

* Stop kgdb from looping forever if it comes across a bad address
  during the thread scan.

* livkvm prints the correct address for the invalid address message
  instead of truncating it to 32 bits.

14 years agoKernel - Clean up conditionals to make them more readable (no real code chg)
Matthew Dillon [Wed, 26 Aug 2009 05:49:41 +0000 (22:49 -0700)]
Kernel - Clean up conditionals to make them more readable (no real code chg)