]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
19 years agoDescribe the semantics of the sgetpwnam() helper function
Yaroslav Tykhiy [Sat, 30 Oct 2004 16:11:15 +0000 (16:11 +0000)]
Describe the semantics of the sgetpwnam() helper function
in the comment above it so that nobody will save pointers
returned inside "struct passwd" across the calls to the function.

19 years agoSave and restore state across suspend/resume events.
Ian Dowse [Sat, 30 Oct 2004 15:13:09 +0000 (15:13 +0000)]
Save and restore state across suspend/resume events.

Submitted by: David Gwynne <dlg@openbsd.org>
Obtained from: OpenBSD (+ extra patches supplied by David)

19 years agoWhitespace cleanup.
Dag-Erling Smørgrav [Sat, 30 Oct 2004 14:54:51 +0000 (14:54 +0000)]
Whitespace cleanup.

19 years agoDisable use of synchronization early in the boot by the MAC Framework;
Robert Watson [Sat, 30 Oct 2004 14:20:59 +0000 (14:20 +0000)]
Disable use of synchronization early in the boot by the MAC Framework;
for modules linked into the kernel or loaded very early, panics will
result otherwise, as the CV code it calls will panic due to its use
of a mutex before it is initialized.

19 years agoAdd a loader menu option to set hint.atkbd.0.flags=0x1 which allows USB
Brooks Davis [Sat, 30 Oct 2004 13:45:13 +0000 (13:45 +0000)]
Add a loader menu option to set hint.atkbd.0.flags=0x1 which allows USB
keyboards to work if no PS/2 keyboard is attached.  The position in the
menu was chosen to avoid moving option 6 (loader prompt).  This should
be a no-op on non-i386/amd64 machines.

19 years agoAllow to change interfaces name on boot time.
Pawel Jakub Dawidek [Sat, 30 Oct 2004 13:44:06 +0000 (13:44 +0000)]
Allow to change interfaces name on boot time.
Now, one should be able to put something like this into /etc/rc.conf:

ifconfig_fxp0_name="net0"
ifconfig_net0="inet 10.0.0.1/16"

Reviewed by: green

19 years agoMFi386: revision 1.599 (Preserve dcons(4) buffer passed by loader(8).)
Yoshihiro Takahashi [Sat, 30 Oct 2004 12:41:20 +0000 (12:41 +0000)]
MFi386: revision 1.599 (Preserve dcons(4) buffer passed by loader(8).)

19 years agoRemove a duplicate code.
Yoshihiro Takahashi [Sat, 30 Oct 2004 12:34:25 +0000 (12:34 +0000)]
Remove a duplicate code.

19 years ago - When choosing a thread on the run queue, check to see if its nice is
Jeff Roberson [Sat, 30 Oct 2004 12:19:15 +0000 (12:19 +0000)]
 - When choosing a thread on the run queue, check to see if its nice is
   outside of the nice threshold due to a recently awoken thread with a
   lower nice value.  This further reduces the amount of time a positively
   niced thread gets while running in conjunction with a workload that has
   many short sleeps (ie buildworld).

19 years agoCorrect a bug in TCP SACK that could result in wedging of the TCP stack
Robert Watson [Sat, 30 Oct 2004 12:02:50 +0000 (12:02 +0000)]
Correct a bug in TCP SACK that could result in wedging of the TCP stack
under high load: only set function state to loop and continuing sending
if there is no data left to send.

RELENG_5_3 candidate.

Feet provided: Peter Losher <Peter underscore Losher at isc dot org>
Diagnosed by: Aniel Hartmeier <daniel at benzedrine dot cx>
Submitted by: mohan <mohans at yahoo-inc dot com>

19 years agoMove if_handoff() from an inline in if_var.h to a function to if.c
Robert Watson [Sat, 30 Oct 2004 09:39:13 +0000 (09:39 +0000)]
Move if_handoff() from an inline in if_var.h to a function to if.c
in orden to harden the ABI for 5.x; this will permit us to modify
the locking in the ifnet packet dispatch without requiring drivers
to be recompiled.

