dragonfly.git
13 years agoImprove portability of patch(1):
Joerg Sonnenberger [Mon, 10 Apr 2006 08:11:43 +0000 (08:11 +0000)]
Improve portability of patch(1):
- basename(3) and dirname(3) can either return a pointer to
  static storage (like on all BSDs) or modify the argument
  (like on Linux). strdup the argument to support both.
- fix argument range of ctype macros.

13 years agoRemove debugging printfs.
Matthew Dillon [Sun, 9 Apr 2006 20:47:56 +0000 (20:47 +0000)]
Remove debugging printfs.

Reported-by: Csaba Henk <csaba.henk@creo.hu>
13 years agoFix one place where the superblock was being read (and written) at the
Matthew Dillon [Sun, 9 Apr 2006 20:07:43 +0000 (20:07 +0000)]
Fix one place where the superblock was being read (and written) at the
wrong offset (due to the recent BUF/BIO work), and normalize all superblock
ops to use SBOFF.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
13 years agoFollowup last commit, fix missing argument to vinitvmio().
Matthew Dillon [Sun, 9 Apr 2006 17:56:48 +0000 (17:56 +0000)]
Followup last commit, fix missing argument to vinitvmio().

13 years agoGet rid of bogus 'pushing active' reports. Initialize a VM object for VREG
Matthew Dillon [Sun, 9 Apr 2006 17:51:28 +0000 (17:51 +0000)]
Get rid of bogus 'pushing active' reports.  Initialize a VM object for VREG
vnodes.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
13 years agoThere are no manual pages for hosts.allow and hosts.deny.
Sascha Wildner [Sat, 8 Apr 2006 21:57:05 +0000 (21:57 +0000)]
There are no manual pages for hosts.allow and hosts.deny.

Use .Pa for filenames and fix references.

13 years agos/pthread_mutex_create/pthread_mutex_init/
Sascha Wildner [Sat, 8 Apr 2006 20:55:59 +0000 (20:55 +0000)]
s/pthread_mutex_create/pthread_mutex_init/

13 years agoAdd MLINKS for all functions.
Sascha Wildner [Sat, 8 Apr 2006 20:16:45 +0000 (20:16 +0000)]
Add MLINKS for all functions.

13 years agoAdd missing isnormal(3) manual page.
Sascha Wildner [Sat, 8 Apr 2006 14:12:36 +0000 (14:12 +0000)]
Add missing isnormal(3) manual page.

13 years agoThe new bridge(4) manual page somehow never found its way into the Makefile.
Sascha Wildner [Sat, 8 Apr 2006 12:48:16 +0000 (12:48 +0000)]
The new bridge(4) manual page somehow never found its way into the Makefile.

13 years agoRemove references to multibyte(3) which is no longer there.
Sascha Wildner [Sat, 8 Apr 2006 08:57:00 +0000 (08:57 +0000)]
Remove references to multibyte(3) which is no longer there.

13 years agoAdd section numbers to references and fix .Xr abuse
Sascha Wildner [Sat, 8 Apr 2006 08:17:07 +0000 (08:17 +0000)]
Add section numbers to references and fix .Xr abuse

13 years agoUse .St for references to standards.
Sascha Wildner [Sat, 8 Apr 2006 07:23:35 +0000 (07:23 +0000)]
Use .St for references to standards.

13 years agoPut the 'V' option back in.
Sascha Wildner [Fri, 7 Apr 2006 16:44:51 +0000 (16:44 +0000)]
Put the 'V' option back in.

It was accidentally removed with the last commit.

Submitted-by: Kevin L. Kane <kevin.kane@gmail.com>
13 years agoUse the branch prediction macros in sys/cdefs.h.
David Xu [Fri, 7 Apr 2006 14:11:22 +0000 (14:11 +0000)]
Use the branch prediction macros in sys/cdefs.h.

13 years agoAdd compiler branch prediction hint macros, obtained from FreeBSD.
David Xu [Fri, 7 Apr 2006 14:09:59 +0000 (14:09 +0000)]
Add compiler branch prediction hint macros, obtained from FreeBSD.

13 years agoTweak source code a bit to make gcc to generate better code.
David Xu [Fri, 7 Apr 2006 13:53:50 +0000 (13:53 +0000)]
Tweak source code a bit to make gcc to generate better code.
Update copyright.

13 years agoMore mdoc cleanup.
Sascha Wildner [Fri, 7 Apr 2006 09:57:37 +0000 (09:57 +0000)]
More mdoc cleanup.

