summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* VMDB offset should be greater than logical volume size only for MBR.ae2012-03-291-1/+1
|
* Do proper cleanup for the GPT case when an error occurs.ae2012-03-291-14/+19
|
* Keep track of the mount point associated with a special devicemckusick2012-03-281-1/+30
| | | | | | | | | | | | | | | | | to enable the collection of counts of synchronous and asynchronous reads and writes for its associated filesystem. The counts are displayed using `mount -v'. Ensure that buffers used for paging indicate the vnode from which they are operating so that counts of paging I/O operations from the filesystem are collected. This checkin only adds the setting of the mount point for the UFS/FFS filesystem, but it would be trivial to add the setting and clearing of the mount point at filesystem mount/unmount time for other filesystems too. Reviewed by: kib
* Check that scheme is not already registered. This may happens when aae2012-03-231-7/+16
| | | | | | | | | | | | KLD is preloaded with loader(8) and leads to infinity loops. Also do not return EEXIST error code from MOD_LOAD handler, because we have undocumented(?) ability replace kernel's module with preloaded one. And if we have so, then preloaded module will be initialized first. Thus error in MOD_LOAD handler will be triggered for the kernel. PR: kern/165573 MFC after: 3 weeks
* Add CTLFLAG_TUN to sysctls.ae2012-03-191-4/+4
| | | | MFC after: 1 month
* Add new GEOM_PART_LDM module that implements the Logical Disk Managerae2012-03-191-0/+1504
| | | | | | | | | | | | | | | | | scheme. The LDM is a logical volume manager for MS Windows NT and it is also known as dynamic volumes. It supports about 2000 partitions and also provides the capability for software RAID implementations. This version implements only partitioning scheme capability and based on the linux-ntfs project documentation and several publications across the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported. An access to the LDM metadata is read-only. When LDM is on the disk partitioned with MBR we can also destroy metadata. For the GPT partitioned disks destroy action is not supported. Reviewed by: ivoras (previous version) MFC after: 1 month
* Make kern.geom.part node not static. Also add CTLFLAG_TUN to theae2012-03-191-3/+4
| | | | | | check_integrity sysctl. MFC after: 1 month
* Add MODULE_DEPEND() to geom_part modules.ae2012-03-152-1/+3
| | | | MFC after: 2 weeks
* Remove unactionable message about label geometryemaste2012-03-081-7/+0
| | | | | | | | It's not clear to a user what they should do after seeing the "geometry does not match label" kernel message, and it does not appear to present a problem in practice. Thus, just remove the messages. Approved by: marcel
* If nested scheme allows dump kernel to its partition, we may allowae2012-02-201-2/+5
| | | | | | dump for the parent partition too. MFC after: 2 weeks
* Add alias for the partition type 0x0f. Now "ebr" name is used for bothae2012-02-201-0/+1
| | | | | | | types 0x05 and 0x0f, but 0x05 is preferred and used when partition is created with "gpart add -t ebr ...". This should keep EBR partitions accessible after r231754 for those, who have EBR on the partition with type 0x0f.
* Add additional check to EBR probe and create methods:ae2012-02-151-8/+19
| | | | | | | | | | | | don't try probe and create EBR scheme when parent partition type is not "ebr". This fixes error messages about corrupted EBR for some partitions where is actually another partition scheme. NOTE: if you have EBR on the partition with different than "ebr" (0x05) type, then you will lost access to partitions until it will be changed. MFC after: 2 weeks
* Add PART::type attribute handler. It returns partition type as string.ae2012-02-151-0/+4
| | | | MFC after: 2 weeks
* Add alias for the partition with type 0x42 to the MBR scheme.ae2012-02-101-0/+1
| | | | MFC after: 1 week
* Let's be more realistic and limit maximum number of partition to 4k.ae2012-02-101-1/+1
| | | | MFC after: 1 week
* Current implementations of sync(2) and syncer vnode fsync() VOP useskib2012-02-061-10/+3
| | | | | | | | | | | | | | | | | | | | | | mnt_noasync counter to temporary remove MNTK_ASYNC mount option, which is needed to guarantee a synchronous completion of the initiated i/o before syscall or VOP return. Global removal of MNTK_ASYNC option is harmful because not only i/o started from corresponding thread becomes synchronous, but all i/o is synchronous on the filesystem which is initiated during sync(2) or syncer activity. Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local thread flag to disable async i/o for current thread only. Use the opportunity to move DOINGASYNC() macro into sys/vnode.h and consistently use it through places which tested for MNTK_ASYNC. Some testing demonstrated 60-70% improvements in run time for the metadata-intensive operations on async-mounted UFS volumes, but still with great deviation due to other reasons. Reviewed by: mckusick Tested by: scottl MFC after: 2 weeks
* Correct typo in comment (numbver)emaste2012-02-041-1/+1
|
* The scheme code may not know about some inconsistency in the metadata.ae2012-02-011-0/+3
| | | | | | So, add an integrity check after recovery attempt. MFC after: 1 week
* Avoid to check the same cache line/variable from all the lockingattilio2012-01-284-0/+4
| | | | | | | | | | | | | | | | primitives by breaking stop_scheduler into a per-thread variable. Also, store the new td_stopsched very close to td_*locks members as they will be accessed mostly in the same codepaths as td_stopsched and this results in avoiding a further cache-line pollution, possibly. STOP_SCHEDULER() was pondered to use a new 'thread' argument, in order to take advantage of already cached curthread, but in the end there should not really be a performance benefit, while introducing a KPI breakage. In collabouration with: flo Reviewed by: avg MFC after: 3 months (or never) X-MFC: r228424
* Experimental support for booting CHRP-type PowerPC systems from hard disks.nwhitehorn2012-01-251-0/+1
|
* Allow an MBR primary or extended Linux swap partition to be specifiedtruckman2012-01-132-4/+6
| | | | | | | | | as the system dump device. This was already allowed for GPT. The Linux swap metadata at the beginning of the partition should not be disturbed because the crash dump is written at the end. Reviewed by: alfred, pjd, marcel MFC after: 2 weeks
* Add support for >2TB disks in GEOM RAID for Intel metadata format.jimharris2012-01-091-49/+122
| | | | | | Reviewed by: mav Approved by: scottl MFC after: 1 week
* GEOM_UNCOMPRESS module, can be used with uzip images and with new ulzma images.ray2012-01-041-0/+670
| | | | Approved by: adrian (mentor)
* replace uses of libkern gets with cngetsavg2011-12-171-1/+2
| | | | MFC after: 2 months
* Close race between geom destruction on g_vfs_close() when softc destroyedmav2011-12-021-1/+3
| | | | | | and g_vfs_orphan() call that tries to access softc, intruced at r227015. PR: kern/162997
* Add an ability to increase number of allocated APM entries when weae2011-11-281-30/+47
| | | | | | | | have reserved free space in the APM area. Also instead of one write request per each APM entry, use MAXPHY sized writes when we are updating APM. MFC after: 1 month
* The size of APM could be bigger than number of already allocated entries.ae2011-11-281-1/+1
| | | | | | And the first usable sector should not start from the inside of APM area. MFC after: 1 month
* Temporary revert r227009 to fix freeze on UP systems without PREEMPTION.mav2011-11-141-27/+12
| | | | | | | | | | | Before r215687, if some withered geom or provider could not be destroyed, g_event thread went to sleep for 0.1s before retrying. After that change it is just restarting immediately. r227009 made orphaned (withered) provider to not detach immediately, but only after context switch. That made loop inside g_event thread infinite on UP systems without PREEMPTION. To address original problem with possible dead lock addressed by r227009 we have to fix r215687 change first, that needs some time to think and test.
* Major GEOM MULTIPATH class rewrite:mav2011-11-122-120/+616
| | | | | | | | | | | | | | | | | | | | | | | | | - Improved locking and destruction process to fix crashes. - Improved "automatic" configuration method to make it consistent and safe by reading metadata back from all specified paths after writing to one. - Added provider size check to reduce chance of ordering conflict with other GEOM classes. - Added "manual" configuration method without using on-disk metadata. - Added "add" and "remove" commands to allow manage paths manually. - Failed paths are no longer dropped from geom, but only marked as FAIL and excluded from I/O operations. - Automatically restore failed paths when all others paths are marked as failed, for example, because of device-caused (not transport) errors. - Added "fail" and "restore" commands to manually control FAIL flag. - geom is now destroyed on last path disconnection. - Added optional Active/Active mode support. Unlike Active/Passive mode, load evenly distributed between all working paths. If supported by the device, it allows to significantly improve performance, utilizing bandwidth of all paths. It is controlled by -A option during creation. Disabled by default now. - Improved `status` and `list` commands output. Sponsored by: iXsystems, inc. MFC after: 1 month
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-0719-22/+35
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Add mutex and two flags to make orphan() call properly asynchronous:mav2011-11-021-22/+65
| | | | | | | - delay consumer closing and detaching on orphan() until all I/Os complete; - prevent new I/Os submission after orphan() called. Previous implementation could destroy consumers still having active requests and worked only because of global workaround made on GEOM level.
* Make orphan() method in geom_dev asynchronous using destroy_dev_sched_cb()mav2011-11-011-12/+27
| | | | | | | instead of destroy_dev(). It moves device destruction waiting out of the topology lock and so fixes dead lock between orphanization and closing. Real provider and geom destruction called from swi context after device destroyed as callback of the destroy_dev_sched_cb().
* Refactor disk disconnection and geom destruction handling sequences.mav2011-11-012-50/+44
| | | | | | | | Do not close/destroy opened consumer directly in case of disconnect. Instead keep it existing until it will be closed in regular way in response to upstream provider destruction. Delay geom destruction in the same way. Previous implementation could destroy consumers still having active requests and worked only because of global workaround made on GEOM level.
* Refactor disk disconnection and geom destruction handling sequences.mav2011-11-011-55/+46
| | | | | | | | Do not close/destroy opened consumer directly in case of disconnect. Instead keep it existing until it will be closed in regular way in response to upstream provider destruction. Delay geom destruction in the same way. Previous implementation could destroy consumers still having active requests and worked only because of global workaround made on GEOM level.
* Workaround the problem introduced by combination of r162200 and r215687.mav2011-11-011-1/+1
| | | | | | | | | | | | | | | | r162200 delays provider orphanization until all running requests complete, to workaround broken orphan() method implementation in some classes. r215687 removes persistent periodic (10Hz) event thread wake ups. Together these changes can indefinitely delay orphanization until some other event wake up the event thread. One consequence of this is inability of CAM to destroy device disconnected when busy and, as consequence, create new one after reconnection. While the best solution would be to revert r162200, it is not easy, as some classes still look broken in that way. Instead conditionally wake up event thread if there are some providers waiting for orphanization. MFC after: 1 week
* Our geom withering function could take some time before geom with itsae2011-10-281-0/+4
| | | | | | | | providers and consumers will be destroyed. Before take some actions with a geom, check that it is not destroyed at the moment. Tested by: nwhitehorn MFC after: 1 week
* Before this change when GELI detected hardware crypto acceleration it willpjd2011-10-272-12/+5
| | | | | | | | | | | | | | | | | | | start only one worker thread. For software crypto it will start by default N worker threads where N is the number of available CPUs. This is not optimal if hardware crypto is AES-NI, which uses CPU for AES calculations. Change that to always start one worker thread for every available CPU. Number of worker threads per GELI provider can be easly reduced with kern.geom.eli.threads sysctl/tunable and even for software crypto it should be reduced when using more providers. While here, when number of threads exceeds number of CPUs avilable don't reduce this number, assume the user knows what he is doing. Reported by: Yuri Karaban <dev@dev97.com> MFC after: 3 days
* Clarify disks/volumes above 2TiB support in geom_raid:mav2011-10-263-23/+66
| | | | | | | | | | - add support for volumes above 2TiB with Promise metadata format; - enforse and document other limitations: - Intel and Promise metadata formats do not support disks above 2TiB; - NVIDIA metadata format does not support volumes above 2TiB. Sponsored by: iXsystems, Inc. MFC after: 2 weeks
* Allow upper layers to discover than BIO_DELETE and/or BIO_FLUSH is notpjd2011-10-251-3/+3
| | | | | | supported by returning EOPNOTSUPP instead of 0 or ENODEV. MFC after: 3 days
* Improve style a bit.pjd2011-10-251-5/+7
| | | | MFC after: 3 days
* Simplify disk_alloc().pjd2011-10-251-4/+2
| | | | MFC after: 3 days
* Add support for creating GELI devices with older metadata version for usepjd2011-10-252-5/+56
| | | | | | | | | | | | | | with older FreeBSD versions: - Add -V option to 'geli init' to specify version number. If no -V is given the most recent version is used. - If -V is given don't allow to use features not supported by this version. - Print version in 'geli list' output. - Update manual page and add table describing which GELI version is supported by which FreeBSD version, so one can use it when preparing GELI device for older FreeBSD version. Inspired by: Garrett Cooper <yanegomi@gmail.com> MFC after: 3 days
* When decoding metadata, check magic string, so we know this is not GELI devicepjd2011-10-251-0/+2
| | | | | | | before we check its version. We don't want to report that some garbage is unsupported version if this is not even GELI provider. MFC after: 3 days
* Prefer G_ELI_VERSION_* defines for version numbers over plain digits.pjd2011-10-251-3/+5
| | | | MFC after: 3 days
* Fit lines into 80 chars.pjd2011-10-251-4/+6
| | | | MFC after: 3 days
* When metadata is at newer version than the highest supported, returnpjd2011-10-251-1/+1
| | | | | | EOPNOTSUPP when decoding. MFC after: 3 days
* Add support for Boot Camp. The support is defined as follows:marcel2011-10-231-97/+213
| | | | | | | | | | | | o Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT). o When Boot Camp is enabled, update the MBR whenever we write the GPT. o Creation of a Boot Camp enabled GPT is not supported. o Automatically disable Boot Camp when the GPT has been changed so that there's either no EFI partition or no HFS+ partition. o The first 4 partitions (by index) get mirrored in the MBR. Requested by, discussed with and tested by: kris@pcbsd.org MFC after: 1 week
* Allow to dump on Solaris swap partitions.marius2011-10-181-1/+2
| | | | | PR: 161764 Submitted by: Peter Jeremy
* Add some spare fields to the g_class and g_geom structures needed to implementpjd2011-07-171-0/+5
| | | | direct I/O handling and provider's property changes handling.
OpenPOWER on IntegriCloud