MFC after: 3 days
Discussed at: EuroBSDCon Developer's Summit

19 years agoDocument support for the B&B Electronics USB->RS422/485 adapter.
Lukas Ertl [Sat, 30 Oct 2004 09:25:11 +0000 (09:25 +0000)]
Document support for the B&B Electronics USB->RS422/485 adapter.

Bump document date.

19 years agoAdd support for the B&B Electronics USB->RS422/485 adapter.
Lukas Ertl [Sat, 30 Oct 2004 09:21:44 +0000 (09:21 +0000)]
Add support for the B&B Electronics USB->RS422/485 adapter.

PR:            kern/73178
Submitted by:  Scott Price <prices@dflytech.com>

19 years agoAdd additional "spare" fields to 'struct ifnet' in order to improve
Robert Watson [Sat, 30 Oct 2004 08:45:13 +0000 (08:45 +0000)]
Add additional "spare" fields to 'struct ifnet' in order to improve
the resistance of the network driver ABI to changes that will be
required as we optimize locking.

MFC after: 3 days
Discussed at: Developer Summit

19 years ago - In sched_prio() check to see if the kse is assigned to a runq as the
Jeff Roberson [Sat, 30 Oct 2004 07:35:53 +0000 (07:35 +0000)]
 - In sched_prio() check to see if the kse is assigned to a runq as the
   check for TD_ON_RUNQ() no longer means the thread is really on a run-
   queue.  I suspect this state should be re-evaluated as it must mean
   something else now.  This fixes ULE+KSE+PREEMPTION on UP x86.

19 years agoAdd an assignment statement that I omitted from the previous revision.
Alan Cox [Sat, 30 Oct 2004 07:09:46 +0000 (07:09 +0000)]
Add an assignment statement that I omitted from the previous revision.

19 years agoAllow kill -9 to kill processes stuck in procfs STOPEVENTs.
Alfred Perlstein [Sat, 30 Oct 2004 02:56:22 +0000 (02:56 +0000)]
Allow kill -9 to kill processes stuck in procfs STOPEVENTs.

19 years agoAdd myself to the calendar
Michael Johnson [Sat, 30 Oct 2004 02:00:00 +0000 (02:00 +0000)]
Add myself to the calendar

Approved by: adamw(mentor)

19 years agoImplement per-CPU SYSMAPs, i.e., CADDR* and CMAP*, to reduce lock
Alan Cox [Fri, 29 Oct 2004 19:10:46 +0000 (19:10 +0000)]
Implement per-CPU SYSMAPs, i.e., CADDR* and CMAP*, to reduce lock
contention within pmap_zero_page() and pmap_copy_page().

19 years agoRemove si_mountpoint and si_bsize_phys from cdev.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:17:24 +0000 (11:17 +0000)]
Remove si_mountpoint and si_bsize_phys from cdev.

19 years agoLoose vfs_mountedon()
Poul-Henning Kamp [Fri, 29 Oct 2004 11:15:08 +0000 (11:15 +0000)]
Loose vfs_mountedon()

19 years agoDon't set si_bsize_phys.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:12:16 +0000 (11:12 +0000)]
Don't set si_bsize_phys.

Use bioq_takefirst()

19 years agoDon't set si_bsize_phys, nobody cares.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:11:44 +0000 (11:11 +0000)]
Don't set si_bsize_phys, nobody cares.

19 years agoDon't give disks special treatment, they don't come this way anymore.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:10:55 +0000 (11:10 +0000)]
Don't give disks special treatment, they don't come this way anymore.

19 years agoDon't set si_bszize_phys, nobody cares.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:09:50 +0000 (11:09 +0000)]
Don't set si_bszize_phys, nobody cares.

Use bioq_takefirst()

19 years agoNo point in setting si_bsize_phys anymore, nobody reads it.
Poul-Henning Kamp [Fri, 29 Oct 2004 11:09:21 +0000 (11:09 +0000)]
No point in setting si_bsize_phys anymore, nobody reads it.

