dragonfly.git
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)

14 years agoAMD64 - Correct wire_count, statistics, and other pmap fixes and cleanups
Matthew Dillon [Wed, 26 Aug 2009 05:48:54 +0000 (22:48 -0700)]
AMD64 - Correct wire_count, statistics, and other pmap fixes and cleanups

14 years agoTesting - fix bugs in fsx related to 64-bit systems.
Matthew Dillon [Wed, 26 Aug 2009 05:43:44 +0000 (22:43 -0700)]
Testing - fix bugs in fsx related to 64-bit systems.

* FSX was assuming pointers fit in an int.

14 years agocdparanoia hacks - add ENOMEDIUM, fake out scsi_inquiry() in CAM headers.
Matthew Dillon [Wed, 26 Aug 2009 01:41:24 +0000 (18:41 -0700)]
cdparanoia hacks - add ENOMEDIUM, fake out scsi_inquiry() in CAM headers.

14 years agoKernel - Add scsi/scsi_sg linux-compatible SCSI pass through device
Matthew Dillon [Wed, 26 Aug 2009 01:40:34 +0000 (18:40 -0700)]
Kernel - Add scsi/scsi_sg linux-compatible SCSI pass through device

Taken-from: FreeBSD

14 years agoKernel - pass sysmsg through to ioctl.
Matthew Dillon [Wed, 26 Aug 2009 01:02:22 +0000 (18:02 -0700)]
Kernel - pass sysmsg through to ioctl.

* Pass the sysmsg through to the ioctl code so ioctls can set the return
  value.  A single linux ioctl from the SCSI sg code uses this feature.

14 years agoFix issue1314 - panic when exporting -public flag
Matthew Dillon [Tue, 25 Aug 2009 22:34:05 +0000 (15:34 -0700)]
Fix issue1314 - panic when exporting -public flag

* Double exclusive vnode lock was to blame.

