summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Make geom_mirror more friendly to SSDs. To properly support TRIM,glebius2012-07-012-3/+15
| | | | | | | | | | | | | | | | | | | | | we need to pass BIO_DELETE requests down to providers that support it. Also, we need to announce our support for BIO_DELETE to upper consumer. This requires: - In g_mirror_start() return true for "GEOM::candelete" request. - In g_mirror_init_disk() probe below provider for "GEOM::candelete" attribute, and mark disk with a flag if it does support BIO_DELETE. - In g_mirror_register_request() distribute BIO_DELETE requests only to those disks, that do support it. Note that we announce "GEOM::candelete" as true unconditionally of whether we have TRIM-capable media down below or not. This is made intentionally, because upper consumer (usually UFS) requests the attribite only once at mount time. And if user ever migrates his mirror from HDDs to SSDs, then he/she would get TRIM working without remounting filesystem. Reviewed by: pjd
* In g_mirror_regular_request() upon successful delivery treatglebius2012-07-011-1/+2
| | | | | | | BIO_DELETE requests same way as BIO_WRITE removing them from queue. This fixes panic with BIO_DELETE operations on geom_mirror. Reviewed by: pjd
* Use %j to match intmax_t.imp2012-07-011-1/+1
|
* MFP4 #212266brooks2012-06-291-10/+11
| | | | | | Fix compile on MIPS64. Sponsored by: DARPA, AFRL
* In g_disk_providergone(), don't continue if the softc is NULL. This may beken2012-06-271-0/+8
| | | | | | | the case if we've already gone through g_disk_destroy(). Reported by: Michael Butler <imb@protected-networks.net> MFC after: 3 days
* Consume spare fields for the providergone pointers added to the g_class andken2012-06-251-4/+2
| | | | | | | | g_geom structures in change 237518. The original change would have broken the ABI. Suggested by: ae MFC after: 4 days
* Fix a bug which causes a panic in daopen(). The panic is caused byken2012-06-244-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a da(4) instance going away while GEOM is still probing it. In this case, the GEOM disk class instance has been created by disk_create(), and the taste of the disk is queued in the GEOM event queue. While that event is queued, the da(4) instance goes away. When the open call comes into the da(4) driver, it dereferences the freed (but non-NULL) peripheral pointer provided by GEOM, which results in a panic. The solution is to add a callback to the GEOM disk code that is called when all of its resources are cleaned up. This is implemented inside GEOM by adding an optional callback that is called when all consumers have detached from a provider, and the provider is about to be deleted. scsi_cd.c, scsi_da.c: In the register routine for the cd(4) and da(4) routines, acquire a reference to the CAM peripheral instance just before we call disk_create(). Use the new GEOM disk d_gone() callback to register a callback (dadiskgonecb()/cddiskgonecb()) that decrements the peripheral reference count once GEOM has finished cleaning up its resources. In the cd(4) driver, clean up open and close behavior slightly. GEOM makes sure we only get one open() and one close call, so there is no need to set an open flag and decrement the reference count if we are not the first open. In the cd(4) driver, use cam_periph_release_locked() in a couple of error scenarios to avoid extra mutex calls. geom.h: Add a new, optional, providergone callback that is called when a provider is about to be deleted. geom_disk.h: Add a new d_gone() callback to the GEOM disk interface. Bump the DISK_VERSION to version 2. This probably should have been done after a couple of previous changes, especially the addition of the d_getattr() callback. geom_disk.c: Add a providergone callback for the disk class, g_disk_providergone(), that calls the user's d_gone() callback if it exists. Bump the DISK_VERSION to 2. geom_subr.c: In g_destroy_provider(), call the providergone callback if it has been provided. In g_new_geomf(), propagate the class's providergone callback to the new geom instance. blkfront.c: Callers of disk_create() are supposed to pass in DISK_VERSION, not an explicit disk API version number. Update the blkfront driver to do that. disk.9: Update the disk(9) man page to include information on the new d_gone() callback, as well as the previously added d_getattr() callback, d_descr field, and HBA PCI ID fields. MFC after: 5 days
* Always reconstruct partition entries in the PMBR when Boot Camp isae2012-06-141-13/+10
| | | | | | | disabled. This helps to easily recover from situations when PMBR is damaged and contains no entries. MFC after: 1 week
* Add missing newlines into XML output.mav2012-06-051-5/+5
| | | | | MFC after: 3 days Sponsored by: iXsystems, Inc.
* Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes.marcel2012-05-256-0/+25
| | | | The gpart alias for these partition types is "freebsd-nandfs".
* Revert r235918 for now and add comment explaining the reason for thetrasz2012-05-251-3/+9
| | | | size check.
* Make g_label(4) ignore provider size when looking for UFS labels.trasz2012-05-241-5/+3
| | | | | | | | Without it, it fails to create labels for filesystems resized by growfs(8). PR: kern/165962 Submitted by: Olivier Cochard-Labbe <olivier at cochard dot me>
* - Correct signedness for casts;delphij2012-05-231-2/+3
| | | | | | - Wrap long line while I'm there. Noticed by: pjd, avg
* Use %ju to match uintmax_t usagedelphij2012-05-231-1/+1
|
* Use %j and cast off_t to intmax_t for now to fix build.delphij2012-05-231-2/+2
| | | | Noticed by: bz
* Add a new geom class which allows to divide NAND Flash chipgber2012-05-221-0/+255
| | | | | | | | | | into partitions. Partitions are created based on data in dts file which are extracted and interpreted by slicer. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
* Prevent removing of the last active component from a mirror.ae2012-05-181-1/+12
| | | | | | PR: kern/154860 Reviewed by: pjd MFC after: 1 week
* Introduce new device flag G_MIRROR_DEVICE_FLAG_TASTING. It shouldae2012-05-182-0/+10
| | | | | | | | protect geom from destroying while it is tasting. PR: kern/154860 Reviewed by: pjd MFC after: 1 week
* Add missing period at the end of the error messageeadler2012-05-131-2/+2
| | | | | | | Submitted by: pjd Approved by: cperciva (implicit) MFC after: 3 days X-MFC-With: r235201
* - Prevent error status leak if write to some of the RAID1/1E volume disksmav2012-05-112-4/+29
| | | | | | | failed while write to some other succeeded. Instead mark disk as failed. - Make RAID1E less aggressive in failing disks to avoid volume breakage. MFC after: 2 weeks
* Clarify error that geli generateseadler2012-05-091-3/+4
| | | | | | | | | | when it finds corrupt data. PR: kern/165695 Submitted by: Robert Simmons <rsimmons0@gmail.com> Reviewed by: pjd Approved by: cperciva MFC after: 1 week
* Remove some hardcoded constants from code.mav2012-05-061-8/+11
|
* Plug small memory leaks.mav2012-05-062-1/+5
|
* Add support for RAID5R. Slightly improve support for RAIDMDF.mav2012-05-064-21/+60
|
* Fix `gmultipath configure` for big-endian machines.mav2012-05-061-9/+10
| | | | MFC after: 1 week
* Fix bug causing memory corruption and panics with big-endian metadata.mav2012-05-041-1/+1
|
* Implement read-only support for volumes in optimal state (without usingmav2012-05-042-36/+72
| | | | redundancy) for the following RAID levels: RAID4/5E/5EE/6/MDF.
* Add optional -o argument to the `graid label ` to specify some metadatamav2012-05-035-14/+63
| | | | | format options. Use it for specifying byte order for the DDF metadata: big-endian defined by specification and little-endian used by Adaptec.
* Improve spare disks support. Unluckily, for some reason Adaptec 1430SAmav2012-05-011-68/+134
| | | | | RAID BIOS doesn't want to understand spare disks created by graid. But at least spares created by BIOS are working fine now.
* Implement volume deletion if disk has more then one partition.mav2012-05-011-30/+37
|
* Improve DDF metadata writing.mav2012-05-011-54/+92
|
* Add to GEOM RAID class module, supporting the DDF metadata format, asmav2012-04-302-0/+3245
| | | | | | | | | | | | | | | 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.
* s/gmirror/graid/mav2012-04-291-2/+2
|
* Fix RAID5 level names changed at r234603.mav2012-04-275-6/+6
|
* Fix copy-paste typo in r234603.mav2012-04-231-2/+2
| | | | Submitted by: kan
* Add names for all primary RAID levels defined by DDF 2.0 specification.mav2012-04-234-19/+180
|
* Add sos@ copyrights to RAID metadata modules, respecting his efforts inmav2012-04-235-0/+5
| | | | decoding metadata formats in ataraid(4) code.
* Add to GEOM RAID class module for reading non-degraded RAID5 volumes andmav2012-04-198-29/+468
| | | | | | | | some environment to differentiate 4 possible RAID5 on-disk layouts. Tested with Intel and AMD RAID BIOSes. MFC after: 2 weeks
* VMware environments are not unusual now. Add VMware partitions recognitionmarck2012-04-184-0/+14
| | | | | | | | (both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part. Reviewed by: ae Approved by: ae MFC after: 2 weeks
* Some improvements to GEOM MULTIPATH:mav2012-04-181-21/+95
| | | | | | | | | | | | | | | | - Implement "configure" command to allow switching operation mode of running device on-fly without destroying and recreation. - Implement Active/Read mode as hybrid of Active/Active and Active/Passive. In this mode all paths not marked FAIL may handle reads same time, but unlike Active/Active only one path handles write requests at any point in time. It allows to closer follow original write request order if above layers need it for data consistency (not waiting for requisite write completion before sending dependent write). - Hide duplicate messages about device status change. - Remove periodic thread wake up with 10Hz rate. MFC after: 2 weeks Sponsored by: iXsystems, Inc.
* Expand locking around identification of filesystem mount point whenmckusick2012-04-081-5/+17
| | | | | | | accounting for I/O counts at completion of I/O operation. Also switch from using global devmtx to vnode mutex to reduce contention. Suggested and reviewed by: kib
* 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
OpenPOWER on IntegriCloud