Use bioq_takefirst().

19 years agoNow that filesystems respect and understand GEOM access counts, refuse
Poul-Henning Kamp [Fri, 29 Oct 2004 11:05:45 +0000 (11:05 +0000)]
Now that filesystems respect and understand GEOM access counts, refuse
a write open of a read-only floppydisk.

19 years agoRemove VOP_SPECSTRATEGY() from the system.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:59:28 +0000 (10:59 +0000)]
Remove VOP_SPECSTRATEGY() from the system.

19 years agoRemove the last call in the system to VOP_SPECSTRATEGY(): We can no
Poul-Henning Kamp [Fri, 29 Oct 2004 10:52:31 +0000 (10:52 +0000)]
Remove the last call in the system to VOP_SPECSTRATEGY():  We can no
longer come through the VNODE layer to the disks since all the filesystems
now go via geom_vfs to GEOM.

19 years agoMove NTFS to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:43:45 +0000 (10:43 +0000)]
Move NTFS to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove HPFS to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:43:07 +0000 (10:43 +0000)]
Move HPFS to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove EXT2FS to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:42:30 +0000 (10:42 +0000)]
Move EXT2FS to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove CD9660 to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:41:44 +0000 (10:41 +0000)]
Move CD9660 to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove UDF to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:40:58 +0000 (10:40 +0000)]
Move UDF to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove MSDOSFS to GEOM backing instead of DEVFS.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:40:14 +0000 (10:40 +0000)]
Move MSDOSFS to GEOM backing instead of DEVFS.

For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.

19 years agoMove UFS from DEVFS backing to GEOM backing.
Poul-Henning Kamp [Fri, 29 Oct 2004 10:15:56 +0000 (10:15 +0000)]
Move UFS from DEVFS backing to GEOM backing.

This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.

Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
syv# mount -p
/dev/md0        /var    ufs rw  2 2
/dev/ad0        /mnt    ufs ro  1 1
/dev/ad0        /mnt2   ufs ro  1 1
/dev/ad0        /mnt3   ufs ro  1 1

Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.

Details:

Add a geom consumer and a bufobj pointer to ufsmount.

Eliminate the vnode argument from softdep_disk_prewrite().
Pick the vnode out of bp->b_vp for now.  Eventually we
should find it through bp->b_bufobj->b_private.

In the mountcode, use g_vfs_open() once we have used
VOP_ACCESS() to check permissions.

When upgrading and downgrading between r/o and r/w do the
right thing with GEOM access counts.  Remove all the
workarounds for not being able to do this with VOP_OPEN().

If we are the root mount, drop the exclusive access count
until we upgrade to r/w.  This allows fsck of the root
filesystem and the MNT_RELOAD to work correctly.

Set bo_private to the GEOM consumer on the device bufobj.

Change the ffs_ops->strategy function to call g_vfs_strategy()

In ufs_strategy() directly call the strategy on the disk
bufobj.  Same in rawread.

In ffs_fsync() we will no longer see VCHR device nodes, so
remove code which synced the filesystem mounted on it, in
case we came there.  I'm not sure this code made sense in
the first place since we would have taken the specfs route
on such a vnode.

Redo the highly bogus readblock() function in the snapshot
code to something slightly less bogus: Constructing an uio
and using physio was really quite a detour.  Instead just
fill in a bio and ship it down.

19 years agoAdd GEOM class "VFS" for filesystems and other buffer cache users
Poul-Henning Kamp [Fri, 29 Oct 2004 09:56:56 +0000 (09:56 +0000)]
Add GEOM class "VFS" for filesystems and other buffer cache users
of GEOM devices.

There is nothing magic about this, it just gives a bufobj interface
to GEOM.

