Commit Graph

7582 Commits

Author SHA1 Message Date
martin 72b336b07f Using "int" variables with sysctl's CTLTYPE_BOOL is a simple receipt to
loose on big endian machines. So make the variables "bool".
2011-01-14 10:18:21 +00:00
rmind 7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
pooka 4a92140584 allow file system to decide if it can be downgraded from r/w to r/o 2011-01-13 07:25:50 +00:00
dyoung d92d0c4971 Don't compute tags over cxgb, its symbols clash too often with symbols
in other drivers and subsystems.
2011-01-11 00:36:03 +00:00
christos fb4e945aa5 regen 2011-01-10 04:42:24 +00:00
christos 3d70c4b47c implement sigqueueinfo 2011-01-10 04:39:18 +00:00
christos f79b6ffa09 Add two sysctls one that does verbose transaction logging and a second one
that disables flushing the disk cache (which is fast but dangerous for
data integrity). From simon a long while back.
2011-01-08 20:37:05 +00:00
christos 27ec421326 fix sysctl again. 2011-01-08 20:29:13 +00:00
dholland 5382c59ae1 Tsort functions and remove a small #if 0 block leftover from earlier cleanup.
No functional change.
2011-01-04 07:43:42 +00:00
matt 1cf358c3b4 When determining max/min sym value, ignore ABS symbols which don't
have a type.  This stops ksym thinking that the _KERNEL_OPT symbols
could actually be useful.
2011-01-04 01:40:19 +00:00
pooka a27f30410a update comment 2011-01-03 13:22:32 +00:00
christos 7e1e338bd2 Simplify and avoid kernel segv when the list is NULL. 2011-01-02 20:50:55 +00:00
dholland 6422814ed0 Remove references to SAVESTART and SAVENAME in comments. 2011-01-02 06:58:45 +00:00
dholland 6d2ff39e83 Remove remaining references to SAVESTART. 2011-01-02 05:12:33 +00:00
dholland 13fc777536 Remove the special refcount behavior (adding an extra reference to the
parent dir) associated with SAVESTART in relookup().

Check all call sites to make sure that SAVESTART wasn't set while
calling relookup(); if it was, adjust the refcount behavior. Remove
related references to SAVESTART.

The only code that was reaching the extra ref was msdosfs_rename,
where the refcount behavior was already fairly broken and/or gross;
repair it.

