graid: Set G_CF_DIRECT_SEND for task consumer.Unlike normal consumers all taste consumer I/O is synchronous, donewith g_read_data() and without any locks held. It makes no sense todelegate I/O s
graid: Set G_CF_DIRECT_SEND for task consumer.Unlike normal consumers all taste consumer I/O is synchronous, donewith g_read_data() and without any locks held. It makes no sense todelegate I/O submission to g_down thread.This should remove number of context switches during disk retaste.MFC after: 2 weeks(cherry picked from commit 0d8cec7658d50e4190899376330c2c1eb5d8c659)
show more ...
graid: Avoid tasting devices with small sector sizesThe RAID metadata parsers effectively assume a sector size of 512 bytesor larger, but md(4) devices can be created with a sector size that'sany
graid: Avoid tasting devices with small sector sizesThe RAID metadata parsers effectively assume a sector size of 512 bytesor larger, but md(4) devices can be created with a sector size that'sany power of 2. Add some seatbelts to graid tasting routines to ensurethat the requested sector(s) are large enough for the device toplausibly contain RAID metadata.Reported by: [email protected]Reported by: [email protected]Reported by: [email protected]Reported by: [email protected]Sponsored by: The FreeBSD Foundation(cherry picked from commit 9e9ba9c73de9206d82b8390c47b07f71470d001a)
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
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.
Separate kernel crc32() implementation to its own header (gsb_crc32.h) andrename the source to gsb_crc32.c.This is a prerequisite of unifying kernel zlib instances.PR: 229763Submitted by: Yosh
Separate kernel crc32() implementation to its own header (gsb_crc32.h) andrename the source to gsb_crc32.c.This is a prerequisite of unifying kernel zlib instances.PR: 229763Submitted by: Yoshihiro Ota <ota at j.email.ne.jp>Differential Revision: https://reviews.freebsd.org/D20193
List-ify kernel dump device configurationAllow users to specify multiple dump configurations in a prioritized list.This enables fallback to secondary device(s) if primary dump fails. E.g.,one mi
List-ify kernel dump device configurationAllow users to specify multiple dump configurations in a prioritized list.This enables fallback to secondary device(s) if primary dump fails. E.g.,one might configure a preference for netdump, but fallback to disk dump as asecond choice if netdump is unavailable.This change does not list-ify netdump configuration, which is trackedseparately from ordinary disk dumps internally; only one netdumpconfiguration can be made at a time, for now. It also does not implementIPv6 netdump.savecore(8) is already capable of scanning and iterating multiple devicesfrom /etc/fstab or passed on the command line.This change doesn't update the rc or loader variables 'dumpdev' in any way;it can still be set to configure a single dump device, and rc.d/savecorestill uses it as a single device. Only dumpon(8) is updated to be able toconfigure the more complicated configurations for now.As part of revving the ABI, unify netdump and disk dump configuration ioctl/ structure, and leave room for ipv6 netdump as a future possibility.Backwards-compatibility ioctls are added to smooth ABI transition,especially for developers who may not keep kernel and userspace perfectlysynced.Reviewed by: markj, scottl (earlier version)Relnotes: maybeSponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D19996
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_DELETEsupport
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_DELETEsupport to not be propagated through stacked configurations, e.g.,a gconcat of gmirror volumes would not handle BIO_DELETE even whenthe gmirrors do. g_io_getattr() was not affected by the problem.PR: 232676Reported and tested by: [email protected]MFC after: 1 week
Extend stripeoffset and stripesize of GEOMs from u_int to off_tGEOM's stripeoffset overflows at 4 gigabyte margin (2^32)because of its u_int type. This leads to incorrect data in the outputgenera
Extend stripeoffset and stripesize of GEOMs from u_int to off_tGEOM's stripeoffset overflows at 4 gigabyte margin (2^32)because of its u_int type. This leads to incorrect data in the outputgenerated by "sysctl kern.geom.confxml" command, "graid list" etc.when GEOM array has volumes larger than 4G, for example.This change does not affect ABI but changes KBI. No MFC planned.Differential Revision: https://reviews.freebsd.org/D13426
Fix use-after-free in RAID0 error reporting of GEOM_RAID.PR: 231510Submitted by: [email protected]Approved by: re (gjb)MFC after: 1 week
Squash error from geom by sizing ident strings to DISK_IDENT_SIZE.Display attribute in future error strings and differentiate g_handleattr()error messages for ease of debugging in the future."g_
Squash error from geom by sizing ident strings to DISK_IDENT_SIZE.Display attribute in future error strings and differentiate g_handleattr()error messages for ease of debugging in the future."g_handleattr: md1 bio_length 24 strlen 31 -> EFAULT"Reported by: swillsReviewed by: imp cem avgSponsored by: Limelight NetworksDifferential Revision: https://reviews.freebsd.org/D14962
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(
Do pass removing some write-only variables from the kernel.This reduces noise when kernel is compiled by newer GCC versions,such as one used by external toolchain ports.Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial)Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c)Differential Revision: https://reviews.freebsd.org/D10385
geom_raid (RAID5): do not lose bp->bio_error, keep it in pbp->bio_errorand return it by passing to g_raid_iodone()Approved by: mav (mentor)MFC after: 3 days
Fix use-after-free that sometimes results in a garbage returnedinstead of right error code after requests to SINGLE/CONCAT volumes, f.e:# dd if=/dev/raid/r0 bs=512 of=/dev/nulldd: /dev/raid/r0: U
Fix use-after-free that sometimes results in a garbage returnedinstead of right error code after requests to SINGLE/CONCAT volumes, f.e:# dd if=/dev/raid/r0 bs=512 of=/dev/nulldd: /dev/raid/r0: Unknown error: -559038242Reviewed by: avg (mentor), mav (mentor)MFC after: 3 days
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.
g_raid: Prevent tasters from attempting excessively large readsSome g_raid tasters attempt metadata reads in multiples of the providersectorsize. Reads larger than MAXPHYS are invalid, so detect
g_raid: Prevent tasters from attempting excessively large readsSome g_raid tasters attempt metadata reads in multiples of the providersectorsize. Reads larger than MAXPHYS are invalid, so detect and abortin such situations.Spiritually similar to r217305 / PR 147851.PR: 214721Sponsored by: Dell EMC Isilon
Fix improper use of "its".Sponsored by: Dell EMC Isilon
Removal of Giant droping wrappers for GEOM classes.Sponsored by: The FreeBSD Foundation
sys/geom: spelling fixes in comments.No functional change.
sys/geom: spelling fixes.These affect debugging messages.MFC after: 2 weeks
1234