aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/geom
Commit message (Collapse)AuthorAgeFilesLines
* gvinum: Remove kernel supportJohn Baldwin2025-01-232-11/+0
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D48541
* Remove residual blank line at start of MakefileWarner Losh2024-07-1532-32/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove lingering geom_bde references.Poul-Henning Kamp2024-05-071-10/+0
|
* Disconnect GBDE from the build. (Per earlier announcements of retirement.)Poul-Henning Kamp2024-05-071-2/+1
|
* glabel: Add support for Linux swapRicardo Branco2024-04-291-0/+1
| | | | | Reviewed by: imp, kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1205
* glabel: Remove support for old reiserfsRicardo Branco2024-04-191-1/+0
| | | | | Reviewed by: imp, emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1101
* geom_map(4): Garbage collect disconnected driverMarius Strobl2024-01-141-7/+0
| | | | | The last MIPS user has been removed in c09981f1 2 years ago, the last ARM one in 58d5c511 even 5.5 years ago.
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1634-34/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* base: Remove support for the VTOC8 partitioning schemeMarius Strobl2023-07-262-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The removal of the sparc64 support in February 2020 obsoleted the VTOC8 partitioning scheme as no other FreeBSD platform makes use of it. Moreover, the code is bitrotting as nothing defines e. g. LOADER_VTOC8_SUPPORT any more and, thus, should go now, too. With this change, the following commits are reverted as far as VTOC8 is concerned and parts haven't already previously been deleted along with prior sparc64 removals: 094fcb157d4c98211899cf09d06e2cf19149b7e0 a7d366e9589c95feda6f3bc78c59c6355d51f126 ba8d50d08b9df4e8213f9a6997ff6792ecebcd9b The alignment example d9711c28efc4ec89ba5ea11f8fd63e9d0a7fc81b added to the VTOC8 section of gpart.8 is folded into the MBR one. This should finally conclude the deorbit of sparc64-specific bits. We had joy, we had fun we ran Unix on a Sun. But that source and the song of FreeBSD have all gone. Credits to Michael Bueker for the original "Unix on a Sun" and Rod McKuen for the "Seasons in the Sun" lyrics.
* sys/modules: Make use of SRCS.${KERN_OPT}.John Baldwin2023-03-011-3/+1
| | | | | | | | | | kmod.mk appends the value of SRCS.${KERN_OPT} for each defined kernel option to SRCS. This helper is shorter than appending to SRCS under explicit checks on KERN_OPTS. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D38738
* Create a new GEOM utility, gunion(8).Kirk McKusick2022-03-012-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gunion(8) utility is used to track changes to a read-only disk on a writable disk. Logically, a writable disk is placed over a read-only disk. Write requests are intercepted and stored on the writable disk. Read requests are first checked to see if they have been written on the top (writable disk) and if found are returned. If they have not been written on the top disk, then they are read from the lower disk. The gunion(8) utility can be especially useful if you have a large disk with a corrupted filesystem that you are unsure of how to repair. You can use gunion(8) to place another disk over the corrupted disk and then attempt to repair the filesystem. If the repair fails, you can revert all the changes in the upper disk and be back to the unchanged state of the lower disk thus allowing you to try another approach to repairing it. If the repair is successful you can commit all the writes recorded on the top disk to the lower disk. Another use of the gunion(8) utility is to try out upgrades to your system. Place the upper disk over the disk holding your filesystem that is to be upgraded and then run the upgrade on it. If it works, commit it; if it fails, revert the upgrade. Further details can be found in the gunion(8) manual page. Reviewed by: Chuck Silvers, kib (earlier version) tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D32697
* Fix some modules to export more used symbolsKonstantin Belousov2021-11-181-0/+2
| | | | | | | | | and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
* Remove GEOM_SCHED class and gsched tool.Alexander Motin2019-12-296-35/+0
| | | | | | | | | | | | | | | | | | This code was not actively maintained since it was introduced 10 years ago. It lacks support for many later GEOM features, such as direct dispatch, unmapped I/O, stripesize/stripeoffset, resize, etc. Plus it is the only remaining use of GEOM nstart/nend request counters, used there to implement live insertion/removal, questionable by itself. Plus, as number of people commented, GEOM is not the best place for I/O scheduler, since it has limited information about layers both above and below it, required for efficient scheduling. Plus with the modern shift to SSDs there is just no more significant need for this kind of scheduling. Approved by: imp, phk, luigi Relnotes: yes Notes: svn path=/head/; revision=356185
* Use kmod.opts.mk to fix standalone build.John Baldwin2019-11-211-0/+2
| | | | Notes: svn path=/head/; revision=354971
* geom_uzip(4), mkuzip(8): Add Zstd image modeConrad Meyer2019-08-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Zstd format bumps the CLOOP major number to 4 to avoid incompatibility with older systems. Support in geom_uzip(4) is conditional on the ZSTDIO kernel option, which is enabled in amd64 GENERIC, but not all in-tree configurations. mkuzip(8) was modified slightly to always initialize the nblocks + 1'th offset in the CLOOP file format. Previously, it was only initialized in the case where the final compressed block happened to be unaligned w.r.t. DEV_BSIZE. The "Fake" last+1 block change in r298619 means that the final compressed block's 'blen' was never correct unless the compressed uzip image happened to be BSIZE-aligned. This happened in about 1 out of every 512 cases. The zlib and lzma decompressors are probably tolerant of extra trash following the frame they were told to decode, but Zstd complains that the input size is incorrect. Correspondingly, geom_uzip(4) was modified slightly to avoid trashing the nblocks + 1'th offset when it is known to be initialized to a good value. This corrects the calculated final real cluster compressed length to match that printed by mkuzip(8). mkuzip(8) was refactored somewhat to reduce code duplication and increase ease of adding other compression formats. * Input block size validation was pulled out of individual compression init routines into main(). * Init routines now validate a user-provided compression level or select an algorithm-specific default, if none was provided. * A new interface for calculating the maximal compressed size of an incompressible input block was added for each driver. The generic code uses it to validate against MAXPHYS as well as to allocate compression result buffers in the generic code. * Algorithm selection is now driven by a table lookup, to increase ease of adding other formats in the future. mkuzip(8) gained the ability to explicitly specify a compression level with '-C'. The prior defaults -- 9 for zlib and 6 for lzma -- are maintained. The new zstd default is 9, to match zlib. Rather than select lzma or zlib with '-L' or its absense, respectively, a new argument '-A <algorithm>' is provided to select 'zlib', 'lzma', or 'zstd'. '-L' is considered deprecated, but will probably never be removed. All of the new features were documented in mkuzip.8; the page was also cleaned up slightly. Relnotes: yes Notes: svn path=/head/; revision=351005
* Remove deprecated GEOM classesConrad Meyer2019-08-135-40/+0
| | | | | | | | | | | | | | Follow-up on r322318 and r322319 and remove the deprecated modules. Shift some now-unused kernel files into userspace utilities that incorporate them. Remove references to removed GEOM classes in userspace utilities. Reviewed by: imp (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21249 Notes: svn path=/head/; revision=351001
* Update geom_uzip to use new zlib:Xin LI2019-08-081-1/+1
| | | | | | | | | | | | | | | | - Use new zlib headers; - Removed z_alloc and z_free to use the common sys/dev/zlib version. - Replace z_compressBound with compressBound from zlib. While there, limit LZMA CFLAGS to apply only for g_uzip_lzma.c. PR: 229763 Submitted by: Yoshihiro Ota <ota j email ne jp> (with changes, bugs are mine) Differential Revision: https://reviews.freebsd.org/D20271 Notes: svn path=/head/; revision=350742
* Add g_label_flashmap.c to the module, should have been part of r345480.Ian Lepore2019-04-071-0/+1
| | | | | | | Reported by: Jia-Shiun Li <jiashiun@gmail.com> Notes: svn path=/head/; revision=346013
* Revert r344675Justin Hibbits2019-03-011-5/+0
| | | | | | | | It's an incorrect approach to solve the problem. We already have a fdt/fdt_slicer module, it just needs to be wired into the build. Notes: svn path=/head/; revision=344679
* GEOM: Add fdt_slicer to the GEOM flashmap module for fdt-based platformsJustin Hibbits2019-02-281-0/+5
| | | | | | | | | | | | geom_flashmap depends on a slicer being available in order to do any work. On fdt platforms this is provided by fdt_slicer, but this needs to be available. Often it's compiled into the kernel for platforms that boot from the relevant media, but this is not always the case. Add the file to the geom_flashmap module so that it can be used on platforms which don't always need this functionality available. Notes: svn path=/head/; revision=344675
* Modularize xz.Konstantin Belousov2019-02-261-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Embedded lzma decompression library becomes a module usable by other consumers, in addition to geom_uzip. Most important code changes are - removal of XZ_DEC_SINGLE define, we need the code to work with XZ_DEC_DYNALLOC; - xz_crc32_init() call is removed from geom_uzip, xz module handles initialization on its own. xz is no longer embedded into geom_uzip, instead the depend line for the module is provided, and corresponding kernel option is added to each MIPS kernel config file using geom_uzip. The commit also carries unrelated cleanup by removing excess "device geom_uzip" in places which were missed in r344479. Reviewed by: cem, hselasky, ray, slavash (previous versions) Sponsored by: Mellanox Technologies Differential revision: https://reviews.freebsd.org/D19266 MFC after: 3 weeks Notes: svn path=/head/; revision=344605
* Fix LINT build.Li-Wen Hsu2018-01-261-0/+1
| | | | | | | Approved by: delphij Notes: svn path=/head/; revision=328432
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-0438-47/+47
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* Fix "make depend" with geom_uzip.ko: add opt_geom.h to SRCSEnji Cooper2017-03-041-0/+1
| | | | | | | | MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314644
* - Allow different slicers for different flash types to be registeredMarius Strobl2017-02-222-0/+9
| | | | | | | | | | | | | | | | | | | | with geom_flashmap(4) and teach it about MMC for slicing enhanced user data area partitions. The FDT slicer still is the default for CFI, NAND and SPI flash on FDT-enabled platforms. - In addition to a device_t, also pass the name of the GEOM provider in question to the slicers as a single device may provide more than provider. - Build a geom_flashmap.ko. - Use MODULE_VERSION() so other modules can depend on geom_flashmap(4). - Remove redundant/superfluous GEOM routines that either do nothing or provide/just call default GEOM (slice) functionality. - Trim/adjust includes Submitted by: jhibbits (RouterBoard bits) Reviewed by: jhibbits Notes: svn path=/head/; revision=314097
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-283-19/+0
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Fix alignment issues on MIPS: align the pointers properly.Ruslan Bukin2016-10-311-5/+1
| | | | | | | | | | | All the 5520 GEOM_ELI tests passed successfully on MIPS64EB. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D7905 Notes: svn path=/head/; revision=308137
* Disable geom_eli module build on MIPS64 as it has alignmentRuslan Bukin2016-10-201-1/+5
| | | | | | | | | | | issues and causes kernel panic. ELI metadata is also not aligned properly for MIPS64 case. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=307677
* Obsolete mkulzma(8) and geom_uncompress(4), their functionalityMaxim Sobolev2016-02-242-18/+0
| | | | | | | | | is now provided by mkuzip(8) and geom_uzip(4) respectively. MFC after: 1 month Notes: svn path=/head/; revision=295945
* Improve mkuzip(8) and geom_uzip(4), merge in LZMA support from mkulzma(8)Maxim Sobolev2016-02-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and geom_uncompress(4): 1. mkuzip(8): - Proper support for eliminating all-zero blocks when compressing an image. This feature is already supported by the geom_uzip(4) module and CLOOP format in general, so it's just a matter of making mkuzip(8) match. It should be noted, however that this feature while it sounds great, results in very slight improvement in the overall compression ratio, since compressing default 16k all-zero block produces only 39 bytes compressed output block, which is 99.8% compression ratio. With typical average compression ratio of amd64 binaries and data being around 60-70% the difference between 99.8% and 100.0% is not that great further diluted by the ratio of number of zero blocks in the uncompressed image to the overall number of blocks being less than 0.5 (typically). However, this may be important from performance standpoint, so that kernel are not spinning its wheels decompressing those empty blocks every time this zero region is read. It could also be important when you create huge image mostly filled with zero blocks for testing purposes. - New feature allowing to de-duplicate output image. It turns out that if you twist CLOOP format a bit you can do that as well. And unlike zero-blocks elimination, this gives a noticeable improvement in the overall compression ratio, reducing output image by something like 3-4% on my test UFS2 3GB image consisting of full FreeBSD base system plus some of the packages (openjdk, apache etc), about 2.3GB worth of file data (800+MB compressed). The only caveat is that images created with this feature "on" would not work on older versions of FeeBSDxi kernel, hence it's turned off by default. - provide options to control both features and document them in manual page. - merge in all relevant LZMA compression support from the mkulzma(8), add new option to select between both. - switch license from ad-hoc beerware into standard 2-clause BSD. 2. geom_uzip(4): - implement support for de-duplicated images; - optimize some code paths to handle "all-zero" blocks without reading any compressed data; - beef up manual page to explain that geom_uzip(4) is not limited only to md(4) images. The compressed data can be written to the block device and accessed directly via magic of GEOM(4) and devfs(4), including to mount root fs from a compressed drive. - convert debug log code from being compiled in conditionally into being present all the time and provide two sysctls to turn it on or off. Due to intended use of the module, it can be used in environments where there may not be a luxury to put new kernel with debug code enabled. Having those options handy allows debug issues without as much problem by just having access to serial console or network shell access to a box/appliance. The resulting additional CPU cycles are just few int comparisons and branches, and those are minuscule when compared to data decompression which is the main feature of the module. - hopefully improve robustness and resiliency of the geom_uzip(4) by performing some of the data validation / range checking on the TOC entries and rejecting to attach to an image if those checks fail. - merge in all relevant LZMA decompression support from the geom_uncompress(4), enable automatically when appropriate format is indicated in the header. - move compilation work into its own worker thread so that it does not clog g_up. This allows multiple instances work in parallel utilizing smp cores. - document new knobs in the manual page. Reviewed by: adrian MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D5333 Notes: svn path=/head/; revision=295943
* Make additional parts of sys/geom/eli more usable in userspaceAllan Jude2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | The upcoming GELI support in the loader reuses parts of this code Some ifdefs are added, and some code is moved outside of existing ifdefs The HMAC parts of GELI are broken out into their own file, to separate them from the kernel crypto/openssl dependant parts that are replaced in the boot code. Passed the GELI regression suite (tools/regression/geom/eli) Files=20 Tests=14996 Result: PASS Reviewed by: pjd, delphij MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4699 Notes: svn path=/head/; revision=293306
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.cAllan Jude2015-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation Extend sbin/md5 to create sha384(1) Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h} Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929 Notes: svn path=/head/; revision=292782
* Scheduling module to introduce a fixed delay into the I/O path.Warner Losh2015-12-182-1/+8
| | | | Notes: svn path=/head/; revision=292425
* Kill MFILES and find things automatically. It turned out to be onlyWarner Losh2015-07-0310-21/+0
| | | | | | | | | | | | lightly used. Find the proper .m file when we depend on *_if.[ch] in the srcs line, with seat-belts for false positive matches. This uses make's path mechanism. A further refinement would be to calculate this once, and then pass the resulting _MPATH to modules submakes. Differential Revision: https://reviews.freebsd.org/D2327 Notes: svn path=/head/; revision=285068
* Add makefile to build geom_map kld. Document some GEOM_* optionsAndrey V. Elsukov2015-06-081-0/+8
| | | | | | | in NOTES and geom(4). Notes: svn path=/head/; revision=284152
* Add MK_CCD knob for building and installing ccd(4), ccdconfig, etcEnji Cooper2015-01-251-1/+7
| | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=277678
* Remove comments relevant to 6.x only.Warner Losh2014-12-201-2/+0
| | | | Notes: svn path=/head/; revision=275948
* Remove support for FreeBSD 7 and really old FreeBSD 8. The classifiersWarner Losh2014-12-201-1/+1
| | | | | | | | | | | | have been in the base for a while, so the gymnastics here aren't needed. In addition, the bugs in subr_disk.c have been fixed since 2009, so there's no need for an identical copy of it in the tree anymore. There's really no need to binary patch g_io_request, so let's get rid of the code (not compiled in anymore) lest others think it is a good idea. Notes: svn path=/head/; revision=275947
* Implement the historic DIOCGDINFO ioctl for gpart on BSDWarner Losh2014-11-181-2/+2
| | | | | | | | | | partitions. Several utilities still use this interface and require additional information since gpart was activated than before. This allows fsck of a UFS partition without having to specify it is UFS, per historic behavior. Notes: svn path=/head/; revision=274661
* Add disklabel64 support to GEOM_PART class.Andrey V. Elsukov2014-06-112-0/+13
| | | | | | | | | | | | | | | | | This partitioning scheme is used in DragonFlyBSD. It is similar to BSD disklabel, but has the following improvements: * metadata has own dedicated place and isn't accessible through partitions; * all offsets are 64-bit; * supports 16 partitions by default (has reserved place for more); * has reserved place for backup label (but not yet implemented); * has UUIDs for partitions and partition types; No objections from: geom MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=267359
* Disconnect the following geom classes from the kernel modules build:Andrey V. Elsukov2014-05-271-6/+0
| | | | | | | | | | BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern replacement. Also it is still possible build them manually. Discussed with: geom Notes: svn path=/head/; revision=266743
* An all-or-nothing approach to labels isn't flexible enough. EmbeddedMarcel Moolenaar2014-04-061-0/+4
| | | | | | | | | | | systems need fine-grained control over what's in and what's out. That's ideal. For now, separate GPT labels from the rest and allow g_label to be built with just GPT labels. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=264185
* I clearly didn't test the modules... add sha256c.c to the variousJohn-Mark Gurney2014-03-161-1/+1
| | | | | | | modules that included sha2.c... Notes: svn path=/head/; revision=263219
* Fix a leftover of r260523. Remove the unnecessary dependency to zlib.h.Luiz Otavio O Souza2014-02-271-1/+1
| | | | | | | Approved by: adrian (mentor) Notes: svn path=/head/; revision=262561
* Build the geom_uncompress(4) module by default.Luiz Otavio O Souza2014-01-102-2/+3
| | | | | | | | | | | | | | | | Fix geom_uncompress(4) module loading. Don't link zlib.c (which is a module itself) directly. The built module was verified and used to read a few mkulzma(8) images on amd64 to validate some of the informations on the manual page. While here, don't overwrite CFLAGS. Reviewed by: ray Approved by: adrian (mentor) Notes: svn path=/head/; revision=260523
* Link g_label_disk_ident when building geom_label as a moduleIvan Voras2013-04-171-0/+1
| | | | Notes: svn path=/head/; revision=249581
* It seems that it is preferable to keep support for glabel also forAttilio Rao2012-10-181-0/+1
| | | | | | | | | | | | filesystems that we don't support natively. Revert part of r241636 to do so. This patch is not targeted for MFC. Requested by: gleb, jhb Notes: svn path=/head/; revision=241706
* Disconnect non-MPSAFE NTFS from the build in preparation for droppingAttilio Rao2012-10-171-1/+0
| | | | | | | | | | | | | | | | | GIANT from VFS. This code is particulary broken and fragile and other in-kernel implementations around, found in other operating systems, don't really seem clean and solid enough to be imported at all. If someone wants to reconsider in-kernel NTFS implementation for inclusion again, a fair effort for completely fixing and cleaning it up is expected. In the while NTFS regular users can use FUSE interface and ntfs-3g port to work with their NTFS partitions. This is not targeted for MFC. Notes: svn path=/head/; revision=241636
* Add to GEOM RAID class module, supporting the DDF metadata format, asAlexander Motin2012-04-301-1/+1
| | | | | | | | | | | | | | | | | | defined by the SNIA Common RAID Disk Data Format Specification v2.0. Supports multiple volumes per array and multiple partitions per disk. Supports standard big-endian and Adaptec's little-endian byte ordering. Supports all single-layer RAID levels. Dual-layer RAID levels except RAID10 are not supported now because of GEOM RAID design limitations. Some work is still to be done, but the present code already manages basic interoperation with RAID BIOS of the Adaptec 1430SA SATA RAID controller. MFC after: 1 month Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=234848
* Add to GEOM RAID class module for reading non-degraded RAID5 volumes andAlexander Motin2012-04-191-1/+1
| | | | | | | | | | | some environment to differentiate 4 possible RAID5 on-disk layouts. Tested with Intel and AMD RAID BIOSes. MFC after: 2 weeks Notes: svn path=/head/; revision=234458