summaryrefslogtreecommitdiffstats
path: root/sys/geom/multipath/g_multipath.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r312533: Report disk addition errors on `add` or `create` subcommand.mav2017-01-271-4/+4
|
* MFC r308579: Do not report error on close even if we have no paths left.mav2016-11-261-1/+1
|
* Prevent g_access calls to bad multipath memberssmh2015-12-151-2/+18
| | | | | | | | | | | | | | When a multipath member is orphaned its access members are zeroed before its removed if marked for wither, so prevent any future calls to g_access on such members. This prevents a panic on debug kernels which validates the resultant values aren't negative. Reviewed by: mav MFC after: 2 weeks Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4416
* Remove sleeps from geom_up thread on device destruction.mav2015-04-091-2/+2
| | | | MFC after: 3 days.
* Removed unneeded and dangerous assignment. It would probably cause NULLmav2014-01-191-1/+0
| | | | | | | refererence panic if compiler not optimize it out. Found with: Clang static analyzer MFC after: 2 weeks
* In addition to r258220 allow shrinking in "automatic" mode if there ismav2013-11-171-35/+47
| | | | | | | | | already valid metadata found at the new location. This should allow easy transparent recovery if first resize was done by mistake. While there, unify metadata write code and fix minor memory leak. MFC after: 1 month
* Implement automatic live resize support for GEOM MULTIPATH class.mav2013-11-161-13/+92
| | | | | | | | | In "manual" mode just automatically resize provider in any direction. In "automatic" mode allow only growth (with new metadata write); in case of shrinking destroy the multipath device same as before since it may be undesirable to write new metadata within old user area. MFC after: 1 month
* Merge GEOM direct dispatch changes from the projects/camlock branch.mav2013-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When safety requirements are met, it allows to avoid passing I/O requests to GEOM g_up/g_down thread, executing them directly in the caller context. That allows to avoid CPU bottlenecks in g_up/g_down threads, plus avoid several context switches per I/O. The defined now safety requirements are: - caller should not hold any locks and should be reenterable; - callee should not depend on GEOM dual-threaded concurency semantics; - on the way down, if request is unmapped while callee doesn't support it, the context should be sleepable; - kernel thread stack usage should be below 50%. To keep compatibility with GEOM classes not meeting above requirements new provider and consumer flags added: - G_CF_DIRECT_SEND -- consumer code meets caller requirements (request); - G_CF_DIRECT_RECEIVE -- consumer code meets callee requirements (done); - G_PF_DIRECT_SEND -- provider code meets caller requirements (done); - G_PF_DIRECT_RECEIVE -- provider code meets callee requirements (request). Capable GEOM class can set them, allowing direct dispatch in cases where it is safe. If any of requirements are not met, request is queued to g_up or g_down thread same as before. Such GEOM classes were reviewed and updated to support direct dispatch: CONCAT, DEV, DISK, GATE, MD, MIRROR, MULTIPATH, NOP, PART, RAID, STRIPE, VFS, ZERO, ZFS::VDEV, ZFS::ZVOL, all classes based on g_slice KPI (LABEL, MAP, FLASHMAP, etc). To declare direct completion capability disk(9) KPI got new flag equivalent to G_PF_DIRECT_SEND -- DISKFLAG_DIRECT_COMPLETION. da(4) and ada(4) disk drivers got it set now thanks to earlier CAM locking work. This change more then twice increases peak block storage performance on systems with manu CPUs, together with earlier CAM locking changes reaching more then 1 million IOPS (512 byte raw reads from 16 SATA SSDs on 4 HBAs to 256 user-level threads). Sponsored by: iXsystems, Inc. MFC after: 2 months
* Make GEOM MULTIPATH to report unmapped bio support if underling path reportmav2013-03-251-0/+2
| | | | it. GEOM MULTIPATH itself never touches the data and so transparent.
* - Don't pass geom and provider names as format strings.jh2012-11-201-1/+1
| | | | | | | - Add __printflike() attributes. - Remove an extra argument for the g_new_geomf() call in swapongeom_ev(). Reviewed by: pjd
* (g_multipath_rotate): Fix algorithm so that it does rotate over all goodthomas2012-08-251-3/+10
| | | | | | | | providers, not just the last two. PR: kern/170379 Reviewed by: mav MFC after: 2 weeks
* New command "gmultipath prefer" to force selection of a specifiedthomas2012-08-031-0/+74
| | | | | | | provider in an Active/Passive configuration. Reviewed by: mav MFC after: 4 weeks
* Add missing newlines into XML output.mav2012-06-051-5/+5
| | | | | MFC after: 3 days Sponsored by: iXsystems, Inc.
* Fix `gmultipath configure` for big-endian machines.mav2012-05-061-9/+10
| | | | MFC after: 1 week
* 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.
* Major GEOM MULTIPATH class rewrite:mav2011-11-121-118/+604
| | | | | | | | | | | | | | | | | | | | | | | | | - 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-071-1/+1
| | | | | | 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.
* Include sys/sbuf.h directly.ae2011-07-111-0/+1
| | | | Reviewed by: pjd
* Remove unneeded code.ae2011-05-041-14/+0
| | | | MFC after: 1 week
* Add some FEATURE macros for various GEOM classes.netchild2011-02-251-0/+1
| | | | | | | | | | | No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: silence on geom@ during 2 weeks X-MFC after: to be determined in last commit with code from this project
* Yet another potential dereference of a dead provider.mjacob2010-05-141-1/+1
| | | | | Sponsored by: Panasas MFC after: 1 week
* Make sure to check that the active provider pointer points to something beforemjacob2010-05-141-1/+1
| | | | | | | dereferencing the pointer. Sponsored by: Pansas MFC after: 1 week
* Change how multipath labels are created and managed. This makes it easiermjacob2010-03-291-76/+38
| | | | | | | | | | | | | | | | | to support various storage boxes which really aren't active-active. We only write the label on the *first* provider. For all other providers we just "add" the disk. This also allows for an "add" verb. A usage implication is that you should specificy the currently active storage path as the first provider. Note that this does not add RDAC-like functionality, but better allows for autovolumefailover configurations (additional checkins elsewhere will support this). Sponsored by: Panasas MFC after: 1 month
* Add 'rotate' and 'getactive' verbs to provide some control and informationmjacob2010-03-211-0/+87
| | | | | | | about what the currently active path is. Sponsored by: Panasas MFC after: 1 month
* - Style fixes.pjd2010-02-181-54/+32
| | | | - Prefer strlcpy() over strncpy().
* There's no need for checking result of M_WAITOK allocation.pjd2009-08-271-4/+0
|
* Fix an obvious topology lock leak.pjd2009-08-271-0/+1
| | | | MFC after: 3 days
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-2/+2
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* First cut at GEOM based multipath. This is an active/passive{/passive...}mjacob2007-02-271-0/+768
arrangement that has no intrinsic internal knowledge of whether devices it is given are truly multipath devices. As such, this is a simplistic approach, but still a useful one. The basic approach is to (at present- this will change soon) use camcontrol to find likely identical devices and and label the trailing sector of the first one. This label contains both a full UUID and a name. The name is what is presented in /dev/multipath, but the UUID is used as a true distinguishor at g_taste time, thus making sure we don't have chaos on a shared SAN where everyone names their data multipath as "Fred". The first of N identical devices (and N *may* be 1!) becomes the active path until a BIO request is failed with EIO or ENXIO. When this occurs, the active disk is ripped away and the next in a list is picked to (retry and) continue with. During g_taste events new disks that meet the match criteria for existing multipath geoms get added to the tail end of the list. Thus, this active/passive setup actually does work for devices which go away and come back, as do (now) mpt(4) and isp(4) SAN based disks. There is still a lot to do to improve this- like about 5 of the 12 recommendations I've received about it, but it's been functional enough for a while that it deserves a broader test base. Reviewed by: pjd Sponsored by: IronPort Systems MFC: 2 months
OpenPOWER on IntegriCloud