#
01e18673 |
| 13-Nov-2024 |
Ed Maste <emaste@FreeBSD.org> |
g_eli: update comment for bool return type
Fixes: 68eadcec0f7c8 ("Give a couple of predication functions a bool return type.") Sponsored by: The FreeBSD Foundation
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
#
4eb861d3 |
| 23-Nov-2023 |
Mitchell Horne <mhorne@FreeBSD.org> |
shutdown: audit shutdown_post_sync event callbacks
Ensure they are all panic/debugger safe.
Most handlers for this event are for disk drivers/geom modules. There are a mix of checks being used here
shutdown: audit shutdown_post_sync event callbacks
Ensure they are all panic/debugger safe.
Most handlers for this event are for disk drivers/geom modules. There are a mix of checks being used here (or not), so let's standardize on checking the presence of the RB_NOSYNC flag.
This flag is set whenever: 1. The kernel has panicked and kern.sync_on_panic=0* 2. We reboot from within the kernel debugger (the "reset" command) 3. Userspace requested it, e.g. by 'reboot -n'
Name the functions consistently.
*This sysctl is tuned to zero by default, but its existence means that these handlers can be executed after a panic, at the user's discretion. IMO this use-case is implicitly understood to be risky, and we'd be better off eliminating it altogether.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42337
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
#
9309a460 |
| 07-Apr-2023 |
Alan Somers <asomers@FreeBSD.org> |
Implement GEOM::rotation_rate for gmirror
If all of the mirror's children have the same rotation rate, report that. But if they have mixed rotation rates, or if any child has an unknown rotation ra
Implement GEOM::rotation_rate for gmirror
If all of the mirror's children have the same rotation rate, report that. But if they have mixed rotation rates, or if any child has an unknown rotation rate, report "Unknown".
MFC after: 2 weeks Sponsored by: Axcient Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39458
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
10ae42cc |
| 30-Jan-2022 |
Alexander Motin <mav@FreeBSD.org> |
GEOM: Set G_CF_DIRECT_SEND/RECEIVE for taste consumers.
All I/O requests through the taste consumers are synchronous, done with g_read_data() and without any locks held. It makes no sense to delega
GEOM: Set G_CF_DIRECT_SEND/RECEIVE for taste consumers.
All I/O requests through the taste consumers are synchronous, done with g_read_data() and without any locks held. It makes no sense to delegate the I/O to g_down/g_up threads.
This removes many of context switches during disk retaste.
MFC after: 2 weeks
show more ...
|
#
5d5f4462 |
| 27-Jan-2022 |
Andriy Gapon <avg@FreeBSD.org> |
g_mirror: don't fail reads while losing next-to-last disk
I observed a situation where some read requests failed when a 2-way geom mirror lost one disk. The problem appears to be in the logic that
g_mirror: don't fail reads while losing next-to-last disk
I observed a situation where some read requests failed when a 2-way geom mirror lost one disk. The problem appears to be in the logic that skips retrying a failed request when a mirror has only one active disk. Generally, that makes sense. But during a transition from two disks to one it is possible that the request failed on the failing disk before it was inactivated and, so, the remaining active disk is the disk that should be tried.
This change adds an additional check to ensure that it was the (only) active disk that was already tried.
Reviewed by: mav MFC after: 3 weeks
show more ...
|
#
0d81fba6 |
| 09-Dec-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
geom_mirror: plug set-but-not-unused vars
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
Revision tags: release/12.3.0 |
|
#
7f053a44 |
| 13-Jul-2021 |
Mark Johnston <markj@FreeBSD.org> |
gmirror: Zero the metadata block before writing
The mirror metadata fields contain string buffers and pad bytes, neither were being zeroed before metadata was written to disk. Also, the metadata st
gmirror: Zero the metadata block before writing
The mirror metadata fields contain string buffers and pad bytes, neither were being zeroed before metadata was written to disk. Also, the metadata structure is smaller than the sector size, and in one case gmirror was failing to zero-fill the full buffer before writing.
Fix these problems by pre-zeroing the metadata structure and the sector buffer.
Reported by: KMSAN MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/13.0.0 |
|
#
2f1cfb7f |
| 11-Mar-2021 |
Mark Johnston <markj@FreeBSD.org> |
gmirror: Pre-allocate the timeout event structure
We can't call malloc(M_WAITOK) in a callout handler.
Reviewed by: imp Reported by: pho Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD F
gmirror: Pre-allocate the timeout event structure
We can't call malloc(M_WAITOK) in a callout handler.
Reviewed by: imp Reported by: pho Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29223
show more ...
|
#
cd853791 |
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
Revision tags: release/12.2.0 |
|
#
d22ff249 |
| 18-Oct-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Make g_attach() return ENXIO for orphaned providers; update various classes to add missing error checking.
Reviewed by: imp MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Di
Make g_attach() return ENXIO for orphaned providers; update various classes to add missing error checking.
Reviewed by: imp MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26658
show more ...
|
#
d40bc607 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
geom: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
7029da5c |
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
#
8b522bda |
| 17-Jan-2020 |
Warner Losh <imp@FreeBSD.org> |
Pass BIO_SPEEDUP through all the geom layers
While some geom layers pass unknown commands down, not all do. For the ones that don't, pass BIO_SPEEDUP down to the providers that constittue the geom,
Pass BIO_SPEEDUP through all the geom layers
While some geom layers pass unknown commands down, not all do. For the ones that don't, pass BIO_SPEEDUP down to the providers that constittue the geom, as applicable. No changes to vinum or virstor because I was unsure how to add this support, and I'm also unsure how to test these. gvinum doesn't implement BIO_FLUSH either, so it may just be poorly maintained. gvirstor is for testing and not supportig BIO_SPEEDUP is fine.
Reviewed by: chs Differential Revision: https://reviews.freebsd.org/D23183
show more ...
|
#
879e0604 |
| 12-Jan-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Add KERNEL_PANICKED macro for use in place of direct panicstr tests
|
Revision tags: release/12.1.0 |
|
#
ac03832e |
| 07-Aug-2019 |
Conrad Meyer <cem@FreeBSD.org> |
GEOM: Reduce unnecessary log interleaving with sbufs
Similar to what was done for device_printfs in r347229.
Convert g_print_bio() to a thin shim around g_format_bio(), which acts on an sbuf; docum
GEOM: Reduce unnecessary log interleaving with sbufs
Similar to what was done for device_printfs in r347229.
Convert g_print_bio() to a thin shim around g_format_bio(), which acts on an sbuf; documented in g_bio.9.
Reviewed by: markj Discussed with: rlibby Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21165
show more ...
|
#
a63915c2 |
| 28-Jul-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @r350386
Sponsored by: The FreeBSD Foundation
|
Revision tags: release/11.3.0 |
|
#
9167705c |
| 02-Jul-2019 |
Ryan Libby <rlibby@FreeBSD.org> |
g_mirror_taste: avoid deadlock, always clear tasting flag
If g_mirror_taste encountered an error at g_mirror_add_disk, it might try to g_mirror_destroy the device with the G_MIRROR_DEVICE_FLAG_TASTI
g_mirror_taste: avoid deadlock, always clear tasting flag
If g_mirror_taste encountered an error at g_mirror_add_disk, it might try to g_mirror_destroy the device with the G_MIRROR_DEVICE_FLAG_TASTING flag still set. This would wait on a worker to complete the destruction with g_mirror_try_destroy, but that function bails out if the tasting flag is set, resulting in a deadlock. Clear the tasting flag before trying to destroy the device.
Test Plan: sysctl debug.fail_point.mnowait="1%return" kyua test -k /usr/tests/sys/geom/class/mirror/Kyuafile
Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20744
show more ...
|
#
e532a999 |
| 20-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349234
Sponsored by: The FreeBSD Foundation
|
#
49ee0fce |
| 19-Jun-2019 |
Alexander Motin <mav@FreeBSD.org> |
Use sbuf_cat() in GEOM confxml generation.
When it comes to megabytes of text, difference between sbuf_printf() and sbuf_cat() becomes substantial.
MFC after: 2 weeks Sponsored by: iXsystems, Inc.
|
#
438622af |
| 02-Jan-2019 |
Mark Johnston <markj@FreeBSD.org> |
Use g_handleattr() to reply to GEOM::candelete queries.
g_handleattr() fills out bp->bio_completed; otherwise, g_getattr() returns an error in response to the query. This caused BIO_DELETE support
Use g_handleattr() to reply to GEOM::candelete queries.
g_handleattr() fills out bp->bio_completed; otherwise, g_getattr() returns an error in response to the query. This caused BIO_DELETE support to not be propagated through stacked configurations, e.g., a gconcat of gmirror volumes would not handle BIO_DELETE even when the gmirrors do. g_io_getattr() was not affected by the problem.
PR: 232676 Reported and tested by: noah.bergbauer@tum.de MFC after: 1 week
show more ...
|
#
d2d82bfc |
| 12-Dec-2018 |
Conrad Meyer <cem@FreeBSD.org> |
gmirror: Remove a last-minute INVARIANTS breakage in r341840
I mistakenly added a lock assertion to this routine at the last minute without confirming it was held during g_mirror_create. It isn't (
gmirror: Remove a last-minute INVARIANTS breakage in r341840
I mistakenly added a lock assertion to this routine at the last minute without confirming it was held during g_mirror_create. It isn't (it isn't even initialized yet). Mea culpa. Access is exclusive in both callers, just not always by that particular lock.
Reported by: lwhsu X-MFC-With: r341840, r341674
show more ...
|