-assume (KASSERT) that the timeval given is normalized, and remove
some partial fixup which I don't see what it is good for
(I'm ready to back that out if someone tells a reason)
-catch overflows due to conversion of time_t (from tv_sec) to
integer -- this function doesn't do 64-bit arithmetics (which makes
sense because relative times which don't fit into 32 bits can be
considered nonsense here), and before a huge tv_sec could lead to
a zero hz result, violating the caller's assumptions (in particular
trigger a diagnostic panic in abstimeout2timo())
on IPL32 platforms so add code in sys_ioctl (and netbsd32_ioctl) to deal
with the older/smaller diskabel size. This change makes disklabel the
same for both IPL32 and LP64 platforms.
one had the problem of bypassing the syscall layer and doing a
function call into the kernel directly. Therefore there was no
way for users of librumpclient to specify compat. The new model
pushes the compat handling in the kernel and leaves only the task
of selecting the right syscall number to the client.
This change also introduces a stable ABI for rump syscalls, i.e.
it is possible to use the same syscall client library both on NetBSD
5.0 and -current and get the syscalls resolved to the right place
depending on the ABI at the time the client binary is compiled.
A list of what to be called when will have to maintained separately
simply because this information is not available in syscalls.master
-- in the case of the normal kernel we always want to resolve a
newly linked syscall to the latest version, whereas in rump we
might want to resolve a syscall to a -current kernel to the 5.0
compat call (because our client namespace is 5.0). This information
in maintained in rump_syscalls_compat.h with the current format:
/* time_t change */
#if !__NetBSD_Prereq__(5,99,7)
#define RUMP_SYS_RENAME_STAT rump___sysimpl_stat30
....
If no compat override is given, a syscall resolves automatically
to the latest version of the syscall.
Also, this change autogenerates forward declarations for all syscall
types where it is possible (i.e. ones without typedef insanity).
This makes it possible to include rump_syscalls.h without including
rump.h.
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.)
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.
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.