Add a dummy 4th argument to relookup to make sure code that hasn't
been inspected won't compile. (This will go away next time the
relookup semantics change, which they will.)
2011-01-02 05:09:30 +00:00
dholland b845056678 Add an INRELOOKUP namei flag. Sigh. (We don't need more namei flags.)
However, because of a protocol deficiency puffs relies on being able
to keep track of VOP_LOOKUP calls by inspecting their contents, and
this at least allows it to use something vaguely principled instead of
making wild guesses based on whether SAVESTART is set.

Update libp2k to use INRELOOKUP instead of SAVESTART.
2011-01-02 05:04:58 +00:00
dholland a508b19c66 Remove unused nameidata field ni_startdir. 2011-01-02 05:01:20 +00:00
pooka 08421f3eea Update comment and inspired by that update variable naming too.
no functional change.
2011-01-01 22:05:11 +00:00
pooka 2f7b77901e Include system call name in comment even for unimplemented syscalls
in rump_syscalls.c.
2010-12-30 20:09:53 +00:00
pooka afe2ca27dd Mark syscalls not supported by a rump kernel with SYCALL_NOSYS, as
pure function pointer comparison brings weak alias confusion (weak
aliases are necessary for static linkage).
2010-12-30 16:49:24 +00:00
pooka cb92cf6235 whitespace polish in rump_syscalls.c 2010-12-30 13:38:10 +00:00
pooka 8b73c28f1c snafu in previous: extra printf arg 2010-12-30 11:54:50 +00:00
pooka 4d48de638f regen: fill syscallnames up to the rim 2010-12-30 11:45:39 +00:00
pooka c86a7bcf7c Fill syscallnames up to nsysent so that n<nsysent has a non-hyperspace
string mapping.
2010-12-30 11:42:53 +00:00
pooka d9b1a59b40 Pass potential prop dictionary to modcmd when reenabling a builtin
module.
2010-12-29 15:07:36 +00:00
reinoud 766116b74d Fix nestio's behavior on error.
The mbp->b_resid is used to track if all the nested buffers have been issued
and reported back. When the last buffer calls in, mbp->b_resid becomes zero
and biodone(mbp) is called. This is fine as long as there are no errors.

If a read-error does occure in one of the nested buffers, the mbp->b_error is
set and on its call to biodone(mbp), with mbp->b_resid is zero, physio()
panics since it asserts that IF an error is set on a buffer, there should be a
residual amount of data left to transfered.

The patch fixes this case by setting mbp->b_resid back to mbp->b_bcount on
mbp->b_error just before biodone(mbp).

This behaviour is consistent with normal buffer issueing. It either succeeds
or doesn't succeed.
2010-12-22 14:05:50 +00:00
matt 86c8e7039d Add CTASSERT to verify __HAVE_CPU_DATA_FIRST is correct defined or undefined. 2010-12-22 02:43:23 +00:00
matt 6a66466f0c Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-20 00:25:23 +00:00
yamt b8aa94ee5d revert vfs_lookup.c rev.1.126 for now because some problems are reported
on source-changes-d@ (thanks pooka) and i don't think i can take a look at
them in a timely manner.
2010-12-20 00:12:46 +00:00
rmind 11a35aed4d - Fix a few possible locking issues in execve1() and exit1(). Add a note
that scheduler locks are special in this regard - adaptive locks cannot
  be in the path due to turnstiles.  Randomly spotted/reported by uebayasi@.
- Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying
  lwp_lock() and sleepq_enter() a little.
- Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly.

OK ad@
2010-12-18 01:36:19 +00:00
rmind 0d6d18d2d7 do_posix_fadvise: fix and improve previous change - add a comment with
some rationale and handle few range overflows.

Per report/discussion with yamt@.
2010-12-18 01:18:48 +00:00
rmind a5d3437d2b mi_switch: remove invalid assert and add a note that preemption/interrupt
may happen while migrating LWP is set.

Reported by Manuel Bouyer.
2010-12-18 01:13:36 +00:00
yamt 9ca0d1bba8 new_vmcmd: assertions 2010-12-17 22:35:07 +00:00
yamt 1ad15d6549 - lookup_once: when crossing a mount point, don't keep the parent vnode locked.
ie. don't lock a vnode while holding another vnode which belongs to a
  different filesystem.  otherwise we propagate slowness (or deadness) of a
  filesystem to another via vnode lock chain.
- lookup_parsepath: don't alter vnode states.  let the caller do it instead.
- add comments and assertions.
2010-12-17 22:34:04 +00:00
yamt ef99b60b5d wrap a long line. 2010-12-17 22:24:11 +00:00
yamt 56704cd648 realtimerexpire: rename a confusing variable. no functional change.
(now_ms -> now_ns as it hold a nano second value)
2010-12-17 22:08:18 +00:00
yamt 112d262cd3 update some comments 2010-12-17 22:06:31 +00:00
yamt 07928aac69 aio_worker: add an assertion 2010-12-17 22:05:36 +00:00
yamt 6156c347df 0 -> NULL for a pointer 2010-12-17 22:04:42 +00:00
eeh a94c765810 ubc_init needs to run while we're still cold or uvmhist breaks. 2010-12-16 00:42:22 +00:00
hannken 916ee575ee brelsel: Clear B_COWDONE flag on clean (! BO_DELWRI) buffer. B_COWDONE is set
if the buffer was read with intention to modify but the caller changed its mind.

This error could lead to snapshot corruption when a buffer with B_COWDONE set
resides on the freelist and we create a new snapshot.
2010-12-12 10:30:09 +00:00
matt b7a7b9b8bc Make sure all for loops use { } 2010-12-11 22:32:13 +00:00
matt dc55b48ba8 Add evcnt_attach_dynamic_nozero, a version of evcnt_attach_dynamic, which
doesn't zero the evcnt before filling in things.  This is needed when the
evcnt itself is being updated before evcnt_attach_dynamic can be called.
2010-12-11 22:30:54 +00:00
matt e66ccad2ea Add critpoll (critical polling) hooks. These are keep things like watchdogs
from firing when the system is doing stuff like waiting at a ddb prompt or
the kernel is doing a lot of printing.
2010-12-11 22:27:53 +00:00
dholland 14402d0ff1 Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.
2010-11-30 10:43:01 +00:00
dholland d4eb05390d Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.
2010-11-30 10:29:57 +00:00
jnemeth 22405528a4 Rename the autoloaded property list from <module>.prop to <module>.plist
as discussed on tech-kern.
2010-11-28 00:26:38 +00:00
cegger 0afb168c64 No need to print '0x' twice in the printing of
the mbuf flags via 'show mbuf'
2010-11-24 14:49:18 +00:00
pooka dbb937f216 _KERNEL_OPT 2010-11-21 17:57:24 +00:00
dholland 8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00