Make g_attach() return ENXIO for orphaned providers; update variousclasses to add missing error checking.Reviewed by: impMFC after: 2 weeksSponsored by: NetApp, Inc.Sponsored by: Klara, Inc.Di
Make g_attach() return ENXIO for orphaned providers; update variousclasses to add missing error checking.Reviewed by: impMFC after: 2 weeksSponsored by: NetApp, Inc.Sponsored by: Klara, Inc.Differential Revision: https://reviews.freebsd.org/D26658
show more ...
geom: clean up empty lines in .c and .h files
Consistently use gctl_get_provider instead of home-grown variants.Reviewed by: cem, impMFC after: 2 weeksDifferential revision: https://reviews.freebsd.org/D25739
sys/geom: consistently use _PATH_DEV instead of hardcoding "/dev/".Reviewed by: cemMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D25565
Reimplement aliases in geomThe alias needs to be part of the provider instead of the geom to workproperly. To bind the DEV geom, we need to look at the provider's names andaliases and create the
Reimplement aliases in geomThe alias needs to be part of the provider instead of the geom to workproperly. To bind the DEV geom, we need to look at the provider's names andaliases and create the dev entries from there. If this lives in the GEOM, thenit 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 bulkof the uses in FreeBSD. I think this is all the providers that create a new namebased on their parent's name.
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that arestill 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 arestill 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 andSYSCTL_PROC nodes using one of the soon-to-be-required flags.Mark all obvious cases as MPSAFE. All entries that haven't been markedas MPSAFE before are by default marked as NEEDGIANTApproved by: kib (mentor, blanket)Commented by: kib, gallatin, melifaroDifferential Revision: https://reviews.freebsd.org/D23718
Fix GEOM_MOUNTVER orphanization.Previous code closed and detached consumer even with I/O still in progress.This patch adds locking and request counting to postpone the close tillthe last of runni
Fix GEOM_MOUNTVER orphanization.Previous code closed and detached consumer even with I/O still in progress.This patch adds locking and request counting to postpone the close tillthe last of running requests completes.MFC after: 2 weeksSponsored by: iXsystems, Inc.
GEOM: Reduce unnecessary log interleaving with sbufsSimilar to what was done for device_printfs in r347229.Convert g_print_bio() to a thin shim around g_format_bio(), which acts on ansbuf; docum
GEOM: Reduce unnecessary log interleaving with sbufsSimilar to what was done for device_printfs in r347229.Convert g_print_bio() to a thin shim around g_format_bio(), which acts on ansbuf; documented in g_bio.9.Reviewed by: markjDiscussed with: rlibbySponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D21165
Annotate geom modules with MODULE_VERSIONGEOM ELI may double ask the password during boot. Once at loader time, andonce at init time.This happens due a module loading bug. By default GEOM ELI ca
Annotate geom modules with MODULE_VERSIONGEOM ELI may double ask the password during boot. Once at loader time, andonce at init time.This happens due a module loading bug. By default GEOM ELI caches thepassword in the kernel, but without the MODULE_VERSION annotation, thekernel loads over the kernel module, even if the GEOM ELI was compiled intothe kernel. In this case, the newly loaded modulepurges/invalidates/overwrites the GEOM ELI's password cache, which causesthe double asking.MFC Note: There's a pc98 component to the original submission that isomitted here due to pc98 removal in head. This part will need to be revivedupon MFC.Reviewed by: impSubmitted by: opObtained from: opBSDMFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D14992
sys/geom: adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone
sys/geom: adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Add back missing MTX_DEF, it still needs to be there.(Although it's defined to be 0, so there's no functional change.)Reported by: glebiusMFC after: 2 weeks
Make gmountver(8) use direct dispatch.MFC after: 2 weeks
Make gmountver(8) use G_PF_ACCEPT_UNMAPPED.MFC after: 2 weeks
Don't destroy gmountver(8) devices on shutdown, unless they are orphaned.Otherwise we would fail to sync the filesystem on reboot.MFC after: 2 weeksSponsored by: DARPA, AFRL
Use g_wither_provider() where applicable.It is just a helper function combining G_PF_WITHER setting withg_orphan_provider().
Removal of Giant droping wrappers for GEOM classes.Sponsored by: The FreeBSD Foundation
- Don't pass geom and provider names as format strings.- Add __printflike() attributes.- Remove an extra argument for the g_new_geomf() call in swapongeom_ev().Reviewed by: pjd
Add trivial resize handling to gmountver(8).Reviewed by: mavSponsored by: FreeBSD Foundation
Avoid to check the same cache line/variable from all the lockingprimitives by breaking stop_scheduler into a per-thread variable.Also, store the new td_stopsched very close to td_*locks members as
Avoid to check the same cache line/variable from all the lockingprimitives by breaking stop_scheduler into a per-thread variable.Also, store the new td_stopsched very close to td_*locks members asthey will be accessed mostly in the same codepaths as td_stopsched andthis results in avoiding a further cache-line pollution, possibly.STOP_SCHEDULER() was pondered to use a new 'thread' argument, in order totake advantage of already cached curthread, but in the end there shouldnot really be a performance benefit, while introducing a KPI breakage.In collabouration with: floReviewed by: avgMFC after: 3 months (or never)X-MFC: r228424
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else,
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.The SYSCTL_NODE macro defines a list that stores all child-elements ofthat node. If there's no SYSCTL_DECL macro anywhere else, there's noreason why it shouldn't be static.
Include sys/sbuf.h directly.Reviewed by: pjd
Remove unneeded code.MFC after: 1 week
Make sure not to pass NULL to g_orphan_provider().Found with: Coverity PreventCID: 3411
Remove unused variable.Found with: clang
Add gmountver, disk mount verification GEOM class.Note that due to e.g. write throttling ('wdrain'), it can stall all the diskI/O instead of just the device it's configured for. Using it for remo
Add gmountver, disk mount verification GEOM class.Note that due to e.g. write throttling ('wdrain'), it can stall all the diskI/O instead of just the device it's configured for. Using it for removablemedia is therefore not a good idea.Reviewed by: pjd (earlier version)