Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
cc1ec772 |
| 22-Jul-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
Adjust g_waitidle() visibility and definition
Explicitly pass the struct thread argument. Move the function prototype from sys/systm.h to geom/geom.h, we do not need almost each kernel source to see
Adjust g_waitidle() visibility and definition
Explicitly pass the struct thread argument. Move the function prototype from sys/systm.h to geom/geom.h, we do not need almost each kernel source to see the prototype, it is now used only by kern/vfs_mountroot.c outside geom/geom_event.c, where the function is defined.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
show more ...
|
#
90e29718 |
| 16-Jul-2022 |
Kirk McKusick <mckusick@FreeBSD.org> |
Clarify when GEOM utilities exit with success or failure.
Historically, GEOM utilities (gpart(8), gstripe(8), gmirror(8), etc) used the gctl_error() routine to report errors. If they called gctl_err
Clarify when GEOM utilities exit with success or failure.
Historically, GEOM utilities (gpart(8), gstripe(8), gmirror(8), etc) used the gctl_error() routine to report errors. If they called gctl_error() they would exit with EXIT_FAILURE, otherwise they would return with EXIT_SUCCESS. If they used gctl_error() to output an informational message, for example when run with the -v (verbose) option, they would mistakenly exit with EXIT_FAILURE. A further limitation of the gctl_error() function was that it could only be called once. Messages from any additional calls to gctl_error() would be silently discarded.
To resolve these problems a new function, gctl_msg() has been added. It can be called multiple times to output multiple messages. It also has an additional errno argument which should be zero if it is an informational message or an errno value (EINVAL, EBUSY, etc) if it is an error. When done the gctl_post_messages() function should be called to indicate that all messages have been posted. If any of the messages had a non-zero errno, the utility will EXIT_FAILURE. If only informational messages (with zero errno) were posted, the utility will EXIT_SUCCESS.
Tested by: Peter Holm PR: 265184 MFC after: 1 week
show more ...
|
Revision tags: release/13.1.0 |
|
#
7f16b501 |
| 12-Mar-2022 |
Alexander Motin <mav@FreeBSD.org> |
GEOM: Introduce partial confxml API
Traditionally the GEOM's primary channel of information from kernel to user-space was confxml, fetched by libgeom through kern.geom.confxml sysctl. It is conveni
GEOM: Introduce partial confxml API
Traditionally the GEOM's primary channel of information from kernel to user-space was confxml, fetched by libgeom through kern.geom.confxml sysctl. It is convenient and informative, representing full state of GEOM in a single XML document. But problems start to arise on systems with hundreds of disks, where the full confxml size reaches many megabytes, taking significant time to first write it and then parse.
This patch introduces alternative solution, allowing to fetch much smaller XML document, subset of the full confxml, limited to 64KB and representing only one specified geom and optionally its parents. It uses existing GEOM control interface, extended with new "getxml" verb. In case of any error, such as the buffer overflow, it just transparently falls back to traditional full confxml. This patch uses the new API in user-space GEOM tools where it is possible.
Reviewed by: imp MFC after: 2 month Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D34529
show more ...
|
#
c8cc5689 |
| 20-Feb-2022 |
Kirk McKusick <mckusick@FreeBSD.org> |
Provide an interface that allows GEOM modules to return multiple messages.
The gctl_error() function provides GEOM modules with the ability to report only a single message. When running with the ver
Provide an interface that allows GEOM modules to return multiple messages.
The gctl_error() function provides GEOM modules with the ability to report only a single message. When running with the verbose flag, commands that handle multiple devices may want to report a message for each of the devices on which it operates. This commit adds the gctl_msg() function that can be called multiple times to post messages. When finished issuing messages, the application must either call gctl_post_messages() or call gctl_error() to cause the messages to be reported to the calling process.
Tested by: Peter Holm
show more ...
|
#
f4bf48c2 |
| 28-Dec-2021 |
Alexander Motin <mav@FreeBSD.org> |
GEOM: Minor polishing in geom_event.
- Remove timeouts from msleep()'s. Those should always be woken up. - Move wakeup() under the lock to not call on possibly freed pointer. - Remove some dead
GEOM: Minor polishing in geom_event.
- Remove timeouts from msleep()'s. Those should always be woken up. - Move wakeup() under the lock to not call on possibly freed pointer. - Remove some dead code.
MFC after: 2 weeks
show more ...
|
Revision tags: release/12.3.0 |
|
#
9cb485d1 |
| 16-Oct-2021 |
Wuyang Chung <wy-chung@outlook.com> |
geom: Remove g_class.config
g_class.config is write only, remove it.
|
#
380710a5 |
| 23-Jul-2021 |
Warner Losh <imp@FreeBSD.org> |
geom: create an API to allocate events, and use that storage to send them
g_alloc_event will allocate storage for an opaque event. g_post_event_ep can use memory returned by g_alloc_event to send an
geom: create an API to allocate events, and use that storage to send them
g_alloc_event will allocate storage for an opaque event. g_post_event_ep can use memory returned by g_alloc_event to send an event from a context that might not be able to allocate the event. Occasionally, we can alloate memory when we create an object, but not while we're destroy it. This allows one to allocate at creation time memory to use when destorying the object.
Reviewed by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30544
show more ...
|
Revision tags: release/13.0.0 |
|
#
f4499487 |
| 11-Nov-2020 |
Mark Johnston <markj@FreeBSD.org> |
ffs: Clamp BIO_SPEEDUP length
On 32-bit platforms, the computed size of the BIO_SPEEDUP requested by softdep_request_cleanup() may be negative when assigned to bp->b_bcount, which has type "long".
ffs: Clamp BIO_SPEEDUP length
On 32-bit platforms, the computed size of the BIO_SPEEDUP requested by softdep_request_cleanup() may be negative when assigned to bp->b_bcount, which has type "long".
Clamp the size to LONG_MAX. Also convert the unused g_io_speedup() to use an off_t for the magnitude of the shortage for consistency with softdep_send_speedup().
Reviewed by: chs, kib Reported by: pho Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27081
show more ...
|
Revision tags: release/12.2.0 |
|
#
c7aa572c |
| 31-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
17996960 |
| 31-Jul-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363583 through r363738.
|
#
a450ecfd |
| 27-Jul-2020 |
Xin LI <delphij@FreeBSD.org> |
gctl_get_geom: Skip validation of g_class.
The caller from kernel is expected to provide an valid g_class pointer, instead of traversing the global g_class list, just use that pointer directly inste
gctl_get_geom: Skip validation of g_class.
The caller from kernel is expected to provide an valid g_class pointer, instead of traversing the global g_class list, just use that pointer directly instead.
Reviewed by: mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25811
show more ...
|
#
8510f61a |
| 09-Jul-2020 |
Xin LI <delphij@FreeBSD.org> |
sys/geom: consistently use _PATH_DEV instead of hardcoding "/dev/".
Reviewed by: cem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25565
|
Revision tags: release/11.4.0 |
|
#
ae1cce52 |
| 13-May-2020 |
Warner Losh <imp@FreeBSD.org> |
Reimplement aliases in geom
The alias needs to be part of the provider instead of the geom to work properly. To bind the DEV geom, we need to look at the provider's names and aliases and create the
Reimplement aliases in geom
The alias needs to be part of the provider instead of the geom to work properly. To bind the DEV geom, we need to look at the provider's names and aliases and create the dev entries from there. If this lives in the GEOM, then it won't propigate down the tree properly. Remove it from geom, add it provider.
Update geli, gmountver, gnop, gpart, and guzip to use it, which handles the bulk of the uses in FreeBSD. I think this is all the providers that create a new name based on their parent's name.
show more ...
|
#
cefbc0d1 |
| 25-Apr-2020 |
Pawel Jakub Dawidek <pjd@FreeBSD.org> |
Add g_topology_locked() macro that returns true if we already hold the GEOM topology lock.
|
#
9794a803 |
| 30-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Retire nstart/nend counters.
Those counters were abused for decade to workaround broken orphanization process in different classes by delaying the call while there are active requests. But from one
Retire nstart/nend counters.
Those counters were abused for decade to workaround broken orphanization process in different classes by delaying the call while there are active requests. But from one side it did not close all the races, while from another was quite expensive on SMP due to trashing twice per request cache lines of consumer and provider and requiring locks. It lost its sense after I manually went through all the GEOM classes in base and made orphanization wait for either provider close or request completion.
Consumer counters are still used under INVARIANTS to detect premature consumer close and detach. Provider counters are removed completely.
Sponsored by: iXsystems, Inc.
show more ...
|
#
86c06ff8 |
| 29-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Remove GEOM_SCHED class and gsched tool.
This code was not actively maintained since it was introduced 10 years ago. It lacks support for many later GEOM features, such as direct dispatch, unmapped
Remove GEOM_SCHED class and gsched tool.
This code was not actively maintained since it was introduced 10 years ago. It lacks support for many later GEOM features, such as direct dispatch, unmapped I/O, stripesize/stripeoffset, resize, etc. Plus it is the only remaining use of GEOM nstart/nend request counters, used there to implement live insertion/removal, questionable by itself. Plus, as number of people commented, GEOM is not the best place for I/O scheduler, since it has limited information about layers both above and below it, required for efficient scheduling. Plus with the modern shift to SSDs there is just no more significant need for this kind of scheduling.
Approved by: imp, phk, luigi Relnotes: yes
show more ...
|
#
b182c792 |
| 17-Dec-2019 |
Warner Losh <imp@FreeBSD.org> |
Add BIO_SPEEDUP
Add BIO_SPEEDUP bio command and g_io_speedup wrapper. It tells the lower layers that the upper layers are dealing with some shortage (dirty pages and/or disk blocks). The lower layer
Add BIO_SPEEDUP
Add BIO_SPEEDUP bio command and g_io_speedup wrapper. It tells the lower layers that the upper layers are dealing with some shortage (dirty pages and/or disk blocks). The lower layers should do what they can to speed up anything that's been delayed.
The first use will be to tell the CAM I/O scheduler that any TRIM shaping should be short-circuited because the system needs blocks. We'll also call it when there's too many resources used by UFS.
Reviewed by: kirk, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18351
show more ...
|
#
c4c88d47 |
| 05-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Remove duplicate g_debugflags declaration.
While there, define G_F_FOOTSHOOTING instead of numeric constants.
MFC after: 13 days X-MFX-with: r355412
|
#
2efaef42 |
| 05-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Wrap g_trace() into a macro to avoid unneeded calls.
In most cases with debug disabled this function does nothing, but argument passing and the call still cost measurable time due to cache misses, e
Wrap g_trace() into a macro to avoid unneeded calls.
In most cases with debug disabled this function does nothing, but argument passing and the call still cost measurable time due to cache misses, etc.
MFC after: 2 weeks Sponsored by: iXsystems, Inc.
show more ...
|
Revision tags: release/12.1.0 |
|
#
1e00bb45 |
| 16-Oct-2019 |
Chuck Silvers <chs@FreeBSD.org> |
Add a new gctl_get_paraml_opt() interface to extract optional parameters from the request. It is the same as gctl_get_paraml() except that the request is not marked with an error if the parameter is
Add a new gctl_get_paraml_opt() interface to extract optional parameters from the request. It is the same as gctl_get_paraml() except that the request is not marked with an error if the parameter is not present.
Approved by: imp (mentor) Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21972
show more ...
|
#
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 ...
|
Revision tags: release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
b951b8f7 |
| 06-May-2019 |
Roger Pau Monné <royger@FreeBSD.org> |
geom: fix initialization order
There's a race between the initialization of devsoftc.mtx (by devinit) and the creation of the geom worker thread g_run_events, which calls devctl_queue_data_f. Both o
geom: fix initialization order
There's a race between the initialization of devsoftc.mtx (by devinit) and the creation of the geom worker thread g_run_events, which calls devctl_queue_data_f. Both of those are initialized at SI_SUB_DRIVERS and SI_ORDER_FIRST, which means the geom worked thread can be created before the mutex has been initialized, leading to the panic below:
wpanic: mtx_lock() of spin mutex (null) @ /usr/home/osstest/build.135317.build-amd64-freebsd/freebsd/sys/kern/subr_bus.c:620 cpuid = 3 time = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe003b968710 vpanic() at vpanic+0x19d/frame 0xfffffe003b968760 panic() at panic+0x43/frame 0xfffffe003b9687c0 __mtx_lock_flags() at __mtx_lock_flags+0x145/frame 0xfffffe003b968810 devctl_queue_data_f() at devctl_queue_data_f+0x6a/frame 0xfffffe003b968840 g_dev_taste() at g_dev_taste+0x463/frame 0xfffffe003b968a00 g_load_class() at g_load_class+0x1bc/frame 0xfffffe003b968a30 g_run_events() at g_run_events+0x197/frame 0xfffffe003b968a70 fork_exit() at fork_exit+0x84/frame 0xfffffe003b968ab0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe003b968ab0 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- KDB: enter: panic [ thread pid 13 tid 100029 ] Stopped at kdb_enter+0x3b: movq $0,kdb_why
Fix this by initializing geom at SI_ORDER_SECOND instead of SI_ORDER_FIRST.
Sponsored by: Citrix Systems R&D Reviewed by: kevans, markj Differential revision: https://reviews.freebsd.org/D20148
show more ...
|
Revision tags: release/12.0.0 |
|
#
2a22df74 |
| 04-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339813 through r340125.
|