Reported-by: Michael Neumann <mneumann@crater.dragonflybsd.org>
Testing-also-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 25 Aug 2009 19:39:08 +0000 (12:39 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agokernel - Add support for %z[d,x,etc].
Matthew Dillon [Tue, 25 Aug 2009 19:38:18 +0000 (12:38 -0700)]
kernel - Add support for %z[d,x,etc].

* %z used to be used for hex printing.  Instead use it for
  size_t as per ANSI-C.

14 years agoAMD64 - Fix bug in mpstable pass 1 non-default configuration
Matthew Dillon [Tue, 25 Aug 2009 19:36:32 +0000 (12:36 -0700)]
AMD64 - Fix bug in mpstable pass 1 non-default configuration

* cth was not being converted from a physical to a virtual address via
  the DMAP.

14 years agoAMD64 - Fix format conversions and other warnings.
Matthew Dillon [Tue, 25 Aug 2009 19:35:08 +0000 (12:35 -0700)]
AMD64 - Fix format conversions and other warnings.

14 years agoAMD64 - Adjust _pmap_allocpte() to handle races.
Matthew Dillon [Tue, 25 Aug 2009 17:25:01 +0000 (10:25 -0700)]
AMD64 - Adjust _pmap_allocpte() to handle races.

* The vm_page_grab() can block, resulting in a race.  Deal with the case
  similarly to how the i386 code deals with it.

14 years agoWipe up kerberos remains via 'make upgrade'.
Sascha Wildner [Tue, 25 Aug 2009 16:57:08 +0000 (18:57 +0200)]
Wipe up kerberos remains via 'make upgrade'.

14 years agoWipe up gcc34 remains via 'make upgrade'.
Sascha Wildner [Tue, 25 Aug 2009 16:56:11 +0000 (18:56 +0200)]
Wipe up gcc34 remains via 'make upgrade'.

14 years agoAdd some MLINKS for cpp(1) and gcov(1) manual pages.
Sascha Wildner [Tue, 25 Aug 2009 16:50:01 +0000 (18:50 +0200)]
Add some MLINKS for cpp(1) and gcov(1) manual pages.

14 years agoClean up iSCSI options.
Sascha Wildner [Tue, 25 Aug 2009 14:42:43 +0000 (16:42 +0200)]
Clean up iSCSI options.

* There is no ISCSI_INITIATOR option, just the device.

* Add ISCSI_INITIATOR_DEBUG to LINT.

14 years agoMerge branch 'master' of git://chlamydia.fs.ei.tum.de/dragonfly
Matthias Schmidt [Tue, 25 Aug 2009 16:06:57 +0000 (18:06 +0200)]
Merge branch 'master' of git://chlamydia.fs.ei.tum.de/dragonfly

14 years agoDEVFS - Add rc.d script to Makefiles and examples file
Matthias Schmidt [Tue, 25 Aug 2009 16:06:22 +0000 (18:06 +0200)]
DEVFS - Add rc.d script to Makefiles and examples file

14 years agoDEVFS - Add rc.d script to load rules at startup
Matthias Schmidt [Tue, 25 Aug 2009 15:53:09 +0000 (17:53 +0200)]
DEVFS - Add rc.d script to load rules at startup

The script will load default rules from /etc/defaults/devfs.conf and
user supplied rules from /etc/devfs.conf

14 years agoAMD64 - Cleanup - Remove JGPMAP32 and READYx
Matthew Dillon [Tue, 25 Aug 2009 15:32:50 +0000 (08:32 -0700)]
AMD64 - Cleanup - Remove JGPMAP32 and READYx

14 years ago__DragonFly_version: bump after sleep function renames
Simon Schubert [Tue, 25 Aug 2009 15:24:52 +0000 (17:24 +0200)]
__DragonFly_version: bump after sleep function renames

14 years agoIPXrouted(8): Fix some amd64 warnings.
Sascha Wildner [Tue, 25 Aug 2009 12:59:41 +0000 (14:59 +0200)]
IPXrouted(8): Fix some amd64 warnings.

Taken-from: FreeBSD

14 years agovmstat(8): Fix some amd64 warnings.
Sascha Wildner [Tue, 25 Aug 2009 12:58:20 +0000 (14:58 +0200)]
vmstat(8): Fix some amd64 warnings.

Partly-taken-from: FreeBSD

14 years agotip(1): Fix some amd64 warnings.
Sascha Wildner [Tue, 25 Aug 2009 12:56:27 +0000 (14:56 +0200)]
tip(1): Fix some amd64 warnings.

Taken-from: FreeBSD

14 years agoman(1): Fix an amd64 warning and raise WARNS to 2.
Sascha Wildner [Tue, 25 Aug 2009 12:54:19 +0000 (14:54 +0200)]
man(1): Fix an amd64 warning and raise WARNS to 2.

14 years agoInstall sys/dev/disk/mpt/mpilib/*.h to /usr/include, too.
Sascha Wildner [Tue, 25 Aug 2009 12:53:25 +0000 (14:53 +0200)]
Install sys/dev/disk/mpt/mpilib/*.h to /usr/include, too.

<sys/mpt_ioctl.h> needs them.

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

14 years agoAMD64 - Fix dev_t tests in cpdup
Matthew Dillon [Tue, 25 Aug 2009 05:35:19 +0000 (22:35 -0700)]
AMD64 - Fix dev_t tests in cpdup

* cpdup was traversing mount points when it shouldn't have been, due
  to badly written st_dev tests.

14 years agodma: don't set it->mailf too early
Simon Schubert [Tue, 25 Aug 2009 00:22:04 +0000 (02:22 +0200)]
dma: don't set it->mailf too early

We may not set it->mailf in newspoolf(), or aquirespool() will not
(re-)open the mail file, leading to concurrent seeks.

Reported-by: Daniel Roethlisberger
DragonFly-Bug: <http://bugs.dragonflybsd.org/issue1462>

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Mon, 24 Aug 2009 23:51:14 +0000 (01:51 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agopriv: hammer expand not allowed within jail
Michael Neumann [Mon, 24 Aug 2009 23:33:36 +0000 (01:33 +0200)]
priv: hammer expand not allowed within jail

14 years agoKernel - more NFS fixes, more dirty bit fixes, remove vfs_bio_set_validclean()
Matthew Dillon [Mon, 24 Aug 2009 23:27:32 +0000 (16:27 -0700)]
Kernel - more NFS fixes, more dirty bit fixes, remove vfs_bio_set_validclean()

* Remove vfs_bio_set_validclean().  It is no longer needed.

* General getpages operations must clear dirty bits non-inclusive of
  the end of the range.  A read which partially overlaps dirty VM
  pages shouldn't happen in the first place but if it were to happen
  we don't want to lose the dirty status on the DEV_BSIZE'd chunk
  straddling the end of the read.

* General truncation support.  Replace previous fix with a call to
  a new inline, vm_page_clear_dirty_beg_nonincl().  Similar to
  the getpages() issue, we do not want to lose the dirty status
  on the DEV_BSIZE'd chunk straddling the beginning of a truncation.

  (side note: Only effecs NFS as all other filesystems DEV_BSIZE-align
  their operations, but a good general fix in anycase).

14 years agoNFS - Properly handle NFSv3 EOF short-reads
Matthew Dillon [Mon, 24 Aug 2009 22:41:42 +0000 (15:41 -0700)]
NFS - Properly handle NFSv3 EOF short-reads

* Short reads were not causing the remainder of the buffer to be
  zero'd out in all cases, causing the fsx filesystem test to fail.

* An EOF condition was sometimes improperly reporting a non-zero
  bp->b_resid.  Race against the server where the client's idea of
  the file size differs from the server could result in a non-zero
  bp->b_resid after a BIO.

  Zero out the remaining space and and set bp->b_resid to 0.  The
  NFS client code always specifies buffers within the bounds of
  the file.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
14 years agoKernel - Fix issues with vnode_pager_setsize() (effects NFS only)
Matthew Dillon [Mon, 24 Aug 2009 22:37:34 +0000 (15:37 -0700)]
Kernel - Fix issues with vnode_pager_setsize() (effects NFS only)

* When truncating a file to non-zero length, if the filesystem calls
  vnode_pager_setsize() with a truncation offset that is not a
  multiple of DEV_BSIZE vnode_pager_setsize() will improperly clear
  the dirty bit for the overlapping DEV_BSIZE'd block in the VM page
  straddling the truncation point.

  This only effects NFS.  The fsx filesystem test was failing due to
  a lost dirty page after a truncation.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
14 years agoISCSI - correct compiler errors due to recent divergences.
Matthew Dillon [Mon, 24 Aug 2009 16:09:24 +0000 (09:09 -0700)]
ISCSI - correct compiler errors due to recent divergences.

14 years agoBring in ISCSI initiator support.
Matthew Dillon [Mon, 24 Aug 2009 15:59:40 +0000 (08:59 -0700)]
Bring in ISCSI initiator support.

* Port ISCSI initiator support from FreeBSD.

* Additional work to help stabilize it.

Submitted-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
Taken-from: FreeBSD

14 years agoRename msleep() to ssleep().
Matthew Dillon [Mon, 24 Aug 2009 15:43:19 +0000 (08:43 -0700)]
Rename msleep() to ssleep().

* msleep() was taking a spinlock.  Rename to ssleep() as per old request
  from hsu.

* Our mtx functions currently use mtxsleep().  Leave msleep() unassigned
  to make porting easier.

14 years agoRename serialize_sleep() to zsleep()
Matthew Dillon [Mon, 24 Aug 2009 15:31:17 +0000 (08:31 -0700)]
Rename serialize_sleep() to zsleep()

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

14 years agofsync - Add sysctl to relax fsync requirements.
Matthew Dillon [Mon, 24 Aug 2009 15:16:14 +0000 (08:16 -0700)]
fsync - Add sysctl to relax fsync requirements.

* sysctl vfs.hammer.fsync_mode (defaults to 0 == full fsync semantics).

0 - full fsync semantics
1 - asynchronous
2 - synchronous fsync on close if fsync called prior to close
3 - asynchronous fsync on close if fsync called prior to close
4 - ignore fsync (30-second system sync takes care of it)

* This is likely a temporary measure until HAMMER gets a REDO log.
  It is mainly to facilitate testing and to reduce the pounding
  disks take from pkgsrc bulk builds (pkg_add seems to insist on
  calling fsync() a lot for no reason).

14 years agoAdd a flags argument to VOP_FSYNC()
Matthew Dillon [Mon, 24 Aug 2009 15:15:17 +0000 (08:15 -0700)]
Add a flags argument to VOP_FSYNC()

* So filesystem code knows whether it is being called from userland or not.

14 years agobrgphy: Add support for BCM5722
Sepherosa Ziehau [Mon, 24 Aug 2009 10:59:42 +0000 (18:59 +0800)]
brgphy: Add support for BCM5722

14 years agomiibus: miidevs.h regen
Sepherosa Ziehau [Mon, 24 Aug 2009 10:58:28 +0000 (18:58 +0800)]
miibus: miidevs.h regen

14 years agomiibus: Add PHY id for BCM5722
Sepherosa Ziehau [Mon, 24 Aug 2009 10:57:49 +0000 (18:57 +0800)]
miibus: Add PHY id for BCM5722

14 years agoremove more kerberos/heimdal
Simon Schubert [Mon, 24 Aug 2009 09:52:28 +0000 (11:52 +0200)]
remove more kerberos/heimdal

14 years agonfs: init real/saved uid/gid in server-side credentials
Nicolas Thery [Sun, 23 Aug 2009 19:04:21 +0000 (21:04 +0200)]
nfs: init real/saved uid/gid in server-side credentials

When unmarshalling a request, the server constructs a ucred
structure (nfsrv_descript.nd_cr) from the credential data in the
RPC.  It initializes only the effective uid and gid and leaves
the real and saved uid/gid unitialized.  This effectively sets
the real/effective ids to root because nd_cr is first
bzero()'ed.

As a consequence, now that accept(2) checks real uid/gid, all
accept calls to NFS files incorrectly succeed.

Fix this by initializing the real and saved uid/gid in nd_cr to
the same values as the real uid/gid (only the real uid/gid are
RPC'ed to the server).

NOTE: accept(2) and faccessat(2) to NFS files are still broken
in part because the client sends the effective uid/gid to the
server.  I'll fix this once I've groked the uid magic in the NFS
code.