| Age | Commit message (Collapse) | Author |
|
problem shown here:
http://mail-index.netbsd.org/tech-kern/2021/12/10/msg027851.html
but seems unlikely to fix the original problem.
tested on i386/anita. ok oster@
XXX: pullup-9 (netbsd-8 uses old APIs.)
|
|
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
|
|
|
|
|
|
Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks;
the raidframe(4) change probably doesn't (but doesn't hurt).
|
|
the raw partition. In particular, we now need to account for the case
where an existing FS_RAID partition is now open because it is in use.
If that is the case, we don't look at the raw partition.
Addresses PR kern/56369.
|
|
|
|
|
|
these changes to fix the build.
|
|
autoconfig RAID sets. raidctl now supports looking
for autoconfig RAID sets with a new '-L' flag.
|
|
|
|
|
|
|
|
|
|
Cleanup the error path for the (no longer needed) PR_NOWAIT cases.
|
|
|
|
is not allowed.
PR bin/45162
|
|
version of RAIDFrame. Remove them from here.
|
|
isn't needed. Cleanup the flag from rf_DoAccess() and its caller as
well.
|
|
|
|
Alloclist remains not per-RAID, so initialize that pool
separately/differently than the rest.
The remainder of pools in RF_Pools_s are now per-RAID pools. Mostly
mechanical changes to functions to allocate/destroy per-RAID pools.
Needed to make raidPtr available in certain cases to be able to find
the per-RAID pools.
Extend rf_pool_init() to now populate a per-RAID wchan value that is
unique to each pool for a given RAID device.
TODO: Complete the analysis of the minimum number of items that are
required for each pool to allow IO to progress (i.e. so that a request
for pool resources can always be satisfied), and dynamically scale
minimum pool sizes based on RAID configuration.
|
|
RAIDframe can't deal with that, so create a dedicated pool of buffers
to use for IO. PR_WAITOK is fine here, as we pre-allocate more than
we need to guarantee IO can make progress. Tuning of pool still to
come.
|
|
|
|
there are two on-disk formats in use in raidframe:
- the component label
- the parity map
the parity map is a bitmap implemented as bytes, so it has no
endian issue. the component label is the problem, as most of
the fields are 32 bit. this change only supports version 2 of
raidframe (active since the year 2000.)
as component labels are read and used before a raidPtr for the
raid set has been created, there is no obvious storage for the
swapped indicator, so the in-core version remains the on-disk
version, while the rest of in-core label is swapped.
in raidread_component_label() and raidwrite_component_label(),
check if the swapped version, and if so, call new rf_swap_label()
and ensure that the in-core label is native-byte order. for the
write method, an on-stack copy is modified before writing, so
that the in-core version remains valid. (this stack usage is
below other stack usage in similar functions here.)
adjust the label ioctls RAIDFRAME_GET_COMPONENT_LABEL and
RAIDFRAME_GET_COMPONENT_LABEL80 to return the byte-swapped
version so that eg, raidctl -s reports the right version.
when performing final configuration of a raidset, report if a
label swapped, and also complain if there are differently swapped
versions on the other components.
tested on arm64, sparc64 and amd64
ok @oster
|
|
ignore spiflash as a raid device.
|
|
|
|
with the function name it comes with.
|
|
SUsPerPU is only really supported for a value of 1, and since the
first PSID is 0, the last will be numStripe-1. Also update the
setting of pending_writes to reflect the change to lastPSID.
Needs pullups to -8 and -9.
|
|
|
|
|
|
|
|
- return the error not 0 if failing.
|
|
|
|
|
|
|
|
to component I/O
fixes the xbd(4) KASSERT() triggered by raidframe, noted in PR kern/55397
by Frank Kardel
|
|
|
|
and pool_prime() (and their pool_cache_* counterparts):
- the pool_set*wat() APIs are supposed to specify thresholds for the count of
free items in the pool before pool pages are automatically allocated or freed
during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
are supposed to specify minimum and maximum numbers of total items
in the pool (both free and allocated). these were somewhat conflated
in the existing code, so separate them as they were intended.
- change pool_prime() to take an absolute number of items to preallocate
rather than an increment over whatever was done before, and wait for
any memory allocations to succeed. since pool_prime() can no longer fail
after this, change its return value to void and adjust all callers.
- pool_setlowat() is documented as not immediately attempting to allocate
any memory, but it was changed some time ago to immediately try to allocate
up to the lowat level, so just fix the manpage to describe the current
behaviour.
- add a pool_cache_prime() to complete the API set.
|
|
This was presumably eaten by git cvsexportcommit, which is curious
because I thought I had gotten out of the habit of passing -k to it.
|
|
If a disk is backed by a physical medium other than itself, such as
cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion
detection for dk_dump.
If, however, a device represents a physical medium on its own, such
as wd(4), then it passes 0 instead.
With this, I can now dump to dk on cgd on dk on wd.
|
|
|
|
Confirmed by martin@ in PR/54760.
|
|
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.
Note that we still have a per-hook localcount, since we need to count
individual references.
As discussed with riastradh@
Welcome to 9.99.22 !
|
|
|
|
and remove code to handle failures that can no longer happen.
|
|
initialization and warns, unconditionaly initialize dksc at declaration
with a XXX gcc comment.
|
|
harmless because we didn't use the pointer then.
Reported-by: syzbot+77097fae0e3aad6de088@syzkaller.appspotmail.com
|
|
- callback functions return 0 and their result is not checked; make them void.
- there are two types of callbacks and they used to overload their parameters
and the callback structure; separate them into "function" and "value"
callbacks.
- make the wait function signature consistent.
|
|
|
|
|