GEOM: Set G_CF_DIRECT_SEND/RECEIVE for taste consumers.All I/O requests through the taste consumers are synchronous, donewith g_read_data() and without any locks held. It makes no senseto delega
GEOM: Set G_CF_DIRECT_SEND/RECEIVE for taste consumers.All I/O requests through the taste consumers are synchronous, donewith g_read_data() and without any locks held. It makes no senseto delegate the I/O to g_down/g_up threads.This removes many of context switches during disk retaste.MFC after: 2 weeks(cherry picked from commit 10ae42ccbde4fe7c8c9de3d54f3c0d63457a1a68)
show more ...
graid3: Zero the metadata block before writingEnsure that string buffers and pad bytes are zero-filled before writinggraid3 metadata.Reported by: KMSANSponsored by: The FreeBSD Foundation(che
graid3: Zero the metadata block before writingEnsure that string buffers and pad bytes are zero-filled before writinggraid3 metadata.Reported by: KMSANSponsored by: The FreeBSD Foundation(cherry picked from commit 39552dff7bb5463a74e5195d65a3252c583d9414)
Make MAXPHYS tunable. Bump MAXPHYS to 1M.Replace MAXPHYS by runtime variable maxphys. It is initialized fromMAXPHYS 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 fromMAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.Make b_pages[] array in struct buf flexible. Size b_pages[] for buffercache buffers exactly to atop(maxbcachebuf) (currently it is sized toatop(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 suchbuffers come from userspace (*). Overall, we save significant amountof 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 driversources, except a place which initialize maxphys. Some random (andarguably weird) uses of MAXPHYS, e.g. in linuxolator, are convertedstraight. Some drivers, which use MAXPHYS to size embeded structures,get private MAXPHYS-like constant; their convertion is out of scopefor 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: phoSponsored by: The FreeBSD FoundationDifferential revision: https://reviews.freebsd.org/D27225
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
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
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
Pass BIO_SPEEDUP through all the geom layersWhile some geom layers pass unknown commands down, not all do. For the ones thatdon't, pass BIO_SPEEDUP down to the providers that constittue the geom,
Pass BIO_SPEEDUP through all the geom layersWhile some geom layers pass unknown commands down, not all do. For the ones thatdon't, pass BIO_SPEEDUP down to the providers that constittue the geom, asapplicable. No changes to vinum or virstor because I was unsure how to add thissupport, and I'm also unsure how to test these. gvinum doesn't implementBIO_FLUSH either, so it may just be poorly maintained. gvirstor is for testingand not supportig BIO_SPEEDUP is fine.Reviewed by: chsDifferential Revision: https://reviews.freebsd.org/D23183
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
Use sbuf_cat() in GEOM confxml generation.When it comes to megabytes of text, difference between sbuf_printf() andsbuf_cat() becomes substantial.MFC after: 2 weeksSponsored by: iXsystems, Inc.
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.
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
sys/geom: spelling fixes in comments.No functional change.
Bump bio_cmd and bio_*flags from 8 bits to 16.Differential Revision: https://reviews.freebsd.org/D5784
Create an API to reset a struct bio (g_reset_bio). This is mandatoryfor all struct bio you get back from g_{new,alloc}_bio. Temporarybios that you create on the stack or elsewhere should use this b
Create an API to reset a struct bio (g_reset_bio). This is mandatoryfor all struct bio you get back from g_{new,alloc}_bio. Temporarybios that you create on the stack or elsewhere should use this beforefirst use of the bio, and between uses of the bio. At the moment, itis nothing more than a wrapper around bzero, but that may change inthe future. The wrapper also removes one place where we encode thesize of struct bio in the KBI.
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and cle
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenyears for head. However, it is continuously misused as the mpsafe argumentfor callout_init(9). Deprecate the flag and clean up callout_init() callsto make them more consistent.Differential Revision: https://reviews.freebsd.org/D2613Reviewed by: jhbMFC after: 2 weeks
Pull in r267961 and r267973 again. Fix for issues reported will follow.
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1
Revert r267961, r267973:These changes prevent sysctl(8) from returning proper output,such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statica
Extend the meaning of the CTLFLAG_TUN flag to automatically check ifthere is an environment variable which shall initialize the SYSCTLduring early boot. This works for all SYSCTL types both statically anddynamically created ones, except for the SYSCTL NODE type and SYSCTLswhich belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added tobe used in the case a tunable sysctl has a custom initialisationfunction allowing the sysctl to still be marked as a tunable. Thekernel SYSCTL API is mostly the same, with a few exceptions for somespecial operations like iterating childrens of a static/extern SYSCTLnode. This operation should probably be made into a factored outcommon macro, hence some device drivers use this. The reason forchanging the SYSCTL API was the need for a SYSCTL parent OID pointerand not only the SYSCTL parent OID list pointer in order to quicklygenerate the sysctl path. The motivation behind this patch is to avoidparameter loading cludges inside the OFED driver subsystem. Instead ofadding special code to the OFED driver subsystem to post-load tunablesinto dynamically created sysctls, we generalize this in the kernel.Other changes:- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"to "hw.pcic.intr_mask".- Removed redundant TUNABLE statements throughout the kernel.- Some minor code rewrites in connection to removing not neededTUNABLE statements.- Added a missing SYSCTL_DECL().- Wrapped two very long lines.- Avoid malloc()/free() inside sysctl string handling, in case it iscalled to initialize a sysctl from a tunable, hence malloc()/free() isnot ready when sysctls from the sysctl dataset are registered.- Bumped FreeBSD version to indicate SYSCTL API change.MFC after: 2 weeksSponsored by: Mellanox Technologies
Allow to insert new component to geom_raid3 without specifying number.PR: kern/160562MFC after: 2 weeks
Alike to r242314 for GRAID make GRAID3 more aggressive in marking volumesas clean on shutdown and move that action from shutdown_pre_sync stage toshutdown_post_sync to avoid extra flapping.ZFS te
Alike to r242314 for GRAID make GRAID3 more aggressive in marking volumesas clean on shutdown and move that action from shutdown_pre_sync stage toshutdown_post_sync to avoid extra flapping.ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAIDto shutdown gracefully. To handle that, mark volume as clean just whenshutdown time comes and there are no active writes.MFC after: 2 weeks
When synchronizing, include in the config dump amount ofbytes syncronized. The rationale behind this is the following: for large disks thepercent synchronisation counter ticks too seldom, and mon
When synchronizing, include in the config dump amount ofbytes syncronized. The rationale behind this is the following: for large disks thepercent synchronisation counter ticks too seldom, and monitoringsoftware (as well as human operator) can't tell whethersynchronisation goes on or one of disks got stuck. On an idleserver one can look into gstat and see whether synchronisation goeson or not, but on a busy server that won't work. Also, new valuemonitored can be differentiated obtaining the synchronisation speedquite precisely.Submitted by: Konstantin Kukushkin <dark ramtel.ru>Reviewed by: pjd
123456