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/
|
#
d3eb9d3d |
| 01-Jul-2023 |
santhoshkumar-mani <santhosh.santuu@gmail.com> |
bios: Don't keep sending BIO_FLUSH after first ENOTSUPP.
When a storage device reports that it does not support cache flush, the GEOM disk layer by default returns ENOTSUPP in response to a BIO_FLUS
bios: Don't keep sending BIO_FLUSH after first ENOTSUPP.
When a storage device reports that it does not support cache flush, the GEOM disk layer by default returns ENOTSUPP in response to a BIO_FLUSH command.
On AWS, local volumes do not advertise themselves as having write-cache enabled. When they are selected for L3 on all HDD nodes, the L3 subsystem may inadvertently kick these L3 devices if a BIO_FLUSH command fails with an ENOTSUPP return code. The fix is to make GEOM disk return success (0) when this condition occurs and add a sysctl to make this error handling config-driven
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/710
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
90bcc81b |
| 14-Jul-2022 |
Alexander Motin <mav@FreeBSD.org> |
Delay GEOM disk_create() until CAM periph probe completes.
Before this patch CAM periph drivers called both disk_alloc() and disk_create() same time on periph creation. But then prevented disks fro
Delay GEOM disk_create() until CAM periph probe completes.
Before this patch CAM periph drivers called both disk_alloc() and disk_create() same time on periph creation. But then prevented disks from opening until the periph probe completion with cam_periph_hold(). As result, especially if disk misbehaves during the probe, GEOM event thread, triggered to taste the disk, got blocked on open attempt, potentially for a long time, unable to process other events.
This patch moves disk_create() call from periph creation to the end of the probe. To allow disk_create() calls from non-sleepable CAM contexts some of its duties requiring memory allocations are moved either back to disk_alloc() or forward to g_disk_create(), so now disk_alloc() and disk_add_alias() are the only disk methods that require sleeping. If disk fails during the probe disk_create() may just be skipped, going directly to disk_destroy(). Other method calls during that time are just ignored. Since GEOM may now see the disks after CAM bus scan is already completed, introduce per-periph boot hold functions. Enclosure driver already had such mechanism, so just generalize it.
Reviewed by: imp MFC after: 1 month Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D35784
show more ...
|
Revision tags: release/13.1.0 |
|
#
2d5d2424 |
| 04-Dec-2021 |
Scott Long <scottl@FreeBSD.org> |
Fix "set but not used" for geom
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
Revision tags: release/12.3.0 |
|
#
645b7efd |
| 11-Aug-2021 |
Mark Johnston <markj@FreeBSD.org> |
geom_disk: Add KMSAN checks
- In g_disk_start(), verify that the data to be written is initialized according to KMSAN shadow state. - In g_disk_done(), verify that the block driver updated shadow
geom_disk: Add KMSAN checks
- In g_disk_start(), verify that the data to be written is initialized according to KMSAN shadow state. - In g_disk_done(), verify that the block driver updated shadow state as expected, so as to catch sources of false positives early.
Sponsored by: The FreeBSD Foundation
show more ...
|
#
c2da9542 |
| 11-Aug-2021 |
Alexander Motin <mav@FreeBSD.org> |
geom(4): Mark all sysctls as CTLFLAG_MPSAFE.
This code does not use Giant lock for very long time.
MFC after: 2 weeks
|
#
47aeda7b |
| 23-Jul-2021 |
Warner Losh <imp@FreeBSD.org> |
geom_disk: use a preallocated geom_event for disk destruction.
Preallocate a geom_event (using the new geom_alloc_event) when we create a disk. When we create the disk, we're going to be in a sleepa
geom_disk: use a preallocated geom_event for disk destruction.
Preallocate a geom_event (using the new geom_alloc_event) when we create a disk. When we create the disk, we're going to be in a sleepable context, so we can always allocate this extra bit of memory. Then use this preallocated memory to free the disk. CAM can try to free the disk from an unsleepable context if there was I/O outstanding when the disk was destroyted (say because the SIM said it had gone away). The I/O context isn't sleepable. Rather than trying to invent a retry mechanism and making sure all the other geom_disk consumers did it properly, preallocating the event ensure that the geom_disk will be properly torn down, even when there's memory pressure when the disk departs.
Reviewd by: jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30544
show more ...
|
Revision tags: release/13.0.0 |
|
#
a3f4217e |
| 27-Oct-2020 |
Warner Losh <imp@FreeBSD.org> |
Remove frontstuff
Nothing implements this in the tree. Remove the ioctl and the conversion to the geom atttribute stuff.
This was introduced in r94287 in 2002 and was retired in r113390 2003. It ap
Remove frontstuff
Nothing implements this in the tree. Remove the ioctl and the conversion to the geom atttribute stuff.
This was introduced in r94287 in 2002 and was retired in r113390 2003. It appeared in FreeBSD 5.0, but no other releases. This is a vestige that was missed at the time and overlooked until now. No compat is provided for this reason. And there's no implementation of it today. And it was never part of a release from a stable branch.
Reviewed by: phk@ Differential Revision: https://reviews.freebsd.org/D26967
show more ...
|
Revision tags: release/12.2.0 |
|
#
d40bc607 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
geom: clean up empty lines in .c and .h files
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
773e541e |
| 21-Aug-2020 |
Warner Losh <imp@FreeBSD.org> |
Use devctl.h instead of bus.h to reduce newbus pollution.
There's no need for these parts of the kernel to know about newbus, so narrow what is included to devctl.h for device_notify_*.
Suggested b
Use devctl.h instead of bus.h to reduce newbus pollution.
There's no need for these parts of the kernel to know about newbus, so narrow what is included to devctl.h for device_notify_*.
Suggested by: kib@
show more ...
|
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 ...
|
#
9cf73822 |
| 08-Apr-2020 |
Warner Losh <imp@FreeBSD.org> |
Now that we don't have special-case geom hacking defined in md_var.h, stop including it. sparc64 was the last straggler here, but these weren't removed at the time.
|
#
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 ...
|
#
a78eada5 |
| 01-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357350 through r357367.
|
#
76b47dfb |
| 01-Feb-2020 |
Pawel Jakub Dawidek <pjd@FreeBSD.org> |
The error variable is not really needed. Remove it.
|
#
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 ...
|
#
4aa1289a |
| 31-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Avoid few memory accesses in g_disk_done().
|
#
024932aa |
| 30-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Use atomic for start_count in devstat_start_transaction().
Combined with earlier nstart/nend removal it allows to remove several locks from request path of GEOM and few other places. It would be co
Use atomic for start_count in devstat_start_transaction().
Combined with earlier nstart/nend removal it allows to remove several locks from request path of GEOM and few other places. It would be cool if we had more SMP-friendly statistics, but this helps too.
Sponsored by: iXsystems, Inc.
show more ...
|
#
5ccbeea1 |
| 06-Dec-2019 |
Alexander Motin <mav@FreeBSD.org> |
Remove some branching from GEOM_DISK hot path.
pp->private just can not be NULL in those places.
In g_disk_start() and g_disk_ioctl() both dp != NULL and !dp->d_destroyed should always be true if d
Remove some branching from GEOM_DISK hot path.
pp->private just can not be NULL in those places.
In g_disk_start() and g_disk_ioctl() both dp != NULL and !dp->d_destroyed should always be true if disk_gone() and disk_destroy() are used properly, since GEOM does not send requests to errored providers. If the protocol is not followed, then no amount of additional checks here give real safety.
In g_disk_access() though the checks are useful, since GEOM blocks only new opens for errored providers, but allows closes. It should not happen if disk_gone() and disk_destroy() are used properly, but may otherwise.
To improve cases when disk_gone() is not used, call it from disk_destroy(). It does not give full guaranties, but it errors the provider and makes GEOM block unwanted requests at least after some race.
MFC after: 2 weeks
show more ...
|
#
b5961be1 |
| 09-Nov-2019 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add GEOM attribute to report physical device name, and report it via 'diskinfo -v'. This avoids the need to track it down via CAM, and should also work for disks that don't use CAM. And since it's
Add GEOM attribute to report physical device name, and report it via 'diskinfo -v'. This avoids the need to track it down via CAM, and should also work for disks that don't use CAM. And since it's inherited thru the GEOM hierarchy, in most cases one doesn't need to walk the GEOM graph either, eg you can use it on a partition instead of disk itself.
Reviewed by: allanjude, imp Sponsored by: Klara Inc Differential Revision: https://reviews.freebsd.org/D22249
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
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.
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
6ce374aa |
| 15-Jan-2018 |
Andriy Gapon <avg@FreeBSD.org> |
geom_disk / scsi_da: deny opening write-protected disks for writing
Ths change consists of two parts.
geom_disk: deny opening a disk for writing if it's marked as write-protected. A new disk(9) fl
geom_disk / scsi_da: deny opening write-protected disks for writing
Ths change consists of two parts.
geom_disk: deny opening a disk for writing if it's marked as write-protected. A new disk(9) flag is added to mark write protected disks. A possible alternative could be to add another parameter to d_open, so that the open mode could be passed to it and the disk drivers could make the decision internally, but the flag required less churn.
scsi_da: add a new phase of disk probing to query the all pages mode sense page. We can determine if the disk is write protected using bit 7 of the device specific field in the mode parameter header returned by MODE SENSE.
PR: 224037 Reviewed by: mav MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D13360
show more ...
|