\hypertarget{g__raid__ctl_8c_source}{}\doxysection{g\+\_\+raid\+\_\+ctl.\+c}
\label{g__raid__ctl_8c_source}\index{geom/raid/g\_raid\_ctl.c@{geom/raid/g\_raid\_ctl.c}}
\mbox{\hyperlink{g__raid__ctl_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00030}\mbox{\hyperlink{g__raid__ctl_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__raid__ctl_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/bitstring.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <vm/uma.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <machine/atomic.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__raid_8h}{geom/raid/g\_raid.h}}>}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00048}00048 \textcolor{preprocessor}{\#include "{}g\_raid\_md\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00050}00050 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00051}\mbox{\hyperlink{g__raid__ctl_8c_a7ae8245b8c16fd8c5091de0fa625ac84}{00051}} \mbox{\hyperlink{g__raid__ctl_8c_a7ae8245b8c16fd8c5091de0fa625ac84}{g\_raid\_find\_node}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00052}00052 \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00053}00053         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00054}00054         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00055}00055         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00056}00056         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00058}00058         \textcolor{comment}{/* Look for geom with specified name. */}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00059}00059         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00060}00060                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00061}00061                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00062}00062                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00063}00063                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a92d7a08f5e32fa07a7b8769b5b3ca4f4}{sc\_stopping}} != 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00064}00064                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00065}00065                 \textcolor{keywordflow}{if} (strcasecmp(sc-\/>sc\_name, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00066}00066                         \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00067}00067         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00069}00069         \textcolor{comment}{/* Look for provider with specified name. */}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00070}00070         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00071}00071                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00072}00072                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00073}00073                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00074}00074                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a92d7a08f5e32fa07a7b8769b5b3ca4f4}{sc\_stopping}} != 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00075}00075                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00076}00076                 LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider, provider) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00077}00077                         \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00078}00078                                 \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00079}00079                         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \textcolor{stringliteral}{"{}raid/"{}}, 5) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00080}00080                             strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}} + 5, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00081}00081                                 \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00082}00082                 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00083}00083         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00085}00085         \textcolor{comment}{/* Look for volume with specified name. */}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00086}00086         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00087}00087                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00088}00088                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00089}00089                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00090}00090                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a92d7a08f5e32fa07a7b8769b5b3ca4f4}{sc\_stopping}} != 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00091}00091                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00092}00092                 TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00093}00093                         \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_abdedb24b3ca3f4d3020f94e62d63fa05}{v\_name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00094}00094                                 \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00095}00095                 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00096}00096         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00097}00097         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00098}00098 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00100}00100 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00101}\mbox{\hyperlink{g__raid__ctl_8c_a64b8f1fafbf229e0a6f83712cb876d3f}{00101}} \mbox{\hyperlink{g__raid__ctl_8c_a64b8f1fafbf229e0a6f83712cb876d3f}{g\_raid\_ctl\_label}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00102}00102 \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00103}00103         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *geom;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00104}00104         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00105}00105         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *format;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00106}00106         \textcolor{keywordtype}{int} *nargs;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00107}00107         \textcolor{keywordtype}{int} crstatus, ctlstatus;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00108}00108         \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}[64];}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00110}00110         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00111}00111         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00112}00112                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00113}00113                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00114}00114         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00115}00115         \textcolor{keywordflow}{if} (*nargs < 4) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00116}00116                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00117}00117                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00118}00118         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00119}00119         format = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00120}00120         \textcolor{keywordflow}{if} (format == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00121}00121                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No format received."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00122}00122                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00123}00123         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00124}00124         crstatus = \mbox{\hyperlink{g__raid_8c_a221996dd3b6f76ee051d1461f45aa3c7}{g\_raid\_create\_node\_format}}(format, \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \&geom);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00125}00125         \textcolor{keywordflow}{if} (crstatus == \mbox{\hyperlink{g__raid__md__if_8m_ae3e40a1a8689841d6d6f54a441d53d43}{G\_RAID\_MD\_TASTE\_FAIL}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00126}00126                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Failed to create array with format '\%s'."{}},}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00127}00127                     format);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00128}00128                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00129}00129         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00130}00130         sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *)geom-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00131}00131         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00132}00132         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00133}00133         ctlstatus = G\_RAID\_MD\_CTL(sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}}, \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00134}00134         \textcolor{keywordflow}{if} (ctlstatus < 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00135}00135                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Command failed: \%d."{}}, ctlstatus);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00136}00136                 \textcolor{keywordflow}{if} (crstatus == \mbox{\hyperlink{g__raid__md__if_8m_aa5340dcca98f524650a3aa3675073120}{G\_RAID\_MD\_TASTE\_NEW}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00137}00137                         \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00138}00138         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00139}00139                 \textcolor{keywordflow}{if} (crstatus == \mbox{\hyperlink{g__raid__md__if_8m_aa5340dcca98f524650a3aa3675073120}{G\_RAID\_MD\_TASTE\_NEW}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00140}00140                         snprintf(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}), \textcolor{stringliteral}{"{}\%s created\(\backslash\)n"{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00141}00141                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00142}00142                         snprintf(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}), \textcolor{stringliteral}{"{}\%s reused\(\backslash\)n"{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00143}00143                 \mbox{\hyperlink{geom_8h_a0e59ccc0c24cea0ff0cee98b64021ba5}{gctl\_set\_param\_err}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}output"{}}, \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, strlen(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}) + 1);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00144}00144         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00145}00145         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00146}00146         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00147}00147 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00149}00149 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00150}\mbox{\hyperlink{g__raid__ctl_8c_adc7dfcda7858bd438f888f5986f90b85}{00150}} \mbox{\hyperlink{g__raid__ctl_8c_adc7dfcda7858bd438f888f5986f90b85}{g\_raid\_ctl\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00151}00151 \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00152}00152         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00153}00153         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *nodename;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00154}00154         \textcolor{keywordtype}{int} *nargs, *force;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00155}00155         \textcolor{keywordtype}{int} error, how;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00157}00157         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00158}00158         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00159}00159                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00160}00160                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00161}00161         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00162}00162         \textcolor{keywordflow}{if} (*nargs != 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00163}00163                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00164}00164                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00165}00165         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00166}00166         nodename = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00167}00167         \textcolor{keywordflow}{if} (nodename == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00168}00168                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No array name received."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00169}00169                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00170}00170         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00171}00171         sc = \mbox{\hyperlink{g__raid__ctl_8c_a7ae8245b8c16fd8c5091de0fa625ac84}{g\_raid\_find\_node}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, nodename);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00172}00172         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00173}00173                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Array '\%s' not found."{}}, nodename);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00174}00174                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00175}00175         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00176}00176         force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00177}00177         \textcolor{keywordflow}{if} (force != NULL \&\& *force)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00178}00178                 how = \mbox{\hyperlink{g__raid_8h_ae019bb639a31951ab4cf8dad7f68e46a}{G\_RAID\_DESTROY\_HARD}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00179}00179         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00180}00180                 how = \mbox{\hyperlink{g__raid_8h_a0ee512b619e7c7e9f9070e183319c1a9}{G\_RAID\_DESTROY\_SOFT}};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00181}00181         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00182}00182         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00183}00183         error = \mbox{\hyperlink{g__raid_8c_a883f53979069abea05efe4dc9b109d12}{g\_raid\_destroy}}(sc, how);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00184}00184         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00185}00185                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Array is busy."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00186}00186         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00187}00187 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00189}00189 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00190}\mbox{\hyperlink{g__raid__ctl_8c_afacfbf7f429ddcf9a59bc6248d956081}{00190}} \mbox{\hyperlink{g__raid__ctl_8c_afacfbf7f429ddcf9a59bc6248d956081}{g\_raid\_ctl\_other}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00191}00191 \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00192}00192         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00193}00193         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *nodename;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00194}00194         \textcolor{keywordtype}{int} *nargs;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00195}00195         \textcolor{keywordtype}{int} ctlstatus;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00197}00197         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00198}00198         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00199}00199                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00200}00200                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00201}00201         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00202}00202         \textcolor{keywordflow}{if} (*nargs < 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00203}00203                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00204}00204                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00205}00205         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00206}00206         nodename = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00207}00207         \textcolor{keywordflow}{if} (nodename == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00208}00208                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No array name received."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00209}00209                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00211}00211         sc = \mbox{\hyperlink{g__raid__ctl_8c_a7ae8245b8c16fd8c5091de0fa625ac84}{g\_raid\_find\_node}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, nodename);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00212}00212         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00213}00213                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Array '\%s' not found."{}}, nodename);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00214}00214                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00215}00215         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00216}00216         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00217}00217         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00218}00218         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00219}00219                 ctlstatus = G\_RAID\_MD\_CTL(sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}}, \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00220}00220                 \textcolor{keywordflow}{if} (ctlstatus < 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00221}00221                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Command failed: \%d."{}}, ctlstatus);}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00222}00222         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00223}00223         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00224}00224         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00227}00227 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00228}\mbox{\hyperlink{g__raid__ctl_8c_a135fcfa20b22430d4405e50b8514a0ec}{00228}} \mbox{\hyperlink{g__raid__ctl_8c_a135fcfa20b22430d4405e50b8514a0ec}{g\_raid\_ctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00230}00230         uint32\_t *version;}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00232}00232         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00234}00234         version = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}version"{}}, \textcolor{keyword}{sizeof}(*version));}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00235}00235         \textcolor{keywordflow}{if} (version == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00236}00236                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}version"{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00237}00237                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00238}00238         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00239}00239         \textcolor{keywordflow}{if} (*version != \mbox{\hyperlink{g__raid_8h_ae1f92b2ce4273a402094e8333038f1dd}{G\_RAID\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00240}00240                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Userland and kernel parts are out of sync."{}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00241}00241                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00242}00242         \}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00244}00244         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}label"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00245}00245                 \mbox{\hyperlink{g__raid__ctl_8c_a64b8f1fafbf229e0a6f83712cb876d3f}{g\_raid\_ctl\_label}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00246}00246         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}stop"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00247}00247                 \mbox{\hyperlink{g__raid__ctl_8c_adc7dfcda7858bd438f888f5986f90b85}{g\_raid\_ctl\_stop}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00248}00248         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00249}00249                 \mbox{\hyperlink{g__raid__ctl_8c_afacfbf7f429ddcf9a59bc6248d956081}{g\_raid\_ctl\_other}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__raid__ctl_8c_source_l00250}00250 \}}

\end{DoxyCode}