19 years agoGive the bufobj a private __bo_vnode for now to keep the syncer floating [1]
Poul-Henning Kamp [Fri, 29 Oct 2004 09:33:32 +0000 (09:33 +0000)]
Give the bufobj a private __bo_vnode for now to keep the syncer floating [1]
At some point later the syncer will unlearn about vnodes and the filesystems
method called by the syncer will know enough about what's in bo_private to
do the right thing.

[1] Ok, I know, but I couldn't resist the pun.

19 years agoAdd g_wither_geom_close() function.
Poul-Henning Kamp [Fri, 29 Oct 2004 09:19:03 +0000 (09:19 +0000)]
Add g_wither_geom_close() function.

19 years agoBackout 1.291.
Alfred Perlstein [Fri, 29 Oct 2004 08:24:41 +0000 (08:24 +0000)]
Backout 1.291.

re doesn't seem to think this fixes:
  Desired features for 5.3-RELEASE "More truss problems"

19 years agoGive dev_strategy() an explict cdev argument in preparation for removing
Poul-Henning Kamp [Fri, 29 Oct 2004 07:16:37 +0000 (07:16 +0000)]
Give dev_strategy() an explict cdev argument in preparation for removing
buf->b-dev.

Put a bio between the buf passed to dev_strategy() and the device driver
strategy routine in order to not clobber fields in the buf.

Assert copyright on vfs_bio.c and update copyright message to canonical
text.  There is no legal difference between John Dysons two-clause
abbreviated BSD license and the canonical text.

19 years agoAdd usage of -m option.
Hidetoshi Shimokawa [Fri, 29 Oct 2004 01:24:32 +0000 (01:24 +0000)]
Add usage of -m option.

19 years agoHandle all types of interrupts when operating the uhci(4) controller in
John Baldwin [Thu, 28 Oct 2004 20:24:50 +0000 (20:24 +0000)]
Handle all types of interrupts when operating the uhci(4) controller in
polled mode.

PR: kern/73000
Submitted by: Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after: 1 month

19 years agoRename debug macro to DBG and indent it properly.
Gleb Smirnoff [Thu, 28 Oct 2004 18:23:44 +0000 (18:23 +0000)]
Rename debug macro to DBG and indent it properly.

Requested by: maxim
Approved by: julian (mentor)

19 years agoBetter Xlist command line.
Dag-Erling Smørgrav [Thu, 28 Oct 2004 16:13:28 +0000 (16:13 +0000)]
Better Xlist command line.

19 years agoResolve conflicts
Dag-Erling Smørgrav [Thu, 28 Oct 2004 16:11:31 +0000 (16:11 +0000)]
Resolve conflicts

19 years agoUpdate for OpenSSH 3.9p1.
Dag-Erling Smørgrav [Thu, 28 Oct 2004 16:04:23 +0000 (16:04 +0000)]
Update for OpenSSH 3.9p1.

19 years agoThis commit was generated by cvs2svn to compensate for changes in r137015,
Dag-Erling Smørgrav [Thu, 28 Oct 2004 16:03:53 +0000 (16:03 +0000)]
This commit was generated by cvs2svn to compensate for changes in r137015,
which included commits to RCS files with non-trunk default branches.

19 years agoVendor import of OpenSSH 3.9p1.
Dag-Erling Smørgrav [Thu, 28 Oct 2004 16:03:53 +0000 (16:03 +0000)]
Vendor import of OpenSSH 3.9p1.

19 years agoUse dcons buffer passed by loader on amd64.
Hidetoshi Shimokawa [Thu, 28 Oct 2004 12:18:22 +0000 (12:18 +0000)]
Use dcons buffer passed by loader on amd64.

19 years agoMFi386: preserve dcons buffer passed by loader.
Hidetoshi Shimokawa [Thu, 28 Oct 2004 12:16:03 +0000 (12:16 +0000)]
MFi386: preserve dcons buffer passed by loader.

19 years agofixed a bug that incorrect IPsec request level may be returned for proto AH
SUZUKI Shinsuke [Thu, 28 Oct 2004 09:24:45 +0000 (09:24 +0000)]
fixed a bug that incorrect IPsec request level may be returned for proto AH