13 years agoDue to continuing issues with VOP_READ/VOP_WRITE ops being called without
Matthew Dillon [Fri, 7 Apr 2006 06:38:33 +0000 (06:38 +0000)]
Due to continuing issues with VOP_READ/VOP_WRITE ops being called without
a VOP_OPEN, particularly by NFS, redo the way VM objects are associated
with vnodes.

* The size of the object is now passed to vinitvmio().  vinitvmio() no
  longer calls VOP_GETATTR().

* Instead of trying to call vinitvmio() conditionally in various places,
  we now call it unconditionally when a vnode is instantiated if
  the filesystem at any time in the future intends to use the buffer
  cache to access that vnode's dataspace.

* Specfs 'disk' devices are an exception.  Since we cannot safely do I/O
  on such vnodes if they have not been VOP_OPEN()'ed anyhow, the VM objects
  for those vnodes are still only associated on open.

The performance impact is limited to the case where large numbers of vnodes
are being created and destroyed.  This case only occurs when a large
directory topology (number of files > kernel's vnode cache) is traversed
and all related inodes are cached by the system.  Being a pure-cpu case
the slight loss of performance due to the VM object allocations is
not really a big dael.

13 years agoUnlock recursive mutex in pthread_cond_wait, though this is arguable.
David Xu [Thu, 6 Apr 2006 23:50:13 +0000 (23:50 +0000)]
Unlock recursive mutex in pthread_cond_wait, though this is arguable.

13 years ago* Add documentation for the batch and lastcpu keywords.
Sascha Wildner [Thu, 6 Apr 2006 17:26:54 +0000 (17:26 +0000)]
* Add documentation for the batch and lastcpu keywords.

* Remove documentation for the poip, uprocp and upr keywords.

* Update the flags description from proc.h.

* General mdoc overhaul.

* Add a HISTORY section (taken from FreeBSD).

There's probably more work to be done here.

13 years agoChange forgotten getinoquota to ext2_getinoquota to fix building
Sascha Wildner [Thu, 6 Apr 2006 17:04:30 +0000 (17:04 +0000)]
Change forgotten getinoquota to ext2_getinoquota to fix building
with 'options QUOTA'.

13 years agos/long/int
David Xu [Thu, 6 Apr 2006 13:05:35 +0000 (13:05 +0000)]
s/long/int

13 years agoWARNS level 4 cleanup.
David Xu [Thu, 6 Apr 2006 13:03:09 +0000 (13:03 +0000)]
WARNS level 4 cleanup.

13 years agoAdd all pthread functions into libc namespace.
David Xu [Thu, 6 Apr 2006 13:02:12 +0000 (13:02 +0000)]
Add all pthread functions into libc namespace.

13 years agoAdd function prototypes: pthread_atfork, pthread_attr_getguardsize,
David Xu [Thu, 6 Apr 2006 13:00:44 +0000 (13:00 +0000)]
Add function prototypes: pthread_atfork, pthread_attr_getguardsize,
pthread_attr_setguardsize.

13 years agoSynchronize vinitvmio() calls from UFS to EXT2FS.
Matthew Dillon [Wed, 5 Apr 2006 21:06:22 +0000 (21:06 +0000)]
Synchronize vinitvmio() calls from UFS to EXT2FS.

Reported-by: Csaba Henk <csaba.henk@creo.hu>
13 years agoUnconditionally initialize a VM object for a directory vnode. Continue
Matthew Dillon [Wed, 5 Apr 2006 20:22:30 +0000 (20:22 +0000)]
Unconditionally initialize a VM object for a directory vnode.  Continue
to try to optimize (skip) initialization for file vnodes that are only
STATed.

13 years agoMove some global variables into its module, remove priority mutex code
David Xu [Wed, 5 Apr 2006 12:12:23 +0000 (12:12 +0000)]
Move some global variables into its module, remove priority mutex code
which does not work correctly.

13 years agoUnbreak buildworld.
David Xu [Wed, 5 Apr 2006 06:53:27 +0000 (06:53 +0000)]
Unbreak buildworld.

13 years agoPull in all symbols needed for static binary.
David Xu [Wed, 5 Apr 2006 00:48:50 +0000 (00:48 +0000)]
Pull in all symbols needed for static binary.

13 years agoConvert weak reference to strong reference so that static library
David Xu [Wed, 5 Apr 2006 00:24:36 +0000 (00:24 +0000)]
Convert weak reference to strong reference so that static library
will work better.

13 years agoTransplant all the UFS ops that EXT2 used to call into the EXT2 tree and
Matthew Dillon [Tue, 4 Apr 2006 17:34:32 +0000 (17:34 +0000)]
Transplant all the UFS ops that EXT2 used to call into the EXT2 tree and
reconnect it to the build.  Recent BUF/BIO work made most of the UFS tree
incompatible with EXT2FS.

Reported-by: Csaba Henk <csaba.henk@creo.hu>
13 years agoProperly calculate the ronly flag at unmount time.
Matthew Dillon [Tue, 4 Apr 2006 16:50:44 +0000 (16:50 +0000)]
Properly calculate the ronly flag at unmount time.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
13 years agoUpdate UMTX_LOCKED and add UMTX_CONTESTED macro.
David Xu [Tue, 4 Apr 2006 14:23:04 +0000 (14:23 +0000)]
Update UMTX_LOCKED and add UMTX_CONTESTED macro.

13 years agoRevamp the algorithm to acquire a contested lock, the intention
David Xu [Tue, 4 Apr 2006 14:04:39 +0000 (14:04 +0000)]
Revamp the algorithm to acquire a contested lock, the intention
is to reduce cache line ownership transfering on many-cpu system.

13 years agoBecause multiple opens of /dev/tty only issue one actual open to the
Matthew Dillon [Mon, 3 Apr 2006 21:32:23 +0000 (21:32 +0000)]
Because multiple opens of /dev/tty only issue one actual open to the
underlying tty, unconditionally use FREAD|FWRITE for the VOP_OPEN/VOP_CLOSE
calls.  Otherwise the modes may not match up on final close.

Unconditionally reference the underlying tty when obtaining the lock for a
read or write of /dev/tty.  If we do not do this then it is possible for
the session reference to be ripped out from under us while we are obtaining
the lock and for the vnode to be reused for another purpose without our
knowledge.

Reported-by: Kyle Butt <kylebutt@gmail.com>
13 years agoufs_readdir() can be called from NFS with the vnode being opened, create
Matthew Dillon [Mon, 3 Apr 2006 02:18:22 +0000 (02:18 +0000)]
ufs_readdir() can be called from NFS with the vnode being opened, create
a VM object if necessary.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
13 years agoA number of structures related to UFS and QUOTAS have changed name.
Matthew Dillon [Mon, 3 Apr 2006 02:02:37 +0000 (02:02 +0000)]
A number of structures related to UFS and QUOTAS have changed name.

dinode -> ufs1_dinode
dqblk -> ufs_dqblk (and other quota related structures)

In addition, a large number of UFS related structures and procedures have
been prefixed with 'ufs_' to allow us to split off EXT2FS.

ufs_daddr_t has been moved out of sys/types.h and into vfs/ufs/dinode.h.

The #ifndef header file checks for UFS have been normalized.

13 years agoA number of structures related to UFS and QUOTAS have changed name.
Matthew Dillon [Mon, 3 Apr 2006 01:59:28 +0000 (01:59 +0000)]
A number of structures related to UFS and QUOTAS have changed name.

dinode -> ufs1_dinode
dqblk -> ufs_dqblk (and other quota related structures)

13 years agoA number of structures related to UFS and QUOTAS have changed name.
Matthew Dillon [Mon, 3 Apr 2006 01:58:49 +0000 (01:58 +0000)]
A number of structures related to UFS and QUOTAS have changed name.

dinode -> ufs1_dinode
dqblk -> ufs_dqblk (and other quota related structures)

13 years agoDocument the use of SDT_SYS386IGT vs SDT_SYS386TGT when setting up the
Matthew Dillon [Sun, 2 Apr 2006 20:50:33 +0000 (20:50 +0000)]
Document the use of SDT_SYS386IGT vs SDT_SYS386TGT when setting up the
hardware exception table.

13 years agoA floating point fault (instead of DNA fault) can occur when the TS bit
Matthew Dillon [Sun, 2 Apr 2006 20:43:27 +0000 (20:43 +0000)]
A floating point fault (instead of DNA fault) can occur when the TS bit
in CR0 is clear and will call npx_intr().  However, because we are using
a trap exception vector this fault does not disable interrupts and it is
possible for a preemption to come along after the fault is dispatched
before but npx_intr() has time to do anything.  This preemption can wind
up changing the FP state, causing npx_intr() to hit an assertion and panic
the machine.

Keep using the interrupt-enabled version of the vector (SDT_SYS386TGT
instead of SDT_SYS386IGT), but adjust npx_intr() to enter a critical
section to avoid getting the FP state ripped out from under it, then have
it check for the race case and call npxdna() as appropriate.  Document the
whole mess.

Reported-by: Sascha Wildner <saw@online.de>
Found-with: sysutils/crashme using crashme +2000 666 100 1:00:00 5

13 years agoSmall comma fixes.
Sascha Wildner [Sun, 2 Apr 2006 17:24:56 +0000 (17:24 +0000)]
Small comma fixes.

13 years agoUse .Cd for kernel options.
Sascha Wildner [Sun, 2 Apr 2006 16:50:05 +0000 (16:50 +0000)]
Use .Cd for kernel options.

13 years agoAdd a SYNOPSIS section and put the kernel config option there.
Sascha Wildner [Sun, 2 Apr 2006 08:42:30 +0000 (08:42 +0000)]
Add a SYNOPSIS section and put the kernel config option there.

13 years agoufs_dirempty() issues I/O on the directory vnode and needs to make sure
Matthew Dillon [Sun, 2 Apr 2006 04:13:40 +0000 (04:13 +0000)]
ufs_dirempty() issues I/O on the directory vnode and needs to make sure
that it has an associated VM object.

13 years agoBring in new ifconfig(8) from FreeBSD6. It is more modular and flexible with
Sepherosa Ziehau [Sun, 2 Apr 2006 03:33:59 +0000 (03:33 +0000)]
Bring in new ifconfig(8) from FreeBSD6.  It is more modular and flexible with
respect to supporting interface specific functionality.

Thank Sam Leffler and many other people for their work on ifconfig(8)

NOTE:
- There is no noticeable changes from users' point of view
- Three files have been left out: ifmac.c, ifcarp.c, ifpfsync.c
- Old ifieee80211.c is adapted to fit in the new ifconfig(8), newer one will
  be imported with the updating of netproto/802_11

Submitted-by: Andrew Atrens <atrens@nortel.com>
      Adrian Michael Nida <nida@musc.edu>

13 years agoGive the MFS pseudo block device vnode a VM object, as is now required
Matthew Dillon [Sun, 2 Apr 2006 01:35:34 +0000 (01:35 +0000)]
Give the MFS pseudo block device vnode a VM object, as is now required
for buffer cache operations.  Do not try to optimize it for now
(i.e. MFS will still double-cache everything).

13 years agoRequire that *ALL* vnode-based buffer cache ops be backed by a VM object.
Matthew Dillon [Sat, 1 Apr 2006 22:20:19 +0000 (22:20 +0000)]
Require that *ALL* vnode-based buffer cache ops be backed by a VM object.
No exceptions.  Start simplifying the getblk() based on the new requirements.

13 years agoClone cd9660_blkatoff() into a new procedure, cd9660_devblkatoff(), which
Matthew Dillon [Sat, 1 Apr 2006 21:55:13 +0000 (21:55 +0000)]
Clone cd9660_blkatoff() into a new procedure, cd9660_devblkatoff(), which
returns a devvp-relative buffer rather then the vp-relative buffer.  This
allows us to access meta-data relative to a vnode without having to
instantiate a VM object for that vnode.  The new function is used for
all directory scans and (negative offset) meta-data access.

This fixes a panic due to recent buffer cache commits that formalized
the requirements for using the buffer cache.

Also, prior to this change, the CD9660 filesystem was using B_MALLOC buffers
for a great deal of meta-data access that could very easily have been backed
by the device vnode's VM object instead.  B_MALLOC buffers have severe
caching limitations.  This commit fixes all of that as well.

13 years agoUse the vnode v_opencount and v_writecount universally. They were previously
Matthew Dillon [Sat, 1 Apr 2006 20:46:54 +0000 (20:46 +0000)]
Use the vnode v_opencount and v_writecount universally.  They were previously
only used by specfs.  Require that VOP_OPEN and VOP_CLOSE calls match.
Assert on boundary errors.

Clean up umount's FORCECLOSE mode.  Adjust deadfs to allow duplicate closes
(which can happen due to a forced unmount or revoke).

Add vop_stdopen() and vop_stdclose() and adjust the default vnode ops to
call them.  All VFSs except DEADFS which supply their own vop_open and
vop_close now call vop_stdopen() and vop_stdclose() to handle v_opencount
and v_writecount adjustments.

Change the VOP_OPEN/fp specs.  VOP_OPEN (aka vop_stdopen) is now responsible
for filling in the file pointer information, rather than the caller of
VOP_OPEN.  Additionally, when supplied a file pointer, VOP_OPEN is now
allowed to populate the file pointer with a different vnode then the one
passed to it, which will be used later on to allow filesystems which
synthesize different vnodes on open, for example so we can create a generic
tty/pty pairing devices rather than scanning for an unused pty, and so we
can create swap-backed generic anonymous file descriptors rather than having
to use /tmp.  And for other purposes as well.

Fix UFS's mount/remount/unmount code to make the proper VOP_OPEN and
VOP_CLOSE calls when a filesystem is remounted read-only or read-write.

13 years agoRemove owi(4) from build.
Sascha Wildner [Sat, 1 Apr 2006 10:08:36 +0000 (10:08 +0000)]
Remove owi(4) from build.

13 years agoRemove owi(4) (old wi) driver and adjust related bits.
Sascha Wildner [Sat, 1 Apr 2006 10:06:39 +0000 (10:06 +0000)]
Remove owi(4) (old wi) driver and adjust related bits.

It's been replaced by the more generic wi(4) driver since Sep 5, 2004.

13 years ago- Import driver[acx(4)] for TI acx100/acx111 based WiFi NIC.
Sepherosa Ziehau [Sat, 1 Apr 2006 02:55:36 +0000 (02:55 +0000)]
- Import driver[acx(4)] for TI acx100/acx111 based WiFi NIC.
- Import user space utility[acxcontrol(8)] to load firmware and show driver
  statistics.
- Add acx(4) and acxcontrol(8) man pages.
- Build acx(4) as module only, since it needs firmware to work.
- Add an entry for acx(4) in LINT.

This driver is known to work with following hardware:
D-Link DWL-520+
D-Link DWL-650+
D-Link DWL-G520+
D-Link DWL-G650+

Although both infrastructured mode and adhoc mode are supported, it may not
work well in adhoc mode.  PBCC based rate, 22Mbits/s, is not supported yet.

acxcontrl(8) and man pages are written by Sascha Wildner.  He also kindly
helped debugging and testing the driver.  Thank you, Sascha!

The meaning and layout of hardware registers are based on the reverse
engineering work done by people at acx100.sourceforge.net
Thank them for their great work!

This driver is initially based on acx100 developed by people at wlan.kewl.org
Thank them for their nice work.

13 years agoFix some special characters messed up in my last commit.
Sascha Wildner [Thu, 30 Mar 2006 12:02:13 +0000 (12:02 +0000)]
Fix some special characters messed up in my last commit.

13 years agoFix copy/paste error.
Sascha Wildner [Thu, 30 Mar 2006 11:09:08 +0000 (11:09 +0000)]
Fix copy/paste error.

13 years ago* Fix incorrect usage of \- (mathematical minus).
Sascha Wildner [Thu, 30 Mar 2006 09:52:48 +0000 (09:52 +0000)]
* Fix incorrect usage of \- (mathematical minus).

* Kill hard sentence break.

* Call the driver 'bktr' throughout the document.

* Add HARDWARE section and move the list of supported cards there.

* Use .Cd for configuration declarations.

* Change ports references to pkgsrc.

Except for the pkgsrc references, those were all taken from FreeBSD.

13 years agoFix a race condition between nlookup and vnode reclamation. Even though the
Matthew Dillon [Thu, 30 Mar 2006 02:39:48 +0000 (02:39 +0000)]
Fix a race condition between nlookup and vnode reclamation.  Even though the
cache_lock() refs a vnode to prevent reclamation, it is possible for a vnode
to already be in the middle of a reclamation as of the time the lock is
obtained.  Adjust cache_get*() and cache_resolve*() to check for the
condition and de-resolve the ncp before returning.

Reported-by: joerg@britannica.bec.de
13 years agoAdd missing callout_init.
Joerg Sonnenberger [Wed, 29 Mar 2006 23:17:16 +0000 (23:17 +0000)]
Add missing callout_init.

13 years agoffs_truncate(), called from, truncate(), remove(), rmdir(), rename-overwrite,
Matthew Dillon [Wed, 29 Mar 2006 21:59:57 +0000 (21:59 +0000)]
ffs_truncate(), called from, truncate(), remove(), rmdir(), rename-overwrite,
etc, may also be called without an OPEN and requires a VM object to issue
buffer cache ops.

13 years agoNFS needs to instantiate a backing VM object for the vnode to read a symlink.
Matthew Dillon [Wed, 29 Mar 2006 21:07:21 +0000 (21:07 +0000)]
NFS needs to instantiate a backing VM object for the vnode to read a symlink.

13 years agoA VM object is now required for vnode-based buffer cache ops. This
Matthew Dillon [Wed, 29 Mar 2006 20:46:07 +0000 (20:46 +0000)]
A VM object is now required for vnode-based buffer cache ops.  This
is usually handled by VOP_OPEN but there are a few cases where UFS issues
buffer cache ops on vnodes that have not been opened, such as when creating
a new directory or softlink.

13 years agoPlug an fd leak and closedir() two directories.
Sascha Wildner [Wed, 29 Mar 2006 19:37:43 +0000 (19:37 +0000)]
Plug an fd leak and closedir() two directories.

Submitted-by: Robert Nagy
13 years agoRemove VOP_GETVOBJECT, VOP_DESTROYVOBJECT, and VOP_CREATEVOBJECT. Rearrange
Matthew Dillon [Wed, 29 Mar 2006 18:45:07 +0000 (18:45 +0000)]
Remove VOP_GETVOBJECT, VOP_DESTROYVOBJECT, and VOP_CREATEVOBJECT.  Rearrange
the VFS code such that VOP_OPEN is now responsible for associating a VM
object with a vnode.  Add the vinitvmio() helper routine.

13 years agoAdd PCI IDs for Intel's ICH7 and ICH7M ATA/SATA hardware, used in
Matthew Dillon [Tue, 28 Mar 2006 22:18:59 +0000 (22:18 +0000)]
Add PCI IDs for Intel's ICH7 and ICH7M ATA/SATA hardware, used in
Core Duo.  The hardware is currently untested.

Reported-by: Gabor MICSKO <gmicsko@szintezis.hu>
13 years agoAdd a RB_PREV() function which returns the previous node in a red-black
Matthew Dillon [Tue, 28 Mar 2006 22:17:05 +0000 (22:17 +0000)]
Add a RB_PREV() function which returns the previous node in a red-black
tree, similar to RB_NEXT(), and fix a bug in RB_GENERATE3().  RB_GENERATE3()
is not yet used in the system but will be used by CCMS.

13 years agoCorrect some minor bugs in the last patch to fix kernel compilation.
Matthew Dillon [Mon, 27 Mar 2006 17:01:18 +0000 (17:01 +0000)]
Correct some minor bugs in the last patch to fix kernel compilation.

13 years agoRemove trailing whitespace.
Sascha Wildner [Mon, 27 Mar 2006 16:45:44 +0000 (16:45 +0000)]
Remove trailing whitespace.

13 years agoRemove NQNFS support. The mechanisms are too crude to co-exist with
Matthew Dillon [Mon, 27 Mar 2006 16:19:00 +0000 (16:19 +0000)]
Remove NQNFS support.  The mechanisms are too crude to co-exist with
upcoming cache coherency management work and the original implementation
hacked up the NFS code pretty severely.

Move nqnfs_clientd() out of nfs_nqlease.c to a new file, nfs_kerb.c,
and rename it nfs_clientd().

13 years agoBe more jail friendly:
Joerg Sonnenberger [Mon, 27 Mar 2006 09:02:07 +0000 (09:02 +0000)]
Be more jail friendly:
- export jail id to userland, since sysctl users can't follow the prison
  pointer in ucred. this is backward-compatible in the sense that an old
  kernel does export "0" for all processes.
- teach ps(1) "jail" as formating keyword, fix a separate issue with
  lastcpu being incorrectly sorting and using the wrong formator
- teach killall(8) a new -j option, to select processes in a jail.
  make it skip the inner matching loop (for commands), if no argument
  is left to process

"I want an easy way to reboot a jail" -- drhodus@
That's the base, let's see who implements the rest.

MFC: 2006/04/03

13 years agoRemove redundant .Pp.
Sascha Wildner [Mon, 27 Mar 2006 07:36:39 +0000 (07:36 +0000)]
Remove redundant .Pp.

13 years agoMove .Pp outside of display.
Sascha Wildner [Mon, 27 Mar 2006 07:35:45 +0000 (07:35 +0000)]
Move .Pp outside of display.

13 years agoChange *_pager_allocate() to take off_t instead of vm_ooffset_t. The
Matthew Dillon [Mon, 27 Mar 2006 01:54:18 +0000 (01:54 +0000)]
Change *_pager_allocate() to take off_t instead of vm_ooffset_t.  The
actual underlying type (a 64 bit signed integer) is the same.   Recent and
upcoming work is standardizing on off_t.

Move object->un_pager.vnp.vnp_size to vnode->v_filesize.  As before, the
field is still only valid when a VM object is associated with the vnode.

13 years agoRemove redundant .Pp macros right before .El, .Sh and .Ss.
Sascha Wildner [Sun, 26 Mar 2006 22:56:58 +0000 (22:56 +0000)]
Remove redundant .Pp macros right before .El, .Sh and .Ss.

13 years agostruct buf's b_bcount field has been changed from long to int. Adjust
Sascha Wildner [Sun, 26 Mar 2006 07:56:54 +0000 (07:56 +0000)]
struct buf's b_bcount field has been changed from long to int. Adjust
printf() formats accordingly to silence compiler warnings.

13 years agoClean up the extended lookup features in the red-black tree code.
Matthew Dillon [Sat, 25 Mar 2006 21:46:38 +0000 (21:46 +0000)]
Clean up the extended lookup features in the red-black tree code.

13 years agoRemove unused variable.
Sascha Wildner [Sat, 25 Mar 2006 21:31:21 +0000 (21:31 +0000)]
Remove unused variable.

13 years agob_resid and b_bcount are int, so use %d.
Sascha Wildner [Sat, 25 Mar 2006 21:30:41 +0000 (21:30 +0000)]
b_resid and b_bcount are int, so use %d.

13 years agoKTR_VERBOSE's logging was being done outside 'if (ktr_buf[cpu]) {'
Sascha Wildner [Sat, 25 Mar 2006 21:28:07 +0000 (21:28 +0000)]
KTR_VERBOSE's logging was being done outside 'if (ktr_buf[cpu]) {'
but actually didn't make sense there. If ktr_buf is empty, there's
nothing to log and entry is not initialized.

Instead, do an early return when ktr_buf[cpu] is empty.

13 years agoAdd the initialization of blockoff back in, the variable is still used.
Matthew Dillon [Sat, 25 Mar 2006 18:55:48 +0000 (18:55 +0000)]
Add the initialization of blockoff back in, the variable is still used.

Reported-by: Sascha Wildner <saw@online.de>
13 years agoUndo the last commit. At the moment we require access to the structure
Matthew Dillon [Sat, 25 Mar 2006 18:32:35 +0000 (18:32 +0000)]
Undo the last commit.  At the moment we require access to the structure
to be serialized, and a great deal more work is required (not just a
critical section) to make it MP safe.  That is why there is an assertion
there instead of a critical section.

13 years agoProperly sort xrefs.
Sascha Wildner [Sat, 25 Mar 2006 16:18:24 +0000 (16:18 +0000)]
Properly sort xrefs.

13 years agoAdd options to allow the dump offset or system memory size (for the purposes
Matthew Dillon [Sat, 25 Mar 2006 07:46:58 +0000 (07:46 +0000)]
Add options to allow the dump offset or system memory size (for the purposes
of dump recovery) to be specified.

Submitted-by: Csaba Henk <csaba.henk@creo.hu>
13 years agoSanitize status message.
Matthew Dillon [Sat, 25 Mar 2006 07:44:14 +0000 (07:44 +0000)]
Sanitize status message.

Submitted-by: Csaba Henk <csaba.henk@creo.hu>
13 years agoregen
Sepherosa Ziehau [Sat, 25 Mar 2006 06:54:22 +0000 (06:54 +0000)]
regen

13 years ago- Change original TI's product ACX100 to ACX100A
Sepherosa Ziehau [Sat, 25 Mar 2006 06:52:44 +0000 (06:52 +0000)]
- Change original TI's product ACX100 to ACX100A
- Add device id of some TI WiFi chips

13 years agoSync fstat up to the changes made in msdosfsmount.h.
Matthew Dillon [Sat, 25 Mar 2006 05:47:14 +0000 (05:47 +0000)]
Sync fstat up to the changes made in msdosfsmount.h.

Submitted-by: Sascha Wildner <saw@online.de>
13 years ago- Fix following bugs:
Sepherosa Ziehau [Sat, 25 Mar 2006 04:14:05 +0000 (04:14 +0000)]
- Fix following bugs:
  o "use after free" in wi_pccard_probe()
  o attaching will continue even if firmware loading fails
- Remove trailing space

Obtained-from: FreeBSD
Submitted-by: Andrew Atrens <atrens@nortel.com>
              Adrian Michael Nida <nida@musc.edu>

13 years agomdoc nit
Sascha Wildner [Sat, 25 Mar 2006 03:05:03 +0000 (03:05 +0000)]
mdoc nit

13 years agoFix numerous translation problems in msdosfs, related to the recent BUF/BIO
Matthew Dillon [Fri, 24 Mar 2006 22:39:22 +0000 (22:39 +0000)]
Fix numerous translation problems in msdosfs, related to the recent BUF/BIO
work.  The source code was using 'bn' and 'cn' and 'lbn' interchangeability
to mean any one of device block number, logical cluster number, or disk
cluster number (which is relative to some weird offset), and sometimes
overloaded the same variable name with different types of block numbers.
This resulted in a number of errors when the code was initially translated
to 64 bit offsets.

Reported-by: David Rhodus
13 years agoApply post-install correction of +CONTEXT files. nrelease now also
Joerg Sonnenberger [Fri, 24 Mar 2006 20:19:32 +0000 (20:19 +0000)]
Apply post-install correction of +CONTEXT files. nrelease now also
needs pkg_admin.

13 years agoDon't just assume that the directory offset supplied by the user is
Matthew Dillon [Fri, 24 Mar 2006 19:08:52 +0000 (19:08 +0000)]
Don't just assume that the directory offset supplied by the user is
correct.  Validate the NFS directory entry for the offset supplied
before using its fields.

Reported-by: David Rhodus <drhodus@leaf.dragonflybsd.org>
13 years agoMajor BUF/BIO work commit. Make I/O BIO-centric and specify the disk or
Matthew Dillon [Fri, 24 Mar 2006 18:35:34 +0000 (18:35 +0000)]
Major BUF/BIO work commit.  Make I/O BIO-centric and specify the disk or
file location with a 64 bit offset instead of a 32 bit block number.

* All I/O is now BIO-centric instead of BUF-centric.

* File/Disk addresses universally use a 64 bit bio_offset now.  bio_blkno
  no longer exists.

* Stackable BIO's hold disk offset translations.  Translations are no longer
  overloaded onto a single structure (BUF or BIO).

* bio_offset == NOOFFSET is now universally used to indicate that a
  translation has not been made.  The old (blkno == lblkno) junk has all
  been removed.

* There is no longer a distinction between logical I/O and physical I/O.

* All driver BUFQs have been converted to BIOQs.

* BMAP, FREEBLKS, getblk, bread, breadn, bwrite, inmem, cluster_*,
  and findblk all now take and/or return 64 bit byte offsets instead
  of block numbers.  Note that BMAP now returns a byte range for the before
  and after variables.

13 years agoAdd missing commit for the VM load heuristic and page allocation rate
Matthew Dillon [Fri, 24 Mar 2006 18:30:33 +0000 (18:30 +0000)]
Add missing commit for the VM load heuristic and page allocation rate
limit code.  The rate limiting code was not being called.

13 years agoBump 1.5.2 for the preview tag, synchronized to just before the
Matthew Dillon [Fri, 24 Mar 2006 18:07:56 +0000 (18:07 +0000)]
Bump 1.5.2 for the preview tag, synchronized to just before the
buf/bio conversion to 64 bit offsets.

13 years agoanother forced commit from cvs-1.12.13 client to test log_accum.pl script
YONETANI Tomokazu [Fri, 24 Mar 2006 07:57:30 +0000 (07:57 +0000)]
another forced commit from cvs-1.12.13 client to test log_accum.pl script

13 years agoforced commit to test new log_accum.pl script
YONETANI Tomokazu [Fri, 24 Mar 2006 07:52:48 +0000 (07:52 +0000)]
forced commit to test new log_accum.pl script

13 years agoBackout the rest of 1.29. There are a number of issues with the other
Matthew Dillon [Fri, 24 Mar 2006 06:45:04 +0000 (06:45 +0000)]
Backout the rest of 1.29.  There are a number of issues with the other
system calls too that have to be resolved before we can mark these MPSAFE.

13 years agoHold MP lock for getppid(). As noted by Dillon getppid() is not MP safe.
David Rhodus [Thu, 23 Mar 2006 20:55:07 +0000 (20:55 +0000)]
Hold MP lock for getppid().  As noted by Dillon getppid() is not MP safe.
This need sthe MP lock for cases such as a parent dying and becoming
inherited by init.