History log of /netbsd-src/sys/dev/raidframe/rf_disks.c (Results 1 – 25 of 95)
Revision Date Author Comments
# 8214dc08 25-Sep-2023 oster <oster@NetBSD.org>

snprintf() should really include a format.


# a6071800 17-Sep-2023 oster <oster@NetBSD.org>

Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration

Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:
Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:
Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.

show more ...


# 440d0295 10-Aug-2022 mrg <mrg@NetBSD.org>

raidframe: reject invalid values for numCol and numSpares

numCol and numSpares are "int" so they can be "-1" internally,
which means negative values need to be rejected, as well as
values higher tha

raidframe: reject invalid values for numCol and numSpares

numCol and numSpares are "int" so they can be "-1" internally,
which means negative values need to be rejected, as well as
values higher than RF_MAXCOL/RF_MAXSPARES.

explicitly nul-terminate all strings coming from userland.

some minor CSE that avoids signed arith.

this fixes issues in the RAIDFRAME_ADD_HOT_SPARE,
RAIDFRAME_CONFIGURE, RAIDFRAME_DELETE_COMPONENT,
RAIDFRAME_INCORPORATE_HOT_SPARE, and RAIDFRAME_REBUILD_IN_PLACE
ioctl commands.

Reported-by: syzbot+b584943ad1f8ab9d4fe0@syzkaller.appspotmail.com

https://syzkaller.appspot.com/bug?id=61e07e418261f8eec8a37a9226725fe31820edd0
https://syzkaller.appspot.com/bug?id=ca0c997b40de81c0f0b44790217731f142003149
https://syzkaller.appspot.com/bug?id=6fc452d228453494655a85264591dd9054cc0b08
https://syzkaller.appspot.com/bug?id=873f0271682713a27adc9a49dd7109c70b35fda3


XXX: pullup-8, pullup-9.

ok oster@ riastradh@

show more ...


# 5a52f2af 08-Dec-2019 mlelstv <mlelstv@NetBSD.org>

Switch to vn_bdev_open* functions.


# 95d8fbc8 09-Feb-2019 christos <christos@NetBSD.org>

- Change the allocation macros to be more like function calls
- Change sizeof(type) -> sizeof(*variable)
- Use macros for the long buffer length allocations
- Remove "bit polishing" memsets() -- do t

- Change the allocation macros to be more like function calls
- Change sizeof(type) -> sizeof(*variable)
- Use macros for the long buffer length allocations
- Remove "bit polishing" memsets() -- do them only once
- Remove unnecessary casts

Thanks to oster@ for finding bugs and testing.

show more ...


# 934117fb 08-Feb-2019 christos <christos@NetBSD.org>

PR/53956: Havard Eidnes: raidframe fails to create raid set on disks.
The test to check if force was reversed when the code was factored out.


# c0614aca 13-Jan-2017 christos <christos@NetBSD.org>

more faithful to the original (from coypu)


# 15a8367e 13-Jan-2017 christos <christos@NetBSD.org>

Don't consider a disk hosed if we did not find a column for it; dedup code.


# f0a7346d 18-Oct-2014 snj <snj@NetBSD.org>

src is too big these days to tolerate superfluous apostrophes. It's
"its", people!


# 292a0c7f 14-Jun-2014 hannken <hannken@NetBSD.org>

Change dk_lookup() to return an anonymous vnode not associated with
any file system. Change all consumers of dk_lookup() to get the
device from "v_rdev" instead of VOP_GETATTR() as specfs does not
s

Change dk_lookup() to return an anonymous vnode not associated with
any file system. Change all consumers of dk_lookup() to get the
device from "v_rdev" instead of VOP_GETATTR() as specfs does not
support VOP_GETATTR(). Devices obtained with dk_lookup() will no
longer disappear on forced unmounts.

Fix for PR kern/48849 (root mirror raid fails on shutdown)

Welcome to 6.99.44

show more ...


# 268d7559 25-Mar-2014 christos <christos@NetBSD.org>

kill sprintf


# e4352b8f 15-Sep-2013 martin <martin@NetBSD.org>

Avoid unused variable warnings


# fba658ac 19-Jul-2012 pooka <pooka@NetBSD.org>

Initialize values to squelch gcc.

from Greg Oster


# 2cc7a01f 14-Oct-2011 hannken <hannken@NetBSD.org>

Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock. Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from

Change the vnode locking protocol of VOP_GETATTR() to request at least
a shared lock. Make all calls outside of file systems respect it.

The calls from file systems need review.

