libgeom: Avoid fixed remappings of the devstat devicelibgeom maintains a quasi-private mapping of /dev/devstat, which mightgrow over time if new devices appear. When the mapping needs to beexpan
libgeom: Avoid fixed remappings of the devstat devicelibgeom maintains a quasi-private mapping of /dev/devstat, which mightgrow over time if new devices appear. When the mapping needs to beexpanded, the old mapping is passed as a hint, but this appears to beunnecessary.Simplify and improve things a bit:- stop passing a hint when remapping,- don't creat a mapping in geom_stats_open(), as geom_stats_resync() will create it for us,- check for errors from munmap().Reviewed by: imp, asomersTested by: asomersMFC after: 2 weeksSponsored by: Innovate UKDifferential Revision: https://reviews.freebsd.org/D46294(cherry picked from commit d06fe346eccf0919a29d43599548e49c0d6a7a17)
show more ...
Remove $FreeBSD$: two-line nroff patternRemove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
Remove $FreeBSD$: one-line sh patternRemove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
spdx: The BSD-3-Clause-FreeBSD identifier never was, drop -FreeBSDThere never was a BSD-3-Clause-FreeBSD SPDX identifier. Replace itwith BSD-3-Clause.Discussed with: pfgMFC After: 3 daysSpon
spdx: The BSD-3-Clause-FreeBSD identifier never was, drop -FreeBSDThere never was a BSD-3-Clause-FreeBSD SPDX identifier. Replace itwith BSD-3-Clause.Discussed with: pfgMFC After: 3 daysSponsored by: Netflix
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDThe SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catchup to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDThe SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catchup to that fact and revert to their recommended match of BSD-2-Clause.Discussed with: pfgMFC After: 3 daysSponsored by: Netflix
Reference correct section for free(3).
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 calledgctl_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 calledgctl_error() they would exit with EXIT_FAILURE, otherwise they wouldreturn with EXIT_SUCCESS. If they used gctl_error() to output aninformational message, for example when run with the -v (verbose)option, they would mistakenly exit with EXIT_FAILURE. A furtherlimitation of the gctl_error() function was that it could only becalled 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. Italso has an additional errno argument which should be zero if it isan informational message or an errno value (EINVAL, EBUSY, etc) ifit is an error. When done the gctl_post_messages() function shouldbe called to indicate that all messages have been posted. If anyof the messages had a non-zero errno, the utility will EXIT_FAILURE.If only informational messages (with zero errno) were posted, theutility will EXIT_SUCCESS.Tested by: Peter HolmPR: 265184MFC after: 1 week
GEOM: Fix regression after 7f16b501e25.find_geom() in some classes trim leading "/dev/" from geom names.Lack of that in geom_gettree_geom() broke some existing scripts.PR: 262554MFC after: 2 m
GEOM: Fix regression after 7f16b501e25.find_geom() in some classes trim leading "/dev/" from geom names.Lack of that in geom_gettree_geom() broke some existing scripts.PR: 262554MFC after: 2 months
GEOM: Introduce partial confxml APITraditionally the GEOM's primary channel of information from kernel touser-space was confxml, fetched by libgeom through kern.geom.confxmlsysctl. It is conveni
GEOM: Introduce partial confxml APITraditionally the GEOM's primary channel of information from kernel touser-space was confxml, fetched by libgeom through kern.geom.confxmlsysctl. It is convenient and informative, representing full state ofGEOM in a single XML document. But problems start to arise on systemswith hundreds of disks, where the full confxml size reaches manymegabytes, taking significant time to first write it and then parse.This patch introduces alternative solution, allowing to fetch muchsmaller XML document, subset of the full confxml, limited to 64KB andrepresenting only one specified geom and optionally its parents. Ituses existing GEOM control interface, extended with new "getxml" verb.In case of any error, such as the buffer overflow, it just transparentlyfalls back to traditional full confxml. This patch uses the new API inuser-space GEOM tools where it is possible.Reviewed by: impMFC after: 2 monthSponsored by: iXsystems, Inc.Differential Revision: https://reviews.freebsd.org/D34529
GEOM: Introduce gctl_add_param() API.Make gctl_add_param() API public, allowing more precise control overparameter flags. Previously it was impossible to properly declarewrite-only ASCII paramet
GEOM: Introduce gctl_add_param() API.Make gctl_add_param() API public, allowing more precise control overparameter flags. Previously it was impossible to properly declarewrite-only ASCII parameters, used for result reporting, they weredeclared as read-write binary instead, that was not nice.MFC after: 1 month
[skip ci] correct a few SPDX license tagsThese were all incorrectly labeled as 2-clause BSD licenses by asemi-automated process, when in fact they are 3-clause.Discussed with: pfg, impMFC after
[skip ci] correct a few SPDX license tagsThese were all incorrectly labeled as 2-clause BSD licenses by asemi-automated process, when in fact they are 3-clause.Discussed with: pfg, impMFC after: 2 weeksSponsored by: Axcient
Modernize geom_stats_snapshot_get* A logically useless memset() is used to fault in some memory pages. Change it to explicit_bzero so the compiler won't eliminate it.* Eliminate the second mems
Modernize geom_stats_snapshot_get* A logically useless memset() is used to fault in some memory pages. Change it to explicit_bzero so the compiler won't eliminate it.* Eliminate the second memset. It made sense in the days of the Big Kernel Lock, but not in the days of fine-grained SMP and especially not in the days of VDSO.MFC after: 2 weeksSponsored by: AxcientReviewed by: phkDifferential Revision: https://reviews.freebsd.org/D29047
Speed up geom_stats_resync in the presence of many devicesThe old code had a O(n) loop, where n is the size of /dev/devstat.Multiply that by another O(n) loop in devstat_mmap for a total ofO(n^2)
Speed up geom_stats_resync in the presence of many devicesThe old code had a O(n) loop, where n is the size of /dev/devstat.Multiply that by another O(n) loop in devstat_mmap for a total ofO(n^2).This change adds DIOCGMEDIASIZE support to /dev/devstat so userland canquickly determine the right amount of memory to map, eliminating theO(n) loop in userland.This change decreases the time to run "gstat -bI0.001" with 16,384 mddevices from 29.7s to 4.2s.Also, fix a memory leak first reported as PR 203097.Sponsored by: AxcientReviewed by: mav, impMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D28968
Update Makefile.depend filesUpdate a bunch of Makefile.depend files asa result of adding Makefile.depend.options filesReviewed by: bdreweryMFC after: 1 weekSponsored by: Juniper NetworksDi
Update Makefile.depend filesUpdate a bunch of Makefile.depend files asa result of adding Makefile.depend.options filesReviewed by: bdreweryMFC after: 1 weekSponsored by: Juniper NetworksDifferential Revision: https://reviews.freebsd.org/D22494
pkgbase: Put a lot of binaries and lib in FreeBSD-runtimeAll of them are needed to be able to boot to single user and be ableto repair a existing FreeBSD installation so put them directly intoFre
pkgbase: Put a lot of binaries and lib in FreeBSD-runtimeAll of them are needed to be able to boot to single user and be ableto repair a existing FreeBSD installation so put them directly intoFreeBSD-runtime.Reviewed by: bapt, gjbDifferential Revision: https://reviews.freebsd.org/D21503
lib: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorpr
lib: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified 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.
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Add a quick description of the geom_getxml(3), geom_xml2tree(3),geom_gettree(3) and geom_deletetree(3) functions provided by libgeom and arenot documented in libgeom(3).Reviewed by: mav, bjk, all
Add a quick description of the geom_getxml(3), geom_xml2tree(3),geom_gettree(3) and geom_deletetree(3) functions provided by libgeom and arenot documented in libgeom(3).Reviewed by: mav, bjk, allanjudeApproved by: allanjudeDifferential Revision: https://reviews.freebsd.org/D12679
libgeom: Remove redundant and duplicated codeIn g_open(), g_device_path_open().No functional change.Sponsored by: Dell EMC Isilon
Remove getpagesize(3) error checking added in r317312getpagesize(3) no longer fails as of r317436.MFC after: 3 daysSponsored by: Dell EMC Isilon
Minor style(9) fixupsDelete trailing whitespace and sort headers.Leave libgeom.h's placement alone, per reasoning in r317289.MFC after: 5 weeksSponsored by: Dell EMC Isilon
Fix type for `pagesize` to match the return type for getpagesize(3)to fix the buildMFC after: 5 weeksX-MFC with: r317311Pointyhat to: ngieSponsored by: Dell EMC Isilon
Check for failures from getpagesize(3)Return errno on failure, similar to the open(2) call above it.MFC after: 5 weeksReported by: CoverityCID: 1193753Sponsored by: Dell EMC Isilon
1234