summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* MFC r286512:ngie2015-10-251-6/+6
| | | | | | | | | Make some debug printf's into DPRINTF's to reduce noise on attach/detahh Similar reasoning to what was done in r286367 with geom_uzip(4) Differential Revision: D3320 Sponsored by: EMC / Isilon Storage Division
* MFC r286367:ngie2015-10-251-4/+4
| | | | | | | | Make some debug printf's into DPRINTF's to reduce noise on attach/detach Differential Revision: https://reviews.freebsd.org/D3306 Reviewed by: loos Sponsored by: EMC / Isilon Storage Division
* MFC r287827:trasz2015-10-182-3/+41
| | | | | | | Add a way to specify stripesize and stripeoffset to gnop(8). This makes it possible to "simulate" 4K media, to eg test alignment handling. Sponsored by: The FreeBSD Foundation
* MFC r286283:trasz2015-10-181-0/+7
| | | | | | | Fix panic triggered by code like this: open("/dev/md0", O_EXEC); Sponsored by: The FreeBSD Foundation
* MFC r286237:trasz2015-10-181-0/+14
| | | | | | | | | | | | Fix panic that would happen on forcibly unmounting devfs (note that as it is now, devfs ignores MNT_FORCE anyway, so it needs to be modified to trigger the panic) with consumers still opened. Note that this still results in a leak of r/w/e counters. It seems to be harmless, though. If anyone knows a better way to approach this - please tell. Sponsored by: The FreeBSD Foundation
* MFC 281310, 287567:imp2015-09-162-3/+3
| | | | | | | | | | r287567 | imp | 2015-09-08 11:47:56 -0600 (Tue, 08 Sep 2015) | 16 lines Mark the swap pager as direct dispatch compatible. r281310 | mav | 2015-04-09 07:09:05 -0600 (Thu, 09 Apr 2015) | 4 lines Remove sleeps from geom_up thread on device destruction.
* MFC: r287405:imp2015-09-081-7/+41
| | | | Make out of memory behavior less pathological.
* MFC r286404:kib2015-08-141-5/+5
| | | | | | | The condition to use direct processing for the unmapped bio is reverted. MFC r286405: Minor style cleanup of the code surrounding r286404.
* MFC r286615:pfg2015-08-144-4/+4
| | | | Clean up some externally visible "more then" occurences
* MFC r285889:ae2015-08-021-2/+4
| | | | | | | Report the scheme and provider names in warning message about unaligned partition. PR: 201873
* MFC r284582:trasz2015-08-024-18/+19
| | | | | | | | Fix off-by-one error in fstyp(8) and geom_label(4) that made them use a single space (" ") as a CD9660 label name when no label was present. Similar problem was also present in msdosfs label recognition. Sponsored by: The FreeBSD Foundation
* MFC: r285594allanjude2015-07-211-0/+16
| | | | | | | | | | | New partition flag for gpart, writes the 0xee partition in the pmbr in the second slot, rather than the first. Works around Lenovo legacy GPT boot issue PR: 184910 Approved by: re (gjb), marcel Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3140
* MFC r273489 (cperciva):gjb2015-07-081-0/+19
| | | | | | | | | | | | | | | | | | | Populate the GELI passphrase cache with the kern.geom.eli.passphrase variable (if any) provided in the boot environment. Unset it from the kernel environment after doing this, so that the passphrase is no longer present in kernel memory once we enter userland. This will make it possible to provide a GELI passphrase via the boot loader. Note: head and stable/10 differ as a result of r273174, which renames the getenv(), setenv(), and unsetenv() functions with kern_getenv(), kern_setenv(), and kern_unsetenv(), which was reverted in the relevant parts of this change in 10-STABLE. PR: 200448 Approved by: re (kib) Sponsored by: The FreeBSD Foundation
* Revert r285249, pending further investigation on how the buildgjb2015-07-071-19/+0
| | | | | | | | broke. Approved by: re (implicit) Pointyhat: gjb (self) Sponsored by: The FreeBSD Foundation
* MFC r273489 (cperciva):gjb2015-07-071-0/+19
| | | | | | | | | | | | | | Populate the GELI passphrase cache with the kern.geom.eli.passphrase variable (if any) provided in the boot environment. Unset it from the kernel environment after doing this, so that the passphrase is no longer present in kernel memory once we enter userland. This will make it possible to provide a GELI passphrase via the boot loader. PR: 200448 Approved by: re (kib) Sponsored by: The FreeBSD Foundation
* MFC r284151:ae2015-06-181-1/+1
| | | | Teach G_PART_GPT class handle g_resize_provider event.
* MFC r283104:ae2015-06-021-15/+25
| | | | | | | | | Read GEOM_UNCOMPRESS metadata using several requests that fit into MAXPHYS. For large compressed images the metadata size can be bigger than MAXPHYS and this triggers KASSERT in g_read_data(). Also use g_free() to free memory allocated by g_read_data(). PR: 199476
* MFC r277170:trasz2015-05-151-1/+9
| | | | | | Add devd(8) notifications for creation and destruction of GEOM devices. Sponsored by: The FreeBSD Foundation
* MFC r282465:ae2015-05-131-0/+3
| | | | | | Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme. Sort DOSPTYP_* entries in diskmbr.h by value. Document these scheme-specific types in gpart(8).
* MFC r281769:pfg2015-04-271-0/+1
| | | | | | g_uncompress_taste: prevent a double free. Found by: Clang Static Analyzer
* MFC r280757: Remove request sorting from GEOM_MIRROR and GEOM_RAID.mav2015-04-102-7/+7
| | | | | | | | | | When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock.
* MFC r280687: Make GEOM_PART work in presence of previous withered self.mav2015-04-091-5/+2
|
* MFC r280686: Report withered providers as such alike to GEOMs.mav2015-04-091-1/+3
|
* MFC r280685: When searching for provider by name, prefer non-withered one.mav2015-04-091-3/+9
|
* MFC r280756, r280758: Fix bug on memory allocation error in split method.mav2015-04-031-3/+2
| | | | While there, use bioq_takefirst() in place where it is convenient.
* MFC r279913: Fix couple BIO_DELETE bugs in geom_mirror.mav2015-03-261-2/+24
| | | | | Do not report GEOM::candelete if none of providers support BIO_DELETE. If consumer still requests BIO_DELETE, report error instead of hanging.
* MFC r269854:ae2015-03-193-0/+5
| | | | | | | | | Remove duplicate entry. MFC r279935: Add GUID and alias for Apple Core Storage partition. PR: 196241
* MFC r279278: Replace constant with proper sizeof().mav2015-03-115-10/+10
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r275503:mav2014-12-192-10/+12
| | | | | | Avoid unneeded malloc/memcpy/free if there is no metadata on disk. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r275475:mav2014-12-181-8/+115
| | | | | | Decode some binary fields of Intel metadata. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r274154, r274163:mav2014-11-201-0/+10
| | | | | | | | | Add to CTL support for logical block provisioning threshold notifications. For ZVOL-backed LUNs this allows to inform initiators if storage's used or available spaces get above/below the configured thresholds. Sponsored by: iXsystems, Inc.
* MFC r272746:ae2014-10-291-17/+62
| | | | | | | | Add an ability to set dumpdev via loader(8) tunable. MFC r272747: Revert r156046. We support setting dumpdev via loader tunable again. Also change default disk name to ada.
* MFC r273638:mav2014-10-281-43/+16
| | | | | | | | | | | | | Revert somewhat hackish geom_disk optimization, committed as part of r256880, and the following r273143 commit, supposed to workaround introduced issue by quite innocent-looking change. While there is no clear understanding why, but r273143 is accused in data corruption in some environments with high I/O load. I personally don't see any problem in that commit, and possibly it is just a trigger to some other bug somewhere, but better safe then sorry for now. Requested by: scottl@
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-271-5/+5
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r271664:cperciva2014-09-231-7/+38
| | | | | | | | | Cache GELI passphrases entered at the console during the boot process, in order to improve user-friendliness when a system has multiple disks encrypted using the same passphrase. Relnotes: yes Approved by: re (gjb)
* MFC EFI support for the installeremaste2014-09-155-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r264978 (nwhitehorn): Add EFI support to the installer. This requires that the kernel provide a sysctl to determine what firmware is in use. This sysctl does not exist yet, so the following blocks are in front of the wheels: - I've provisionally called this "hw.platform" after the equivalent thing on PPC - The logic to check the sysctl is short-circuited to always choose BIOS. There's a comment in the top of the file about how to turn this off. If IA64 acquired a boot1.efifat-like thing (probably with very few modifications), the same code could be adapted there. r265016 (nwhitehorn): Finish connecting up installer UEFI support. If the kernel was booted using EFI, set up the disks for an EFI system. If booted from BIOS/CSM, set up for BIOS. r268256 (nwhitehorn): After EFI support was added to the installer, it needed to allow boot partitions of types other than "freebsd-boot" (in particular, "efi"). This allows the removal of some nasty hacks for supporting PowerPC systems, in particular aliasing freebsd-boot to apple-boot on APM and an IBM-specific code on MBR. This changes the installer to use the correct names, which also breaks a degeneracy in the meaning of "freebsd-boot" that allows the addition of support for some newer IBM systems that can boot from GPT in addition to MBR. Since I have no idea how to detect which those systems are, leave the default on IBM PPC systems as MBR for now. Approved by: re PR: 193658 Relnotes: Yes
* MFC r256956:smh2014-09-074-10/+34
| | | | | | | | | | | | | | Improve ZFS N-way mirror read performance by using load and locality information. MFC r260713: Fix ZFS mirror code for handling multiple DVA's Also make the addition of the d_rotation_rate binary compatible. This allows storage drivers compiled for 10.0 to work by preserving the ABI for disks. Approved by: re (gjb) Sponsored by: Multiplay
* MFC r268407 (by gjb):ae2014-08-251-0/+10
| | | | | | | | | | | | | | | Fix non-version text after .Fx macro usage. MFC r269487 (by issyl0): Add generic list, status, load and unload docs to gpart(8) - In the style of gmirror(8). PR: docs/191534 MFC r269852: Add sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set by default. It can be used to disable automatic alignment to CHS geometry, that GEOM_PART_MBR does.
* MFC 268986; fix file system corruption by creating as many BIOs as neededmarcel2014-08-031-158/+177
| | | | | | to satisfy the original request -- in other words: no short reads. Obtained from: Juniper Networks, Inc.
* MFC r267355:ae2014-07-015-25/+726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add UUIDs for DragonFlyBSD's partition types. MFC r267356: Add DragonFlyBSD's Hammer FS types and type names. MFC r267357: Add aliases for DragonFlyBSD's partition types. MFC r267358: Allow dumping to DragonFlyBSD's swap partition. MFC r267359: Add disklabel64 support to GEOM_PART class. 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; MFC r267360: Add disklabel64 support Relnotes: yes
* MFC: r267145marius2014-06-251-1/+1
| | | | | | | | | Fix the keyfile being cleared prematurely after r259428 (MFCed to stable/10 in r266749). PR: 185084 Submitted by: fk@fabiankeil.de Reviewed by: pjd
* MFC r266880:ae2014-06-063-8/+16
| | | | | Use g_conf_printf_escaped() to escape symbols, which can break an XML tree.
* MFC r266444:ae2014-06-021-0/+8
| | | | | | | | | | We have two functions from where a geom orphan method could be called: g_orphan_register and g_resize_provider_event. Both are called from the event queue. Also we have GEOM_DEV class, which does deferred destroy for its consumers via g_dev_destroy (also called from the event queue). So it is possible, that for some consumers an orphan method will be called twice. This triggers panic in g_dev_orphan. Check that consumer isn't already orphaned before call orphan method.
* MFC: r259428marius2014-05-272-0/+3
| | | | | | | | Clear content of keyfiles loaded by the loader after processing them. MFC: r259429 Clear some more places with potentially sensitive data.
* MFC r266445:ae2014-05-261-0/+2
| | | | Add a topology trace to the g_spoil_event.
* MFC r266319:mav2014-05-241-2/+5
| | | | Make GEOM DISK to account also BIO_FLUSH operations.
* MFC r260522, r260523, r261439, r261440, r261586, r264504, r264769, r265193,loos2014-05-162-118/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r265194, r265197 r260522: Add the manual page for geom_uncompress(4). r260523: Build the geom_uncompress(4) module by default. Fix geom_uncompress(4) module loading. Don't link zlib.c (which is a module itself) directly. r261439: Remove some unnecessary code. The offsets read from the first block are overwritten a few lines bellow. r261440: Fix a logic error. Because of this inflateReset() wasn't being called and the output buffer wasn't being cleared between the inflate() calls, producing zeroed output after the first inflate() call. This fixes the read of mkuzip(8) images with geom_uncompress(4). r261586: Fix the build with DEBUG enabled. Where possible, fix style(9) issues. r264504: Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause problems in our providers, such as a KASSERT in md(4). We can initiate I/O for more than MAXPHYS bytes if we've been given a BIO for MAXPHYS bytes, the blocks from which we're reading couldn't be compressed and we had compression in preceeding blocks resulting in misalignment of the blocks we're trying to read relative to the sector. We're forced to round up the I/O length to make it an multiple of the sector size. When we detect the condition, we'll reduce the block count and perform a "short" read. In g_uzip_done() we need to consider the original I/O length and stop early if we're about to deflate a block that we didn't read. By using bio_completed in the cloned BIO and not bio_length to check for this, we automatically and gracefully handle short reads that our providers may be doing on top of the short reads we may initiate ourselves. r264769: Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix. Make sure not to start I/O bigger than MAXPHYS bytes. r265193: Some style and whitespace fixes. Reduce the difference between geom_uzip(4) and geom_uncompress(4). Now, they produce an almost clean diff(1) output. Remove a duplicated variable from g_uncompress.c and an unnecessary header from g_uzip.c. r265194: Actually the FEATURE() macro is defined on sys/sysctl.h. r265197: Fix a leak in g_uzip_taste(). After retrieve all the block offsets from the uzip image, free the last data read.
* MFC r265072:bdrewery2014-05-141-1/+0
| | | | Remove redundant include
* MFC r264499:bdrewery2014-05-141-2/+3
| | | | Make g_access() KASSERT() more useful.
* MFC r256690:ae2014-05-128-1/+137
| | | | | | | | | | | Add an automatic resize support to the GEOM_PART class. When parent provider has been resized, the scheme specific G_PART_RESIZE method does an update of scheme's metadata. But all changes are not saved to disk, until `gpart commit` will be called. MFC r265336: Add an advice what to do when partition was automatically resized.
OpenPOWER on IntegriCloud