No objections from tech-kern.

show more ...


# 6f6c7625 03-Aug-2011 oster <oster@NetBSD.org>

Remove unused 'struct lwp *' from rf_getdisksize. No functional changes.


# d1aa4a08 29-Jul-2011 oster <oster@NetBSD.org>

In rf_disks.c make sure ser_values and ser_count arrays are
initialized before use.

Validate the component label before considering a component for use,
and make sure we only consider components tha

In rf_disks.c make sure ser_values and ser_count arrays are
initialized before use.

Validate the component label before considering a component for use,
and make sure we only consider components that are optimal.

Fixes PR#44251. All atf RAIDframe tests now pass.

show more ...


# 8c36bb4b 11-May-2011 mrg <mrg@NetBSD.org>

convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond.
convert all remaining simple_lock's to kmutexes (t

convert the main raidPtr mutex to a kmutex, and add a couple of cv's to
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond.
convert all remaining simple_lock's to kmutexes (they're not used or compiled
right now... even with all options enabled) and remove the support for them.

this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.

show more ...


# ec02ea41 19-Feb-2011 enami <enami@NetBSD.org>

Define accessors for number of blocks and partition size in the
component label and use them where appropriate. Disscussed on tech-kern.


# 3e0d3a90 13-Feb-2011 enami <enami@NetBSD.org>

Remove one of trailing whitespace which adds unnecessary difference
against netbsd-5 branch.


# 1812d0a2 04-Dec-2010 mrg <mrg@NetBSD.org>

apply my patch to support non-512K sector disks (at least, upto 16KB
sector disks..) from my tech-kern post:


the following patch let's me access both 512 byte and 4K
sector disks at the same time,

apply my patch to support non-512K sector disks (at least, upto 16KB
sector disks..) from my tech-kern post:


the following patch let's me access both 512 byte and 4K
sector disks at the same time, as long as they are in
separate raids. the existing rf code assumes/enforces
this part, i just made it support other sets concurrently.

the main change is moving the parity bitmap to the sector
after the component label sector(s), instead of being
immediately after the label, which meant it was on the same
sector as the label for >1024 byte devices.

i'm a little annoyed at having to add a 2nd call to
getdisksize() to enable auto-configure to work, but i
don't see another way that wasn't much uglier.

show more ...


# 8f6ed30d 19-Nov-2010 dholland <dholland@NetBSD.org>

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 an

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.

show more ...


# 4de66268 01-Nov-2010 mrg <mrg@NetBSD.org>

add support for >2TB raid devices.

- add two new members to the component label:
u_int numBlocksHi
u_int partitionSizeHi
and store the top 32 bits of the real number of blocks and
part

add support for >2TB raid devices.

- add two new members to the component label:
u_int numBlocksHi
u_int partitionSizeHi
and store the top 32 bits of the real number of blocks and
partition size. modify rf_print_component_label(),
rf_does_it_fit(), rf_AutoConfigureDisks() and
rf_ReconstructFailedDiskBasic().

- call disk_blocksize() after disk_attach() [ from mlelstv ]

- shift the block number relative to DEV_BSHIFT in raidstart()
and InitBP() so that accesses work for non 512-byte devices.
[ from mlelstv ]

- update rf_getdisksize() to use the new getdisksize() [ from
mlelstv. this part needs a separate change for netbsd-5. ]


reviewed by: oster, christos and darrenr

show more ...


# b95d388b 01-Mar-2010 jld <jld@NetBSD.org>

When setting up a non-autoconfigured RAID set, fail a component if the
attempt to read its label fails. OKed by oster@.


# f1a1ad33 17-Nov-2009 jld <jld@NetBSD.org>

Finally commit the RAIDframe parity map Summer Of Code project.

Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might

Finally commit the RAIDframe parity map Summer Of Code project.

Drastically reduces the amount of time spent rewriting parity after an
unclean shutdown by keeping better track of which regions might have had
outstanding writes. Enabled by default; can be disabled on a per-set
basis, or tuned, with the new raidctl(8) commands.

Discussed on tech-kern@ to a general air of approval; exhortations to
commit from mrg@, christos@, and others.

Thanks to Google for their sponsorship, oster@ for mentoring the
project, assorted developers for trying very hard to break it, and
probably more I'm forgetting.

show more ...


# 5547ed17 03-Apr-2009 sborrill <sborrill@NetBSD.org>

Switch various printfs from %ld and %d to PRIu64, etc. to be more consistent
about types (for instance uint32_t was being printed with %d).


1234