\hypertarget{g__concat_8c_source}{}\doxysection{g\+\_\+concat.\+c}
\label{g__concat_8c_source}\index{geom/concat/g\_concat.c@{geom/concat/g\_concat.c}}
\mbox{\hyperlink{g__concat_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2004-\/2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00030}\mbox{\hyperlink{g__concat_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__concat_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__concat_8h}{geom/concat/g\_concat.h}}>}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00047}\mbox{\hyperlink{g__concat_8c_acb778b785c487ccb4f197a75f6207720}{00047}} \mbox{\hyperlink{g__concat_8c_acb778b785c487ccb4f197a75f6207720}{FEATURE}}(geom\_concat, \textcolor{stringliteral}{"{}GEOM concatenation support"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00049}\mbox{\hyperlink{g__concat_8c_a03e269246c9cb790b5f48584d1a7fef4}{00049}} \textcolor{keyword}{static} \mbox{\hyperlink{g__concat_8c_a03e269246c9cb790b5f48584d1a7fef4}{MALLOC\_DEFINE}}(M\_CONCAT, \textcolor{stringliteral}{"{}concat\_data"{}}, \textcolor{stringliteral}{"{}GEOM\_CONCAT Data"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00051}\mbox{\hyperlink{g__concat_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{00051}} \mbox{\hyperlink{g__concat_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{SYSCTL\_DECL}}(\_kern\_geom);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00052}\mbox{\hyperlink{g__concat_8c_aab2b03f3c9958c68774172f58289652c}{00052}} \textcolor{keyword}{static} \mbox{\hyperlink{g__concat_8c_aab2b03f3c9958c68774172f58289652c}{SYSCTL\_NODE}}(\_kern\_geom, OID\_AUTO, concat, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00053}00053     \textcolor{stringliteral}{"{}GEOM\_CONCAT stuff"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00054}\mbox{\hyperlink{g__concat_8c_ac65b0a910cc7ea1f43eccdcac1218238}{00054}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__concat_8c_ac65b0a910cc7ea1f43eccdcac1218238}{g\_concat\_debug}} = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00055}\mbox{\hyperlink{g__concat_8c_a33c91653142d361fbeb6e797eb8323c8}{00055}} \mbox{\hyperlink{g__concat_8c_a33c91653142d361fbeb6e797eb8323c8}{SYSCTL\_UINT}}(\_kern\_geom\_concat, OID\_AUTO, debug, CTLFLAG\_RWTUN, \&\mbox{\hyperlink{g__concat_8c_ac65b0a910cc7ea1f43eccdcac1218238}{g\_concat\_debug}}, 0,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00056}00056     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00058}00058 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc, boolean\_t force);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00059}\mbox{\hyperlink{g__concat_8c_aa5489164e65635f727d944dde10a7293}{00059}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__concat_8c_aa5489164e65635f727d944dde10a7293}{g\_concat\_destroy\_geom}}(\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__concat_8c_source_l00060}00060     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00062}\mbox{\hyperlink{g__concat_8c_aae5a62de53ab107c8d00bd902c571562}{00062}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a631656592e7bd0d9b508904254e8e7a7}{g\_taste\_t}} \mbox{\hyperlink{g__concat_8c_aae5a62de53ab107c8d00bd902c571562}{g\_concat\_taste}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00063}\mbox{\hyperlink{g__concat_8c_a1f66dbd3bc05740560f22d142a84d647}{00063}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a98129532a3f4d0845714f8b272b9da8a}{g\_ctl\_req\_t}} \mbox{\hyperlink{g__concat_8c_a1f66dbd3bc05740560f22d142a84d647}{g\_concat\_config}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00064}\mbox{\hyperlink{g__concat_8c_acdf0631a886cc0428f60eb2f7f005c82}{00064}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_afdb390a9279523d96cb700a712939f76}{g\_dumpconf\_t}} \mbox{\hyperlink{g__concat_8c_acdf0631a886cc0428f60eb2f7f005c82}{g\_concat\_dumpconf}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00066}\mbox{\hyperlink{g__concat_8c_a0c6f3f5208a430303eca088c2c4cac11}{00066}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{g__concat_8c_a0c6f3f5208a430303eca088c2c4cac11}{g\_concat\_class}} = \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00067}00067         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}} = \mbox{\hyperlink{g__concat_8h_aa43a5a3ab23536ef0afbe611e7207071}{G\_CONCAT\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00068}00068         .version = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00069}00069         .ctlreq = \mbox{\hyperlink{g__concat_8c_a1f66dbd3bc05740560f22d142a84d647}{g\_concat\_config}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00070}00070         .taste = \mbox{\hyperlink{g__concat_8c_aae5a62de53ab107c8d00bd902c571562}{g\_concat\_taste}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00071}00071         .destroy\_geom = \mbox{\hyperlink{g__concat_8c_aa5489164e65635f727d944dde10a7293}{g\_concat\_destroy\_geom}}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00072}00072 \};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00074}00074 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00075}00075 \textcolor{comment}{ * Greatest Common Divisor.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00076}00076 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00077}00077 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00078}\mbox{\hyperlink{g__concat_8c_ac07bba9cc14eabdd7b25aff654726d28}{00078}} \mbox{\hyperlink{g__concat_8c_ac07bba9cc14eabdd7b25aff654726d28}{gcd}}(u\_int a, u\_int b)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00079}00079 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00080}00080         u\_int c;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00082}00082         \textcolor{keywordflow}{while} (b != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00083}00083                 c = a;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00084}00084                 a = b;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00085}00085                 b = (c \% b);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00086}00086         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00087}00087         \textcolor{keywordflow}{return} (a);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00088}00088 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00090}00090 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00091}00091 \textcolor{comment}{ * Least Common Multiple.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00092}00092 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00093}00093 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00094}\mbox{\hyperlink{g__concat_8c_a692b46e1f064015804ee07d568f88c0d}{00094}} \mbox{\hyperlink{g__concat_8c_a692b46e1f064015804ee07d568f88c0d}{lcm}}(u\_int a, u\_int b)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00095}00095 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00097}00097         \textcolor{keywordflow}{return} ((a * b) / \mbox{\hyperlink{g__concat_8c_ac07bba9cc14eabdd7b25aff654726d28}{gcd}}(a, b));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00098}00098 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00100}00100 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00101}00101 \textcolor{comment}{ * Return the number of valid disks.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00102}00102 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00103}00103 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00104}\mbox{\hyperlink{g__concat_8c_a7a0982d5746abe1cb97f57ff51e54235}{00104}} \mbox{\hyperlink{g__concat_8c_a7a0982d5746abe1cb97f57ff51e54235}{g\_concat\_nvalid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00105}00105 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00106}00106         u\_int no;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00107}00107         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00109}00109         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}, SA\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00111}00111         no = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00112}00112         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00113}00113                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00114}00114                         no++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00115}00115         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00117}00117         \textcolor{keywordflow}{return} (no);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00118}00118 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00120}00120 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00121}\mbox{\hyperlink{g__concat_8c_ae6a927d62de8d79af351af88e9487570}{00121}} \mbox{\hyperlink{g__concat_8c_ae6a927d62de8d79af351af88e9487570}{g\_concat\_remove\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00122}00122 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00123}00123         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00124}00124         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00126}00126         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00127}00127         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL, (\textcolor{stringliteral}{"{}Non-\/valid disk in \%s."{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00128}00128         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00129}00129         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00131}00131         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00132}00132                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Disk \%s removed from \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00133}00133                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00134}00134                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed = 1;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00135}00135         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00137}00137         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00138}00138                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s deactivated."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00139}00139                     sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00140}00140                 \mbox{\hyperlink{geom_8h_a164882713025c4e0cc58b1ac8501bcf0}{g\_wither\_provider}}(sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00141}00141                 sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00142}00142         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00144}00144         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} > 0 || \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} > 0 || \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} > 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00145}00145                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00146}00146         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00147}00147         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00148}00148         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00149}00149         \textcolor{comment}{/* If there are no valid disks anymore, remove device. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00150}00150         \textcolor{keywordflow}{if} (LIST\_EMPTY(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}}-\/>consumer))}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00151}00151                 \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00152}00152 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00155}\mbox{\hyperlink{g__concat_8c_a58dfb64c0d3d654eea4cb5fd7e930aba}{00155}} \mbox{\hyperlink{g__concat_8c_a58dfb64c0d3d654eea4cb5fd7e930aba}{g\_concat\_orphan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00156}00156 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00157}00157         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00158}00158         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00159}00159         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00161}00161         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00162}00162         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00163}00163         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00164}00164         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00165}00165                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00167}00167         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00168}00168         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)   \textcolor{comment}{/* Possible? */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00169}00169                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00170}00170         \mbox{\hyperlink{g__concat_8c_ae6a927d62de8d79af351af88e9487570}{g\_concat\_remove\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00171}00171 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00173}00173 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00174}\mbox{\hyperlink{g__concat_8c_a07787fefe5c3d095cf25f0f066768e9b}{00174}} \mbox{\hyperlink{g__concat_8c_a07787fefe5c3d095cf25f0f066768e9b}{g\_concat\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} dr, \textcolor{keywordtype}{int} dw, \textcolor{keywordtype}{int} de)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00175}00175 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00176}00176         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *cp1, *cp2, *tmp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00177}00177         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00178}00178         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00179}00179         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00180}00180         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00182}00182         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00183}00183         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00184}00184         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00186}00186         \textcolor{comment}{/* On first open, grab an extra "{}exclusive"{} bit */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00187}00187         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} == 0 \&\& \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} == 0 \&\& \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00188}00188                 de++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00189}00189         \textcolor{comment}{/* ... and let go of it on last close */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00190}00190         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} + dr) == 0 \&\& (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} + dw) == 0 \&\& (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} + de) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00191}00191                 de-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00193}00193         sx\_slock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00194}00194         LIST\_FOREACH\_SAFE(cp1, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer, consumer, tmp) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00195}00195                 error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(cp1, dr, dw, de);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00196}00196                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00197}00197                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00198}00198                 \mbox{\hyperlink{structdisk}{disk}} = cp1-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00199}00199                 \textcolor{keywordflow}{if} (cp1-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} == 0 \&\& cp1-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} == 0 \&\& cp1-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} == 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00200}00200                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00201}00201                         \mbox{\hyperlink{g__concat_8c_ae6a927d62de8d79af351af88e9487570}{g\_concat\_remove\_disk}}(\mbox{\hyperlink{structdisk}{disk}}); \textcolor{comment}{/* May destroy geom. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00202}00202                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00203}00203         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00204}00204         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00205}00205         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00207}00207 fail:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00208}00208         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00209}00209         LIST\_FOREACH(cp2, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer, consumer) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00210}00210                 \textcolor{keywordflow}{if} (cp1 == cp2)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00211}00211                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00212}00212                 \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(cp2, -\/dr, -\/dw, -\/de);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00213}00213         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00214}00214         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00215}00215 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00217}00217 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00218}\mbox{\hyperlink{g__concat_8c_ad316a02db635e890d0f4d1ecff5fb1cb}{00218}} \mbox{\hyperlink{g__concat_8c_ad316a02db635e890d0f4d1ecff5fb1cb}{g\_concat\_candelete}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00219}00219 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00220}00220         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00221}00221         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00222}00222         \textcolor{keywordtype}{int} val;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00224}00224         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00225}00225         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00226}00226         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00227}00227                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed \&\& \mbox{\hyperlink{structdisk}{disk}}-\/>d\_candelete)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00228}00228                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00229}00229         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00230}00230         val = \mbox{\hyperlink{structdisk}{disk}} != NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00231}00231         \mbox{\hyperlink{geom_8h_ab8d593935d7aa976d200e92ae28d439d}{g\_handleattr}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::candelete"{}}, \&val, \textcolor{keyword}{sizeof}(val));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00232}00232 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00234}00234 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00235}\mbox{\hyperlink{g__concat_8c_a4cd3a14c19a7bb3af14d0e5443525d15}{00235}} \mbox{\hyperlink{g__concat_8c_a4cd3a14c19a7bb3af14d0e5443525d15}{g\_concat\_kernel\_dump}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00236}00236 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00237}00237         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00238}00238         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00239}00239         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00240}00240         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}} *gkd;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00242}00242         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00243}00243         gkd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}} *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00244}00244         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00245}00245                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_start <= gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}} \&\&}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00246}00246                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end > gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00247}00247                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00248}00248         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00249}00249         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00250}00250                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00251}00251                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00252}00252         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00254}00254         gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}} -\/= \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00255}00255         \textcolor{keywordflow}{if} (gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}} > \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end -\/ \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start -\/ gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00256}00256                 gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end -\/ \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start -\/ gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00257}00257         cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00258}00258         \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00259}00259                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00260}00260                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00261}00261         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00262}00262         cbp-\/>bio\_done = \mbox{\hyperlink{geom_8h_a3b40808daecd7db79de16471ac14397a}{g\_std\_done}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00263}00263         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00264}00264         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Kernel dump will go to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00265}00265             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>name);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00266}00266 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00268}00268 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00269}\mbox{\hyperlink{g__concat_8c_ae63cd4355be7a15d3d53cb16af46047b}{00269}} \mbox{\hyperlink{g__concat_8c_ae63cd4355be7a15d3d53cb16af46047b}{g\_concat\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00270}00270 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00271}00271         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00272}00272         \textcolor{keyword}{struct }bio *pbp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00273}00273 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00274}00274         pbp = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00275}00275         sc = pbp-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00276}00276         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a8538ff5f2236dc8a3b63ad57a0671498}{sc\_completion\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00277}00277         \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00278}00278                 pbp-\/>bio\_error = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00279}00279         pbp-\/>bio\_completed += \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_completed;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00280}00280         pbp-\/>bio\_inbed++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00281}00281         \textcolor{keywordflow}{if} (pbp-\/>bio\_children == pbp-\/>bio\_inbed) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00282}00282                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a8538ff5f2236dc8a3b63ad57a0671498}{sc\_completion\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00283}00283                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(pbp, pbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00284}00284         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00285}00285                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a8538ff5f2236dc8a3b63ad57a0671498}{sc\_completion\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00286}00286         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00287}00287 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00289}00289 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00290}00290 \textcolor{comment}{ * Called for both BIO\_FLUSH and BIO\_SPEEDUP. Just pass the call down}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00291}00291 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00292}00292 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00293}\mbox{\hyperlink{g__concat_8c_aa68c9daade6dc5ca27bf398c3eb8816e}{00293}} \mbox{\hyperlink{g__concat_8c_aa68c9daade6dc5ca27bf398c3eb8816e}{g\_concat\_passdown}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00294}00294 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00295}00295         \textcolor{keyword}{struct }bio\_queue\_head queue;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00296}00296         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00297}00297         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00298}00298         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00300}00300         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00302}00302         bioq\_init(\&queue);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00303}00303         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00304}00304                 cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00305}00305                 \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00306}00306                         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00307}00307                                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00308}00308                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00309}00309                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00310}00310                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00311}00311                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00312}00312                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00313}00313                 bioq\_insert\_tail(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00314}00314                 cbp-\/>bio\_done = \mbox{\hyperlink{g__concat_8c_ae63cd4355be7a15d3d53cb16af46047b}{g\_concat\_done}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00315}00315                 cbp-\/>bio\_caller1 = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00316}00316                 cbp-\/>bio\_to = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00317}00317         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00318}00318         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00319}00319                 \mbox{\hyperlink{g__concat_8h_a7486607483121615e5f969d218abc15a}{G\_CONCAT\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Sending request."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00320}00320                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = cbp-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00321}00321                 cbp-\/>bio\_caller1 = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00322}00322                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00323}00323         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00324}00324 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00326}00326 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00327}\mbox{\hyperlink{g__concat_8c_ac7c711fc66f713abae9ec27e9db36e1a}{00327}} \mbox{\hyperlink{g__concat_8c_ac7c711fc66f713abae9ec27e9db36e1a}{g\_concat\_start}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00328}00328 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00329}00329         \textcolor{keyword}{struct }bio\_queue\_head queue;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00330}00330         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00331}00331         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00332}00332         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00333}00333         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, end, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}}, off, len;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00334}00334         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00335}00335         \textcolor{keywordtype}{char} *addr;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00337}00337         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00338}00338         sc = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00339}00339         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00340}00340 \textcolor{comment}{         * If sc == NULL, provider's error should be set and g\_concat\_start()}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00341}00341 \textcolor{comment}{         * should not be called at all.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00342}00342 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00343}00343         KASSERT(sc != NULL,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00344}00344             (\textcolor{stringliteral}{"{}Provider's error should be set (error=\%d)(device=\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00345}00345             \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>error, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>name));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00347}00347         \mbox{\hyperlink{g__concat_8h_a7486607483121615e5f969d218abc15a}{G\_CONCAT\_LOGREQ}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Request received."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00348}00348         sx\_slock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00350}00350         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00351}00351         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00352}00352         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00353}00353         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00354}00354                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00355}00355         \textcolor{keywordflow}{case} BIO\_SPEEDUP:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00356}00356         \textcolor{keywordflow}{case} BIO\_FLUSH:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00357}00357                 \mbox{\hyperlink{g__concat_8c_aa68c9daade6dc5ca27bf398c3eb8816e}{g\_concat\_passdown}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00358}00358                 \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00359}00359         \textcolor{keywordflow}{case} BIO\_GETATTR:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00360}00360                 \textcolor{keywordflow}{if} (strcmp(\textcolor{stringliteral}{"{}GEOM::kerneldump"{}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00361}00361                         \mbox{\hyperlink{g__concat_8c_a4cd3a14c19a7bb3af14d0e5443525d15}{g\_concat\_kernel\_dump}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00362}00362                         \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00363}00363                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(\textcolor{stringliteral}{"{}GEOM::candelete"{}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00364}00364                         \mbox{\hyperlink{g__concat_8c_ad316a02db635e890d0f4d1ecff5fb1cb}{g\_concat\_candelete}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00365}00365                         \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00366}00366                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00367}00367                 \textcolor{comment}{/* To which provider it should be delivered? */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00368}00368                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00369}00369         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00370}00370                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00371}00371                 \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00372}00372         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00374}00374         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00375}00375         \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00376}00376         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00377}00377                 addr = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00378}00378         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00379}00379                 addr = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00380}00380         end = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00382}00382         bioq\_init(\&queue);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00383}00383         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00384}00384                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_end <= \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00385}00385                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00386}00386                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_start >= end)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00387}00387                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00389}00389                 off = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} -\/ \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00390}00390                 len = MIN(\mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end -\/ \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00391}00391                 \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} -\/= len;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00392}00392                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += len;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00394}00394                 cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00395}00395                 \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00396}00396                         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00397}00397                                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00398}00398                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00399}00399                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00400}00400                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00401}00401                         \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00402}00402                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00403}00403                 bioq\_insert\_tail(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00404}00404                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00405}00405 \textcolor{comment}{                 * Fill in the component buf structure.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00406}00406 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00407}00407                 \textcolor{keywordflow}{if} (len == \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00408}00408                         cbp-\/>bio\_done = \mbox{\hyperlink{geom_8h_a3b40808daecd7db79de16471ac14397a}{g\_std\_done}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00409}00409                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00410}00410                         cbp-\/>bio\_done = \mbox{\hyperlink{g__concat_8c_ae63cd4355be7a15d3d53cb16af46047b}{g\_concat\_done}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00411}00411                 cbp-\/>bio\_offset = off;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00412}00412                 cbp-\/>bio\_length = len;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00413}00413                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00414}00414                         cbp-\/>bio\_ma\_offset += (uintptr\_t)addr;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00415}00415                         cbp-\/>bio\_ma += cbp-\/>bio\_ma\_offset / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00416}00416                         cbp-\/>bio\_ma\_offset \%= PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00417}00417                         cbp-\/>bio\_ma\_n = round\_page(cbp-\/>bio\_ma\_offset +}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00418}00418                             cbp-\/>bio\_length) / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00419}00419                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00420}00420                         cbp-\/>bio\_data = addr;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00421}00421                 addr += len;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00422}00422                 cbp-\/>bio\_to = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00423}00423                 cbp-\/>bio\_caller1 = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00425}00425                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00426}00426                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00427}00427         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00428}00428         KASSERT(\mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} == 0,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00429}00429             (\textcolor{stringliteral}{"{}Length is still greater than 0 (class=\%s, name=\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00430}00430             \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>class-\/>name, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>name));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00431}00431         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00432}00432                 \mbox{\hyperlink{g__concat_8h_a7486607483121615e5f969d218abc15a}{G\_CONCAT\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Sending request."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00433}00433                 \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00434}00434                 cbp-\/>bio\_caller1 = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00435}00435                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00436}00436         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00437}00437 end:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00438}00438         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00439}00439 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00440}00440 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00441}00441 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00442}\mbox{\hyperlink{g__concat_8c_a3ee44933fe47aa9813434efd6ee4c0df}{00442}} \mbox{\hyperlink{g__concat_8c_a3ee44933fe47aa9813434efd6ee4c0df}{g\_concat\_check\_and\_run}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00443}00443 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00444}00444         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00445}00445         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *dp, *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00446}00446         u\_int \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00447}00447         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00448}00448         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00450}00450         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00451}00451         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__concat_8c_a7a0982d5746abe1cb97f57ff51e54235}{g\_concat\_nvalid}}(sc) != sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00452}00452                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00454}00454         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a79a5fe6e79cbc1a257454a3554fa11ef}{g\_new\_providerf}}(sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}}, \textcolor{stringliteral}{"{}concat/\%s"{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00455}00455         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= \mbox{\hyperlink{geom_8h_a486656f757680c7ff0c7ca06b643eb2d}{G\_PF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a36e660dabad70e0fd2439be3ddca8d47}{G\_PF\_DIRECT\_RECEIVE}} |}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00456}00456             \mbox{\hyperlink{geom_8h_a82547ff81813e6e37dd57c36e530c7e2}{G\_PF\_ACCEPT\_UNMAPPED}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00457}00457         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00458}00458         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00459}00459                 dp = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00460}00460                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00461}00461                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start + dp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00462}00462                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}} == \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00463}00463                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end -\/= dp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00464}00464                 \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00465}00465                 \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer, 1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00466}00466                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00467}00467                         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a5ae737a0eaaf6cb08f6f6efe52e90a49}{g\_getattr}}(\textcolor{stringliteral}{"{}GEOM::candelete"{}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00468}00468                             \&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_candelete);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00469}00469                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00470}00470                                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_candelete = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00471}00471                         (void)\mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00472}00472                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00473}00473                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Failed to access disk \%s, error \%d."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00474}00474                             dp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00475}00475                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == TAILQ\_FIRST(\&sc-\/>sc\_disks))}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00476}00476                         \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = dp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00477}00477                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00478}00478                         \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = \mbox{\hyperlink{g__concat_8c_a692b46e1f064015804ee07d568f88c0d}{lcm}}(\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, dp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00480}00480                 \textcolor{comment}{/* A provider underneath us doesn't support unmapped */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00481}00481                 \textcolor{keywordflow}{if} ((dp-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} \& \mbox{\hyperlink{geom_8h_a82547ff81813e6e37dd57c36e530c7e2}{G\_PF\_ACCEPT\_UNMAPPED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00482}00482                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cancelling unmapped "{}}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00483}00483                             \textcolor{stringliteral}{"{}because of \%s."{}}, dp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00484}00484                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} \&= \string~G\_PF\_ACCEPT\_UNMAPPED;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00485}00485                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00486}00486         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00487}00487         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00488}00488         \textcolor{comment}{/* We have sc-\/>sc\_disks[sc-\/>sc\_ndisks -\/ 1].d\_end in 'start'. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00489}00489         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00490}00490         dp = TAILQ\_FIRST(\&sc-\/>sc\_disks)-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00491}00491         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} = dp-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00492}00492         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} = dp-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00493}00493         sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00494}00494         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00495}00495 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00496}00496         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s activated."{}}, sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00497}00497 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00499}00499 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00500}\mbox{\hyperlink{g__concat_8c_a691c6cfc6e5dbdace9977d97adc4bbca}{00500}} \mbox{\hyperlink{g__concat_8c_a691c6cfc6e5dbdace9977d97adc4bbca}{g\_concat\_read\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00501}00501 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00502}00502         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00503}00503         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00504}00504         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00506}00506         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00508}00508         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00509}00509         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00510}00510                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00511}00511         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00512}00512         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00513}00513         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00514}00514             \&\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00515}00515         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00516}00516         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00517}00517         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00518}00518                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00519}00519 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00520}00520         \textcolor{comment}{/* Decode metadata. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00521}00521         \mbox{\hyperlink{g__concat_8h_a32c1a217c9f8dc70f4924cd4eea6b701}{concat\_metadata\_decode}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, md);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00522}00522         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00524}00524         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00525}00525 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00527}00527 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00528}00528 \textcolor{comment}{ * Add disk to given device.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00529}00529 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00530}00530 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00531}\mbox{\hyperlink{g__concat_8c_a8925d458efc34dd5874355a75ab4e3cc}{00531}} \mbox{\hyperlink{g__concat_8c_a8925d458efc34dd5874355a75ab4e3cc}{g\_concat\_add\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, u\_int no)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00532}00532 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00533}00533         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00534}00534         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, *fcp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00535}00535         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00536}00536         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00538}00538         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00540}00540         sx\_slock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00541}00541 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00542}00542         \textcolor{comment}{/* Metadata corrupted? */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00543}00543         \textcolor{keywordflow}{if} (no >= sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00544}00544                 sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00545}00545                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00546}00546         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00547}00547 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00548}00548         \textcolor{keywordflow}{for} (\mbox{\hyperlink{structdisk}{disk}} = TAILQ\_FIRST(\&sc-\/>sc\_disks); no > 0; no-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00549}00549                 \mbox{\hyperlink{structdisk}{disk}} = TAILQ\_NEXT(\mbox{\hyperlink{structdisk}{disk}}, d\_next);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00550}00550         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00552}00552         \textcolor{comment}{/* Check if disk is not already attached. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00553}00553         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00554}00554                 sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00555}00555                 \textcolor{keywordflow}{return} (EEXIST);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00556}00556         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00557}00557 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00558}00558         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00559}00559         fcp = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00561}00561         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00562}00562         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_acf792357913c0445233b71f8259764d9}{flags}} |= \mbox{\hyperlink{geom_8h_a712586d00e1fe2a8069adfc048fee210}{G\_CF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a2184f2512ddb7a67ddbb71409cdd953f}{G\_CF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00563}00563         error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00564}00564         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00565}00565                 sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00566}00566                 \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00567}00567                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00568}00568         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00569}00569 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00570}00570         \textcolor{keywordflow}{if} (fcp != NULL \&\& (fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} > 0)) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00571}00571                 error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00572}00572                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00573}00573                         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00574}00574                         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00575}00575                         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00576}00576                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00577}00577                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00578}00578         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00579}00579         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}} == \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00580}00580                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00582}00582                 \textcolor{comment}{// temporarily give up the lock to avoid lock order violation}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00583}00583                 \textcolor{comment}{// due to topology unlock in g\_concat\_read\_metadata}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00584}00584                 sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00585}00585                 \textcolor{comment}{/* Re-\/read metadata. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00586}00586                 error = \mbox{\hyperlink{g__concat_8c_a691c6cfc6e5dbdace9977d97adc4bbca}{g\_concat\_read\_metadata}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00587}00587                 sx\_slock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00589}00589                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00590}00590                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00591}00591 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00592}00592                 \textcolor{keywordflow}{if} (strcmp(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}, \mbox{\hyperlink{g__concat_8h_a7930f74af761db1df876b43ac3224d92}{G\_CONCAT\_MAGIC}}) != 0 ||}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00593}00593                     strcmp(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}, sc-\/>sc\_name) != 0 ||}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00594}00594                     md.\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}} != sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00595}00595                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Metadata on \%s changed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00596}00596                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00597}00597                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00599}00599                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_hardcoded = md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}[0] != \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00600}00600         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00601}00601                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_hardcoded = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00602}00602         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00604}00604         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00605}00605         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00606}00606         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc = sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00607}00607         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start = 0;  \textcolor{comment}{/* not yet */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00608}00608         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end = 0;    \textcolor{comment}{/* not yet */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00609}00609         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00610}00610 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00611}00611         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Disk \%s attached to \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00613}00613         \mbox{\hyperlink{g__concat_8c_a3ee44933fe47aa9813434efd6ee4c0df}{g\_concat\_check\_and\_run}}(sc);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00614}00614         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}); \textcolor{comment}{// need lock for check\_and\_run}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00616}00616         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00617}00617 fail:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00618}00618         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00619}00619         \textcolor{keywordflow}{if} (fcp != NULL \&\& (fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} > 0))}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00620}00620                 \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, -\/fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, -\/fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00621}00621         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00622}00622         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00623}00623         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00624}00624 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00625}00625 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00626}00626 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00627}\mbox{\hyperlink{g__concat_8c_a23dd4251bb2d9f59cf9a47cc891cdb07}{00627}} \mbox{\hyperlink{g__concat_8c_a23dd4251bb2d9f59cf9a47cc891cdb07}{g\_concat\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} *md,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00628}00628     u\_int \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00629}00629 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00630}00630         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00631}00631         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00632}00632         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00633}00633         u\_int no;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00634}00634 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00635}00635         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Creating device \%s (id=\%u)."{}}, md-\/>\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00636}00636             md-\/>\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00638}00638         \textcolor{comment}{/* One disks is minimum. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00639}00639         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__concat__metadata_a2f26971de337c1a65055f56144bac36c}{md\_all}} < 1)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00640}00640                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00641}00641 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00642}00642         \textcolor{comment}{/* Check for duplicate unit */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00643}00643         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00644}00644                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00645}00645                 \textcolor{keywordflow}{if} (sc != NULL \&\& strcmp(sc-\/>sc\_name, md-\/>\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00646}00646                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s already configured."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00647}00647                             \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00648}00648                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00649}00649                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00650}00650         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00651}00651         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom_8h_a4000befe2ff4b405b8333ccc5b0fdb41}{g\_new\_geomf}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{stringliteral}{"{}\%s"{}}, md-\/>\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00652}00652         sc = malloc(\textcolor{keyword}{sizeof}(*sc), M\_CONCAT, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00653}00653         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a160a0c74f128936d97064e56052dc2ef}{start}} = \mbox{\hyperlink{g__concat_8c_ac7c711fc66f713abae9ec27e9db36e1a}{g\_concat\_start}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00654}00654         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a0a74cfab0860e32fcfd20a3846b401a7}{spoiled}} = \mbox{\hyperlink{g__concat_8c_a58dfb64c0d3d654eea4cb5fd7e930aba}{g\_concat\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00655}00655         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__concat_8c_a58dfb64c0d3d654eea4cb5fd7e930aba}{g\_concat\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00656}00656         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{g__concat_8c_a07787fefe5c3d095cf25f0f066768e9b}{g\_concat\_access}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00657}00657         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a5944d44b6aba36f1a37c67f020b5588b}{dumpconf}} = \mbox{\hyperlink{g__concat_8c_acdf0631a886cc0428f60eb2f7f005c82}{g\_concat\_dumpconf}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00658}00658 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00659}00659         sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}} = md-\/>\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00660}00660         sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}} = md-\/>\mbox{\hyperlink{structg__concat__metadata_a2f26971de337c1a65055f56144bac36c}{md\_all}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00661}00661         TAILQ\_INIT(\&sc-\/>sc\_disks);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00662}00662         \textcolor{keywordflow}{for} (no = 0; no < sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}}; no++) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00663}00663                 \mbox{\hyperlink{structdisk}{disk}} = malloc(\textcolor{keyword}{sizeof}(*\mbox{\hyperlink{structdisk}{disk}}), M\_CONCAT, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00664}00664                 TAILQ\_INSERT\_TAIL(\&sc-\/>sc\_disks, \mbox{\hyperlink{structdisk}{disk}}, d\_next);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00665}00665         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00666}00666         sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}} = \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00667}00667         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a8538ff5f2236dc8a3b63ad57a0671498}{sc\_completion\_lock}}, \textcolor{stringliteral}{"{}gconcat lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00668}00668         sx\_init(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}, \textcolor{stringliteral}{"{}gconcat append lock"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00669}00669 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00670}00670         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00671}00671         sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}} = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00672}00672         sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00673}00673 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00674}00674         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s created (id=\%u)."{}}, sc-\/>sc\_name, sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00676}00676         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00677}00677 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00678}00678 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00679}00679 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00680}\mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{00680}} \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc, boolean\_t force)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00681}00681 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00682}00682         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00683}00683         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, *cp1;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00684}00684         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00685}00685         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00686}00686 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00687}00687         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00688}00688 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00689}00689         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00690}00690                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00692}00692         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00693}00693         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL \&\& (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} != 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} != 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00694}00694                 \textcolor{keywordflow}{if} (force) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00695}00695                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s is still open, so it "{}}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00696}00696                             \textcolor{stringliteral}{"{}can't be definitely removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00697}00697                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00698}00698                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00699}00699                             \textcolor{stringliteral}{"{}Device \%s is still open (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00700}00700                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00701}00701                         \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00702}00702                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00703}00703         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00704}00704 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00705}00705         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00706}00706         LIST\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer, consumer, cp1) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00707}00707                 \mbox{\hyperlink{g__concat_8c_ae6a927d62de8d79af351af88e9487570}{g\_concat\_remove\_disk}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00708}00708                 \textcolor{keywordflow}{if} (cp1 == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00709}00709                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* Recursion happened. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00710}00710         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00711}00711         \textcolor{keywordflow}{if} (!LIST\_EMPTY(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer))}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00712}00712                 \textcolor{keywordflow}{return} (EINPROGRESS);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00714}00714         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00715}00715         KASSERT(sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} == NULL, (\textcolor{stringliteral}{"{}Provider still exists? (device=\%s)"{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00716}00716             \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00717}00717         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{structdisk}{disk}} = TAILQ\_FIRST(\&sc-\/>sc\_disks)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00718}00718                 TAILQ\_REMOVE(\&sc-\/>sc\_disks, \mbox{\hyperlink{structdisk}{disk}}, d\_next);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00719}00719                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{structdisk}{disk}}, M\_CONCAT);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00720}00720         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00721}00721         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a8538ff5f2236dc8a3b63ad57a0671498}{sc\_completion\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00722}00722         sx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00723}00723         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc, M\_CONCAT);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00725}00725         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s destroyed."{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00726}00726         \mbox{\hyperlink{geom_8h_a87a0eb5de79ed5e49fcfec012f213c9b}{g\_wither\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00727}00727         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00728}00728 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00730}00730 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00731}\mbox{\hyperlink{g__concat_8c_a8bad6ad69d89ed78ea9e8e9a8efc7b74}{00731}} \mbox{\hyperlink{g__concat_8c_aa5489164e65635f727d944dde10a7293}{g\_concat\_destroy\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} \_\_unused,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00732}00732     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}} \_\_unused, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00733}00733 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00734}00734         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00735}00735 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00736}00736         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00737}00737         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(sc, 0));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00738}00738 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00740}00740 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00741}\mbox{\hyperlink{g__concat_8c_ac2ce406ac76020a1b2cc4327dbbd3553}{00741}} \mbox{\hyperlink{g__concat_8c_aae5a62de53ab107c8d00bd902c571562}{g\_concat\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__geom_afa218bd6b4ead71e6238ecd0577e1cc9}{flags}} \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00742}00742 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00743}00743         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00744}00744         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00745}00745         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00746}00746         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00747}00747         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00748}00748 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00749}00749         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a7f1804ff1a11f763a1ab5bdbd3e1287c}{G\_T\_TOPOLOGY}}, \textcolor{stringliteral}{"{}\%s(\%s, \%s)"{}}, \_\_func\_\_, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00750}00750         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00751}00751 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00752}00752         \textcolor{comment}{/* Skip providers that are already open for writing. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00753}00753         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} > 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00754}00754                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00756}00756         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(3, \textcolor{stringliteral}{"{}Tasting \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00758}00758         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom_8h_a4000befe2ff4b405b8333ccc5b0fdb41}{g\_new\_geomf}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{stringliteral}{"{}concat:taste"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00759}00759         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a160a0c74f128936d97064e56052dc2ef}{start}} = \mbox{\hyperlink{g__concat_8c_ac7c711fc66f713abae9ec27e9db36e1a}{g\_concat\_start}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00760}00760         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{g__concat_8c_a07787fefe5c3d095cf25f0f066768e9b}{g\_concat\_access}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00761}00761         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__concat_8c_a58dfb64c0d3d654eea4cb5fd7e930aba}{g\_concat\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00762}00762         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00763}00763         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_acf792357913c0445233b71f8259764d9}{flags}} |= \mbox{\hyperlink{geom_8h_a712586d00e1fe2a8069adfc048fee210}{G\_CF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a2184f2512ddb7a67ddbb71409cdd953f}{G\_CF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00764}00764         error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00765}00765         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00766}00766                 error = \mbox{\hyperlink{g__concat_8c_a691c6cfc6e5dbdace9977d97adc4bbca}{g\_concat\_read\_metadata}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00767}00767                 \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00768}00768         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00769}00769         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00770}00770         \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00771}00771         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00772}00772                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00773}00773         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00774}00774 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00775}00775         \textcolor{keywordflow}{if} (strcmp(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}, \mbox{\hyperlink{g__concat_8h_a7930f74af761db1df876b43ac3224d92}{G\_CONCAT\_MAGIC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00776}00776                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00777}00777         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_accf0c302a2caf1cb2771c16210fd9da7}{md\_version}} > \mbox{\hyperlink{g__concat_8h_a85d820a578771b8f83cc418b7025f132}{G\_CONCAT\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00778}00778                 printf(\textcolor{stringliteral}{"{}geom\_concat.ko module is too old to handle \%s.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00779}00779                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00780}00780                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00781}00781         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00782}00782         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00783}00783 \textcolor{comment}{         * Backward compatibility:}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00784}00784 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00785}00785         \textcolor{comment}{/* There was no md\_provider field in earlier versions of metadata. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00786}00786         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_accf0c302a2caf1cb2771c16210fd9da7}{md\_version}} < 3)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00787}00787                 bzero(md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00788}00788         \textcolor{comment}{/* There was no md\_provsize field in earlier versions of metadata. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00789}00789         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_accf0c302a2caf1cb2771c16210fd9da7}{md\_version}} < 4)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00790}00790                 md.\mbox{\hyperlink{structg__concat__metadata_ab7efbfcd831d80ef7d20176eaf3e22ff}{md\_provsize}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00791}00791 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00792}00792         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}[0] != \textcolor{charliteral}{'\(\backslash\)0'} \&\&}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00793}00793             !\mbox{\hyperlink{geom_8h_aa938569bc5b975d490103a88a5cfcb02}{g\_compare\_names}}(md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}))}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00794}00794                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00795}00795         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_ab7efbfcd831d80ef7d20176eaf3e22ff}{md\_provsize}} != \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00796}00796                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00797}00797 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00798}00798         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00799}00799 \textcolor{comment}{         * Let's check if device already exists.}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00800}00800 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00801}00801         sc = NULL;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00802}00802         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00803}00803                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00804}00804                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00805}00805                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00806}00806                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}} != \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00807}00807                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00808}00808                 \textcolor{keywordflow}{if} (strcmp(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}, sc-\/>sc\_name) != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00809}00809                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00810}00810                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}} != sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00811}00811                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00812}00812                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00813}00813         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00814}00814         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00815}00815                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Adding disk \%s to \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00816}00816                 error = \mbox{\hyperlink{g__concat_8c_a8925d458efc34dd5874355a75ab4e3cc}{g\_concat\_add\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, md.\mbox{\hyperlink{structg__concat__metadata_a245ad0f4379d57c1f1f2bf18db67164a}{md\_no}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00817}00817                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00818}00818                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00819}00819                             \textcolor{stringliteral}{"{}Cannot add disk \%s to \%s (error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00820}00820                             \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00821}00821                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00822}00822                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00823}00823         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00824}00824                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__concat_8c_a23dd4251bb2d9f59cf9a47cc891cdb07}{g\_concat\_create}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \&md, \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00825}00825                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00826}00826                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot create device \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00827}00827                             md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00828}00828                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00829}00829                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00830}00830                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00831}00831                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Adding disk \%s to \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00832}00832                 error = \mbox{\hyperlink{g__concat_8c_a8925d458efc34dd5874355a75ab4e3cc}{g\_concat\_add\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, md.\mbox{\hyperlink{structg__concat__metadata_a245ad0f4379d57c1f1f2bf18db67164a}{md\_no}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00833}00833                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00834}00834                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00835}00835                             \textcolor{stringliteral}{"{}Cannot add disk \%s to \%s (error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00836}00836                             \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00837}00837                         \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00838}00838                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00839}00839                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00840}00840         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00841}00841 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00842}00842         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00843}00843 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00844}00844 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00845}00845 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00846}\mbox{\hyperlink{g__concat_8c_a0f2ca4ed102b05c76bf971ccaf0d2bca}{00846}} \mbox{\hyperlink{g__concat_8c_a0f2ca4ed102b05c76bf971ccaf0d2bca}{g\_concat\_ctl\_create}}(\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__concat_8c_source_l00847}00847 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00848}00848         u\_int attached, no;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00849}00849         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00850}00850         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00851}00851         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00852}00852         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00853}00853         \textcolor{keyword}{struct }sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00854}00854         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00855}00855         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00856}00856         \textcolor{keywordtype}{int} *nargs;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00857}00857 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00858}00858         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00859}00859         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__concat_8c_source_l00860}00860         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00861}00861                 \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__concat_8c_source_l00862}00862                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00863}00863         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00864}00864         \textcolor{keywordflow}{if} (*nargs < 2) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00865}00865                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Too few arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00866}00866                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00867}00867         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00868}00868 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00869}00869         bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00870}00870         strlcpy(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}, \mbox{\hyperlink{g__concat_8h_a7930f74af761db1df876b43ac3224d92}{G\_CONCAT\_MAGIC}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00871}00871         md.\mbox{\hyperlink{structg__concat__metadata_accf0c302a2caf1cb2771c16210fd9da7}{md\_version}} = \mbox{\hyperlink{g__concat_8h_a85d820a578771b8f83cc418b7025f132}{G\_CONCAT\_VERSION}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00872}00872         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00873}00873         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00874}00874                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00875}00875                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00876}00876         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00877}00877         strlcpy(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00878}00878         md.\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}} = arc4random();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00879}00879         md.\mbox{\hyperlink{structg__concat__metadata_a245ad0f4379d57c1f1f2bf18db67164a}{md\_no}} = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00880}00880         md.\mbox{\hyperlink{structg__concat__metadata_a2f26971de337c1a65055f56144bac36c}{md\_all}} = *nargs -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00881}00881         \textcolor{comment}{/* This field is not important here. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00882}00882         md.\mbox{\hyperlink{structg__concat__metadata_ab7efbfcd831d80ef7d20176eaf3e22ff}{md\_provsize}} = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00884}00884         \textcolor{comment}{/* Check all providers are valid */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00885}00885         \textcolor{keywordflow}{for} (no = 1; no < *nargs; no++) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00886}00886                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%u"{}}, no);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00887}00887                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00888}00888                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00889}00889                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00890}00890         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00892}00892         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__concat_8c_a23dd4251bb2d9f59cf9a47cc891cdb07}{g\_concat\_create}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \&md, \mbox{\hyperlink{g__concat_8h_aa66f86084504cbe29346bda6a16b2d91}{G\_CONCAT\_TYPE\_MANUAL}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00893}00893         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00894}00894                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Can't configure \%s."{}}, md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00895}00895                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00896}00896         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00898}00898         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00899}00899         \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}} = sbuf\_new\_auto();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00900}00900         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}Can't attach disk(s) to \%s:"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00901}00901         \textcolor{keywordflow}{for} (attached = 0, no = 1; no < *nargs; no++) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00902}00902                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%u"{}}, no);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00903}00903                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00904}00904                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00905}00905                         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00906}00906                         MPASS(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} != NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00907}00907                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} \%s"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00908}00908                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00909}00909                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00910}00910                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__concat_8c_a8925d458efc34dd5874355a75ab4e3cc}{g\_concat\_add\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, no -\/ 1) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00911}00911                         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%u (\%s) not attached to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00912}00912                             no, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00913}00913                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00914}00914                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00915}00915                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00916}00916                 attached++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00917}00917         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00918}00918         sbuf\_finish(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00919}00919         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__concat__metadata_a2f26971de337c1a65055f56144bac36c}{md\_all}} != attached) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00920}00920                 \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}}, 1);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00921}00921                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}\%s"{}}, sbuf\_data(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00922}00922         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00923}00923         sbuf\_delete(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00924}00924 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00926}00926 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00927}\mbox{\hyperlink{g__concat_8c_a114d1e10b6c4f1ba88fa0ded422eaa40}{00927}} \mbox{\hyperlink{g__concat_8c_a114d1e10b6c4f1ba88fa0ded422eaa40}{g\_concat\_find\_device}}(\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__concat_8c_source_l00928}00928 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00929}00929         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00930}00930         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00932}00932         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}})) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00933}00933                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00934}00934 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00935}00935         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00936}00936                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00937}00937                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00938}00938                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00939}00939                 \textcolor{keywordflow}{if} (strcmp(sc-\/>sc\_name, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00940}00940                         \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00941}00941         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00942}00942         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00943}00943 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00944}00944 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00945}00945 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00946}\mbox{\hyperlink{g__concat_8c_a9865c7ac48d5c2dedc40216a2607b2ac}{00946}} \mbox{\hyperlink{g__concat_8c_a9865c7ac48d5c2dedc40216a2607b2ac}{g\_concat\_ctl\_destroy}}(\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__concat_8c_source_l00947}00947 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00948}00948         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00949}00949         \textcolor{keywordtype}{int} *force, *nargs, error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00950}00950         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00951}00951         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00952}00952         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00953}00953 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00954}00954         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00956}00956         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__concat_8c_source_l00957}00957         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00958}00958                 \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__concat_8c_source_l00959}00959                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00960}00960         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00961}00961         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00962}00962                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00963}00963                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00964}00964         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00965}00965         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__concat_8c_source_l00966}00966         \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00967}00967                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}force"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00968}00968                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00969}00969         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00971}00971         \textcolor{keywordflow}{for} (i = 0; i < (u\_int)*nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00972}00972                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%u"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00973}00973                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00974}00974                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00975}00975                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, i);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00976}00976                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00977}00977                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00978}00978                 sc = \mbox{\hyperlink{g__concat_8c_a114d1e10b6c4f1ba88fa0ded422eaa40}{g\_concat\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00979}00979                 \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00980}00980                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No such device: \%s."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00981}00981                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00982}00982                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00983}00983                 error = \mbox{\hyperlink{g__concat_8c_a0ea0d619c7434d0abb3e6ad33bd3e653}{g\_concat\_destroy}}(sc, *force);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00984}00984                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00985}00985                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot destroy device \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00986}00986                             sc-\/>sc\_name, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00987}00987                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00988}00988                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00989}00989         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00990}00990 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00992}00992 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00993}\mbox{\hyperlink{g__concat_8c_acf416685291fdb249f2c73fd0cd2374f}{00993}} \mbox{\hyperlink{g__concat_8c_acf416685291fdb249f2c73fd0cd2374f}{g\_concat\_find\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00994}00994 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00995}00995         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00996}00996 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00997}00997         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00998}00998         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{stringliteral}{"{}/dev/"{}}, 5) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l00999}00999                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += 5;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01000}01000         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01001}01001                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01002}01002                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01003}01003                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01004}01004                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01005}01005                 \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>name, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01006}01006                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01007}01007         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01008}01008         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01009}01009 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01010}01010 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01011}01011 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01012}\mbox{\hyperlink{g__concat_8c_ac4d01d9eba084187a6373433e325ee3b}{01012}} \mbox{\hyperlink{g__concat_8c_ac4d01d9eba084187a6373433e325ee3b}{g\_concat\_write\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01013}01013 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01014}01014         u\_int no = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01015}01015         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01016}01016         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__metadata}{g\_concat\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01017}01017         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01018}01018         u\_char *sector;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01019}01019         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01020}01020 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01021}01021         bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01022}01022         strlcpy(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}, \mbox{\hyperlink{g__concat_8h_a7930f74af761db1df876b43ac3224d92}{G\_CONCAT\_MAGIC}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_ab22b5253951dc72c47286836a8e7b633}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01023}01023         md.\mbox{\hyperlink{structg__concat__metadata_accf0c302a2caf1cb2771c16210fd9da7}{md\_version}} = \mbox{\hyperlink{g__concat_8h_a85d820a578771b8f83cc418b7025f132}{G\_CONCAT\_VERSION}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01024}01024         strlcpy(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}, sc-\/>sc\_name, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_a66193f9d99d3a36499baae3ad9dcaaf4}{md\_name}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01025}01025         md.\mbox{\hyperlink{structg__concat__metadata_a5585d34f8c97d2a1eff22ad994351700}{md\_id}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01026}01026         md.\mbox{\hyperlink{structg__concat__metadata_a2f26971de337c1a65055f56144bac36c}{md\_all}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01027}01027         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01028}01028                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01029}01029 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01030}01030                 md.\mbox{\hyperlink{structg__concat__metadata_a245ad0f4379d57c1f1f2bf18db67164a}{md\_no}} = no;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01031}01031                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_hardcoded)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01032}01032                         strlcpy(md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01033}01033                             \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__concat__metadata_a00dc147e186efdb772297059ff07774c}{md\_provider}}));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01034}01034                 md.\mbox{\hyperlink{structg__concat__metadata_ab7efbfcd831d80ef7d20176eaf3e22ff}{md\_provsize}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>mediasize;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01036}01036                 sector = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01037}01037                 \mbox{\hyperlink{g__concat_8h_a2345056307900a36c2af19ef579a86a6}{concat\_metadata\_encode}}(\&md, sector);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01038}01038                 \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer, 0, 1, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01039}01039                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01040}01040                         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01041}01041                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, sector,}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01042}01042                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01043}01043                         (void)\mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer, 0, -\/1, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01044}01044                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01045}01045                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sector);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01046}01046                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01047}01047                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot store metadata on \%s: \%d"{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01048}01048                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01049}01049 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01050}01050                 no++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01051}01051         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01052}01052 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01054}01054 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01055}\mbox{\hyperlink{g__concat_8c_a959e639d68c54e092fe3fd468f198816}{01055}} \mbox{\hyperlink{g__concat_8c_a959e639d68c54e092fe3fd468f198816}{g\_concat\_ctl\_append}}(\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__concat_8c_source_l01056}01056 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01057}01057         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01058}01058         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, *fcp;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01059}01059         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01060}01060         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01061}01061         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, *cname;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01062}01062         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01063}01063         \textcolor{keywordtype}{int} *nargs, *hardcode;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01064}01064         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01065}01065         \textcolor{keywordtype}{int} disk\_candelete;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01066}01066 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01067}01067         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01068}01068 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01069}01069         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__concat_8c_source_l01070}01070         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01071}01071                 \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__concat_8c_source_l01072}01072                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01073}01073         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01074}01074         \textcolor{keywordflow}{if} (*nargs != 2) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01075}01075                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01076}01076                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01077}01077         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01078}01078         hardcode = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}hardcode"{}}, \textcolor{keyword}{sizeof}(*hardcode));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01079}01079         \textcolor{keywordflow}{if} (hardcode == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01080}01080                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}hardcode"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01081}01081                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01082}01082         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01083}01083 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01084}01084         cname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01085}01085         \textcolor{keywordflow}{if} (cname == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01086}01086                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01087}01087                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01088}01088         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01089}01089         sc = \mbox{\hyperlink{g__concat_8c_a114d1e10b6c4f1ba88fa0ded422eaa40}{g\_concat\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, cname);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01090}01090         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01091}01091                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No such device: \%s."{}}, cname);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01092}01092                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01093}01093         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01094}01094         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01095}01095                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01096}01096 \textcolor{comment}{                 * this won't race with g\_concat\_remove\_disk as both}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01097}01097 \textcolor{comment}{                 * are holding the topology lock}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01098}01098 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01099}01099                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device not active, can't append: \%s."{}}, cname);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01100}01100                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01101}01101         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01102}01102         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Appending to \%s:"{}}, cname);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01103}01103         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01104}01104         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__concat__softc_aab1e9beae63d526b8c9173482ef54470}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01105}01105         fcp = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01106}01106 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01107}01107         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg1"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01108}01108         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01109}01109                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 1);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01110}01110                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01111}01111         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01112}01112         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{stringliteral}{"{}/dev/"{}}, strlen(\textcolor{stringliteral}{"{}/dev/"{}})) == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01113}01113                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += strlen(\textcolor{stringliteral}{"{}/dev/"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01114}01114         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_ad022ef529cc86a6c4ea72564de2e9ca2}{g\_provider\_by\_name}}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01115}01115         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01116}01116                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01117}01117                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Disk \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01118}01118                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01119}01119         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01120}01120         \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Appending \%s to this"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01122}01122         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__concat_8c_acf416685291fdb249f2c73fd0cd2374f}{g\_concat\_find\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01123}01123                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Disk \%s already appended."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01124}01124                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01125}01125         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01126}01126 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01127}01127         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01128}01128                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Providers sectorsize mismatch: \%u vs \%u"{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01129}01129                            sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01130}01130                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01131}01131         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01132}01132 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01133}01133         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01134}01134         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_acf792357913c0445233b71f8259764d9}{flags}} |= \mbox{\hyperlink{geom_8h_a712586d00e1fe2a8069adfc048fee210}{G\_CF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a2184f2512ddb7a67ddbb71409cdd953f}{G\_CF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01135}01135         error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01136}01136         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01137}01137                 \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01138}01138                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot open device \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01139}01139                     \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01140}01140                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01141}01141         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01143}01143         error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01144}01144         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01145}01145                 error = \mbox{\hyperlink{geom_8h_a5ae737a0eaaf6cb08f6f6efe52e90a49}{g\_getattr}}(\textcolor{stringliteral}{"{}GEOM::candelete"{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&disk\_candelete);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01146}01146                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01147}01147                         disk\_candelete = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01148}01148                 (void)\mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01149}01149         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01150}01150                 \mbox{\hyperlink{g__concat_8h_a7c8324577f7c152b6fad365254db6fe7}{G\_CONCAT\_DEBUG}}(1, \textcolor{stringliteral}{"{}Failed to access disk \%s, error \%d."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01151}01151 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01152}01152         \textcolor{comment}{/* invoke g\_access exactly as deep as all the other members currently are */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01153}01153         \textcolor{keywordflow}{if} (fcp != NULL \&\& (fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} > 0 || fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} > 0)) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01154}01154                 error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, fcp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, fcp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, fcp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01155}01155                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01156}01156                         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01157}01157                         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01158}01158                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Failed to access disk \%s (error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01159}01159                         \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01160}01160                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01161}01161         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01163}01163         \mbox{\hyperlink{structdisk}{disk}} = malloc(\textcolor{keyword}{sizeof}(*\mbox{\hyperlink{structdisk}{disk}}), M\_CONCAT, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01164}01164         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01165}01165         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc = sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01166}01166         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start = TAILQ\_LAST(\&sc-\/>sc\_disks, g\_concat\_disks)-\/>d\_end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01167}01167         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_start + \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01168}01168         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_candelete = disk\_candelete;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01169}01169         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_removed = 0;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01170}01170         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_hardcoded = *hardcode;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01171}01171         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01172}01172         TAILQ\_INSERT\_TAIL(\&sc-\/>sc\_disks, \mbox{\hyperlink{structdisk}{disk}}, d\_next);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01173}01173         sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}}++;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01174}01174 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01175}01175         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}} == \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01176}01176                 \textcolor{comment}{/* last sector is for metadata */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01177}01177                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end -\/= \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01178}01178 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01179}01179                 \textcolor{comment}{/* update metadata on all parts */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01180}01180                 \mbox{\hyperlink{g__concat_8c_ac4d01d9eba084187a6373433e325ee3b}{g\_concat\_write\_metadata}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, sc);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01181}01181         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01182}01182 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01183}01183         \mbox{\hyperlink{geom_8h_a72d479d3ccd8dec427b97c90557f3a4f}{g\_resize\_provider}}(sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_end);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01184}01184 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01185}01185 fail:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01186}01186         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01187}01187 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01188}01188 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01189}01189 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01190}\mbox{\hyperlink{g__concat_8c_a83228d2e9c26b989e0dc367a03b62dfc}{01190}} \mbox{\hyperlink{g__concat_8c_a1f66dbd3bc05740560f22d142a84d647}{g\_concat\_config}}(\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__concat_8c_source_l01191}01191 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01192}01192         uint32\_t *version;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01193}01193 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01194}01194         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01196}01196         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__concat_8c_source_l01197}01197         \textcolor{keywordflow}{if} (version == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01198}01198                 \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__concat_8c_source_l01199}01199                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01200}01200         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01201}01201         \textcolor{keywordflow}{if} (*version != \mbox{\hyperlink{g__concat_8h_a85d820a578771b8f83cc418b7025f132}{G\_CONCAT\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01202}01202                 \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__concat_8c_source_l01203}01203                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01204}01204         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01206}01206         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}create"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01207}01207                 \mbox{\hyperlink{g__concat_8c_a0f2ca4ed102b05c76bf971ccaf0d2bca}{g\_concat\_ctl\_create}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01208}01208                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01209}01209         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}destroy"{}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01210}01210             strcmp(verb, \textcolor{stringliteral}{"{}stop"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01211}01211                 \mbox{\hyperlink{g__concat_8c_a9865c7ac48d5c2dedc40216a2607b2ac}{g\_concat\_ctl\_destroy}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01212}01212                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01213}01213         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}append"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01214}01214                 \mbox{\hyperlink{g__concat_8c_a959e639d68c54e092fe3fd468f198816}{g\_concat\_ctl\_append}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01215}01215                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01216}01216         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01217}01217         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown verb."{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01218}01218 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01219}01219 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01220}01220 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01221}\mbox{\hyperlink{g__concat_8c_ab2bff8c21bc9550f4eddba8b037479cd}{01221}} \mbox{\hyperlink{g__concat_8c_acdf0631a886cc0428f60eb2f7f005c82}{g\_concat\_dumpconf}}(\textcolor{keyword}{struct} sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01222}01222     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01223}01223 \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01224}01224         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__softc}{g\_concat\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01225}01225 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01226}01226         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01227}01227         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01228}01228         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01229}01229                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01231}01231         sx\_slock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01232}01232         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01233}01233                 \textcolor{comment}{/* Nothing here. */}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01234}01234         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01235}01235                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__concat__disk}{g\_concat\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01236}01236 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01237}01237                 \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01238}01238                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01239}01239                         \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01240}01240                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<End>\%jd</End>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01241}01241                     (intmax\_t)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_end);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01242}01242                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Start>\%jd</Start>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01243}01243                     (intmax\_t)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_start);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01244}01244         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01245}01245                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ID>\%u</ID>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, (u\_int)sc-\/>\mbox{\hyperlink{structg__concat__softc_aabf9c0261119bcd2e55baf309e214fce}{sc\_id}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01246}01246                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Type>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01247}01247                 \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a6d04f19d26f671c30aaf9ae0034b8ab2}{sc\_type}}) \{}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01248}01248                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__concat_8h_afd2547e4e79f539b484d3cdf0783e28a}{G\_CONCAT\_TYPE\_AUTOMATIC}}:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01249}01249                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}AUTOMATIC"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01250}01250                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01251}01251                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__concat_8h_aa66f86084504cbe29346bda6a16b2d91}{G\_CONCAT\_TYPE\_MANUAL}}:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01252}01252                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}MANUAL"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01253}01253                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01254}01254                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01255}01255                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01256}01256                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01257}01257                 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01258}01258                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</Type>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01259}01259                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Status>Total=\%u, Online=\%u</Status>\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01260}01260                     \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, sc-\/>\mbox{\hyperlink{structg__concat__softc_aa192b79a8cb5c29602248f577c2f577a}{sc\_ndisks}}, \mbox{\hyperlink{g__concat_8c_a7a0982d5746abe1cb97f57ff51e54235}{g\_concat\_nvalid}}(sc));}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01261}01261                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<State>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01262}01262                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}} != NULL \&\& sc-\/>\mbox{\hyperlink{structg__concat__softc_a292ecd6fd28b7608d891274393d4e57e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01263}01263                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}UP"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01264}01264                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01265}01265                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}DOWN"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01266}01266                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</State>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01267}01267         \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01268}01268 end:}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01269}01269         sx\_sunlock(\&sc-\/>\mbox{\hyperlink{structg__concat__softc_a069575e0ea0c19d13d83285112d841df}{sc\_disks\_lock}});}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01270}01270 \}}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01272}\mbox{\hyperlink{g__concat_8c_a29d35211a0d5fc5fe267c82ee14bcc22}{01272}} \mbox{\hyperlink{g__concat_8c_a29d35211a0d5fc5fe267c82ee14bcc22}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{g__concat_8c_a0c6f3f5208a430303eca088c2c4cac11}{g\_concat\_class}}, g\_concat);}
\DoxyCodeLine{\Hypertarget{g__concat_8c_source_l01273}\mbox{\hyperlink{g__concat_8c_a393022df486cac0d204d4920aa8aaa03}{01273}} \mbox{\hyperlink{g__concat_8c_a393022df486cac0d204d4920aa8aaa03}{MODULE\_VERSION}}(geom\_concat, 0);}

\end{DoxyCode}