Obtained from: KAME

19 years agoLock bp->b_bufobj->b_object instead of bp->b_object
Poul-Henning Kamp [Thu, 28 Oct 2004 08:38:46 +0000 (08:38 +0000)]
Lock bp->b_bufobj->b_object instead of bp->b_object

19 years agoAdd -I, an option that asks for confirmation once if recursively
Xin LI [Thu, 28 Oct 2004 08:25:30 +0000 (08:25 +0000)]
Add -I, an option that asks for confirmation once if recursively
removing directories or if more than 3 files are listed in the
command line.

This feature is intended to provide a safe net but not being too
annoying like having "rm -i" for every deleting operations, and
is generally good for both newbies and power users, preventing
them from being so easily run into ``rm -rf /'', ``rm -rf *''
and so forth.

Originally implemented by Matthew Dillon for DragonFly, plus
some improvements done by various DragonFly contributors.

Approved by: murray (mentor; the original dillon's version)
Discussed with: des
Obtained from: DragonFly's bin/rm/
rm.c rev. 1.4 - 1.8
rm.1 rev. 1.3 - 1.4
MFC After: 1 month

19 years agoReduce the locking activity by epsilon by checking VNON condition before
Poul-Henning Kamp [Thu, 28 Oct 2004 08:22:11 +0000 (08:22 +0000)]
Reduce the locking activity by epsilon by checking VNON condition before
releasing the mountlock.

19 years agoWe only support backing UFS/FFS with disks.
Poul-Henning Kamp [Thu, 28 Oct 2004 06:19:28 +0000 (06:19 +0000)]
We only support backing UFS/FFS with disks.

19 years agoWhat can I say: don't allow people to mount DEVFS with option "nodev".
Poul-Henning Kamp [Thu, 28 Oct 2004 06:03:25 +0000 (06:03 +0000)]
What can I say: don't allow people to mount DEVFS with option "nodev".

19 years agoAssert that the containing vm object is locked in vm_page_cache() and
Alan Cox [Thu, 28 Oct 2004 05:26:21 +0000 (05:26 +0000)]
Assert that the containing vm object is locked in vm_page_cache() and
vm_page_try_to_cache().

19 years agocomment out debug printf.
Alfred Perlstein [Wed, 27 Oct 2004 23:19:34 +0000 (23:19 +0000)]
comment out debug printf.

Submitted by: rees

19 years agoFix a INVARIANTS-only bug introduced in Revision 1.104:
Bosko Milekic [Wed, 27 Oct 2004 21:19:35 +0000 (21:19 +0000)]
Fix a INVARIANTS-only bug introduced in Revision 1.104:

IF INVARIANTS is defined, and in the rare case that we have
allocated some objects from the slab and at least one initializer
on at least one of those objects failed, and we need to fail the
allocation and push the uninitialized items back into the slab
caches -- in that scenario, we would fail to [re]set the
bucket cache's ub_bucket item references to NULL, which would
eventually trigger a KASSERT.

19 years agoNever be afraid to try something new. Remember, amateurs built the ark.
Wilko Bulte [Wed, 27 Oct 2004 20:28:56 +0000 (20:28 +0000)]
Never be afraid to try something new. Remember, amateurs built the ark.
Professionals built the Titanic.

19 years agoMove the 'debug' sysctl tree under options SYSCTL_DEBUG. It generates
Robert Watson [Wed, 27 Oct 2004 19:26:01 +0000 (19:26 +0000)]
Move the 'debug' sysctl tree under options SYSCTL_DEBUG.  It generates
an inordinate amount of synchronous console output that is fairly
undesirable on slower serial console.  It's easily hit by accident
when frobbing other sysctls late at night.

19 years agoThese are unnecessary and have been causing imp@ trouble.
Dag-Erling Smørgrav [Wed, 27 Oct 2004 19:07:36 +0000 (19:07 +0000)]
These are unnecessary and have been causing imp@ trouble.

19 years agoForcibly disable interrupts, if we find ourselves servicing one when
Bruce M Simpson [Wed, 27 Oct 2004 19:02:23 +0000 (19:02 +0000)]
Forcibly disable interrupts, if we find ourselves servicing one when
the device is suspended or shutting down. This will need to be rethought
slightly if we implement suspend/resume support within vr(4).
This appears to fix the vr_shutdown() panic on SMP machines.

My theory here is there's a race somewhere during vr_detach() with
vr_intr() in the SMP case which was sometimes being triggered,
although quite why this was happening is unclear (vr_stop() also
explicitly disables interrupts by writing to the IMR register).

MFC-to-RELENG_5* candidate.

PR: kern/62889
Tested by: seb at struchtrup dot com
MFC after: 10 days

19 years agoDuring traversal of the active queue, try locking the page's containing
Alan Cox [Wed, 27 Oct 2004 18:29:17 +0000 (18:29 +0000)]
During traversal of the active queue, try locking the page's containing
object before accessing the page's flags or the object's reference count.
If the trylock fails, handle the page as though it is busy.

19 years agoRaise MAXDSIZ from 8G to 32G. The old limit was just an arbitary choice
Peter Wemm [Wed, 27 Oct 2004 17:21:15 +0000 (17:21 +0000)]
Raise MAXDSIZ from 8G to 32G.  The old limit was just an arbitary choice
that was greater than 4G.  I originally used the same values as i386 in
order to save opening a new PML4 page slot, but in the day of gigabytes
of memory, worrying about a 4K page seems futile.  Moving from 8 to 32G
moves the page to a different index, it doesn't increase the number of
pages used.

19 years agoFix brk(3). The stack was unbalanced when we jumped to cerror. Oops!
Peter Wemm [Wed, 27 Oct 2004 17:11:43 +0000 (17:11 +0000)]
Fix brk(3).  The stack was unbalanced when we jumped to cerror.  Oops!
This causes nasty things like SEGV or a cpu spin when we return.

Submitted by: "James R. Van Artsalen" <james@jrv.org>

19 years agoAdd necessary whitespace to correct cross references.
Ceri Davies [Wed, 27 Oct 2004 11:26:51 +0000 (11:26 +0000)]
Add necessary whitespace to correct cross references.

PR: docs/73193
Submitted by: Jilles Tjoelker <jilles at stack.nl>

19 years agoMove the syncer linkage from vnode to bufobj.
Poul-Henning Kamp [Wed, 27 Oct 2004 08:05:02 +0000 (08:05 +0000)]
Move the syncer linkage from vnode to bufobj.

This is not quite a perfect separation: the syncer still think it knows
that everything is a vnode.

19 years agoEliminate unnecessary KASSERTs.
Poul-Henning Kamp [Wed, 27 Oct 2004 06:48:21 +0000 (06:48 +0000)]
Eliminate unnecessary KASSERTs.

Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.

19 years agoEliminate unnecessary KASSERT.
Poul-Henning Kamp [Wed, 27 Oct 2004 06:47:00 +0000 (06:47 +0000)]
Eliminate unnecessary KASSERT.

Eliminate a printf which would never tell us anything anyway because the
KASSERT would have triggered.

19 years agoAvoid using bp->b_vp when we already have the vnode by other means.
Poul-Henning Kamp [Wed, 27 Oct 2004 06:45:52 +0000 (06:45 +0000)]
Avoid using bp->b_vp when we already have the vnode by other means.

19 years agoEliminate unnecessary KASSERTS.
Poul-Henning Kamp [Wed, 27 Oct 2004 06:45:06 +0000 (06:45 +0000)]
Eliminate unnecessary KASSERTS.

19 years agoFix a typo in a comparison appeared in rev. 1.125.
Maxim Konovalov [Wed, 27 Oct 2004 05:37:58 +0000 (05:37 +0000)]
Fix a typo in a comparison appeared in rev. 1.125.

Submitted by: JINMEI Tatuya

19 years agoAllow tar format to read and accept an empty (or non-existent)
Tim Kientzle [Wed, 27 Oct 2004 05:15:23 +0000 (05:15 +0000)]
Allow tar format to read and accept an empty (or non-existent)
file.  In particular, this allows bsdtar to append (-r) to
an empty file.

Thanks to: Ryan Sommers

While I'm here, straighten out a misleading comment about GNU-compatible
sparse file handling.

19 years agoSynchronize access to the vm page's PG_BUSY flag using the containing vm
Alan Cox [Wed, 27 Oct 2004 02:05:00 +0000 (02:05 +0000)]
Synchronize access to the vm page's PG_BUSY flag using the containing vm
object's lock.  In the same place, eliminate unnecessary checks for a NULL
vm object pointer.

19 years agoDocument that libkvm requires device mem to work.
Warner Losh [Tue, 26 Oct 2004 21:11:06 +0000 (21:11 +0000)]
Document that libkvm requires device mem to work.

19 years agoGive each plex a separate queue where held back bios are put on.
Lukas Ertl [Tue, 26 Oct 2004 21:01:42 +0000 (21:01 +0000)]
Give each plex a separate queue where held back bios are put on.
This lowers the CPU usage of the worker thread and prevents a
possible live lock on non-SMP machines.

MFC candidate.

19 years agoKASSERT that we only get to prewrite() on writes.
Poul-Henning Kamp [Tue, 26 Oct 2004 20:13:49 +0000 (20:13 +0000)]
KASSERT that we only get to prewrite() on writes.

19 years agoWhite space changes. Add missing static.
Poul-Henning Kamp [Tue, 26 Oct 2004 20:13:21 +0000 (20:13 +0000)]
White space changes.  Add missing static.

19 years agoReplace single case switch() with if().
Poul-Henning Kamp [Tue, 26 Oct 2004 20:12:25 +0000 (20:12 +0000)]
Replace single case switch() with if().

19 years agoVertically align comment.
Poul-Henning Kamp [Tue, 26 Oct 2004 20:12:00 +0000 (20:12 +0000)]
Vertically align comment.

19 years agoRemove blank line which crept in.
Poul-Henning Kamp [Tue, 26 Oct 2004 20:11:27 +0000 (20:11 +0000)]
Remove blank line which crept in.

19 years agoAlso check that the sectormask is bigger than zero.
Poul-Henning Kamp [Tue, 26 Oct 2004 19:51:57 +0000 (19:51 +0000)]
Also check that the sectormask is bigger than zero.

Wrap this overly long KASSERT and remove newline.

19 years agoWorkaround for a recursive acquisition of the driver mutex during device
Bruce M Simpson [Tue, 26 Oct 2004 19:49:45 +0000 (19:49 +0000)]
Workaround for a recursive acquisition of the driver mutex during device
detach; triggered by ether_ifdetach() -> if_delmulti() -> vr_ioctl().
MFC candidate.

PR: kern/62889
MFC after: 3 days

19 years agoCorrect a misspelling, 'task_fn' -> 'task_fn_t'.
Bruce M Simpson [Tue, 26 Oct 2004 17:14:45 +0000 (17:14 +0000)]
Correct a misspelling, 'task_fn' -> 'task_fn_t'.

Noticed by: sah at softcardsystems dot com
MFC after: 3 days

19 years agoUncomment DIRECTIO and NSWBUF_MIN. They are both positive options (i.e.
Dag-Erling Smørgrav [Tue, 26 Oct 2004 12:20:57 +0000 (12:20 +0000)]
Uncomment DIRECTIO and NSWBUF_MIN.  They are both positive options (i.e.
they enable rather than disable code), so they should be on in LINT.

19 years agoThe island council met and voted buf_prewrite() home.
Poul-Henning Kamp [Tue, 26 Oct 2004 10:44:10 +0000 (10:44 +0000)]
The island council met and voted buf_prewrite() home.

Give ffs it's own bufobj->bo_ops vector and create a private strategy
routine, (currently misnamed for forwards compatibility), which is
just a copy of the generic bufstrategy routine except we call
softdep_disk_prewrite() directly instead of through the buf_prewrite()
indirection.

Teach UFS about the need for softdep_disk_prewrite() and call the
function directly in FFS.

Remove buf_prewrite() from the default bufstrategy() and from the
global bio_ops method vector.

19 years agoFix syntax errors introduced by last commit.
Poul-Henning Kamp [Tue, 26 Oct 2004 09:04:20 +0000 (09:04 +0000)]
Fix syntax errors introduced by last commit.

Why isn't DIRECTIO in NOTES/LINT ?

19 years agoAdd a matching tunable for net.inet.tcp.sack.enable sysctl.
Robert Watson [Tue, 26 Oct 2004 08:59:09 +0000 (08:59 +0000)]
Add a matching tunable for net.inet.tcp.sack.enable sysctl.

19 years agoPut the I/O block size in bufobj->bo_bsize.
Poul-Henning Kamp [Tue, 26 Oct 2004 07:39:12 +0000 (07:39 +0000)]
Put the I/O block size in bufobj->bo_bsize.

We keep si_bsize_phys around for now as that is the simplest way to pull
the number out of disk device drivers in devfs_open().  The correct solution
would be to do an ioctl(DIOCGSECTORSIZE), but the point is probably mooth
when filesystems sit on GEOM, so don't bother for now.

19 years agoHold the lock on the containing vm object when calling
Alan Cox [Tue, 26 Oct 2004 06:58:26 +0000 (06:58 +0000)]
Hold the lock on the containing vm object when calling
vm_page_sleep_if_busy().

19 years agoRemove unused si_bsize_best field from struct cdev.
Poul-Henning Kamp [Tue, 26 Oct 2004 06:53:00 +0000 (06:53 +0000)]
Remove unused si_bsize_best field from struct cdev.

19 years agoDegeneralize the per cdev copyonwrite callback. The only possible value
Poul-Henning Kamp [Tue, 26 Oct 2004 06:25:56 +0000 (06:25 +0000)]
Degeneralize the per cdev copyonwrite callback.  The only possible value
is ffs_copyonwrite() and the only place it can be called from is FFS which
would never want to call another filesystems copyonwrite method, should one
exist, so there is no reason why anything generic should know about this.

19 years agoAlign comment
Poul-Henning Kamp [Tue, 26 Oct 2004 06:15:39 +0000 (06:15 +0000)]
Align comment

19 years agoDon't clear flags we just checked were not set.
Poul-Henning Kamp [Tue, 26 Oct 2004 05:57:29 +0000 (05:57 +0000)]
Don't clear flags we just checked were not set.

19 years agoCheck that rt_mask(rt) is non-NULL before dereferencing it, in the
Bruce M Simpson [Tue, 26 Oct 2004 03:31:58 +0000 (03:31 +0000)]
Check that rt_mask(rt) is non-NULL before dereferencing it, in the
RTM_ADD case, thus avoiding a panic.

Submitted by: Iasen Kostov

19 years agoTypo: s/Exampes/Examples
Marc Fonvieille [Mon, 25 Oct 2004 20:56:24 +0000 (20:56 +0000)]
Typo: s/Exampes/Examples

19 years agoSwitch the default CFLAGS to -O2 -pipe.
Dag-Erling Smørgrav [Mon, 25 Oct 2004 20:04:50 +0000 (20:04 +0000)]
Switch the default CFLAGS to -O2 -pipe.

Submitted by: obrien

19 years agoIPDIVERT is a module now and tell the other parts of the kernel about it.
Andre Oppermann [Mon, 25 Oct 2004 20:02:34 +0000 (20:02 +0000)]
IPDIVERT is a module now and tell the other parts of the kernel about it.
IPDIVERT depends on IPFIREWALL being loaded or compiled into the kernel.