\hypertarget{tr__raid0_8c_source}{}\doxysection{tr\+\_\+raid0.\+c}
\label{tr__raid0_8c_source}\index{geom/raid/tr\_raid0.c@{geom/raid/tr\_raid0.c}}
\mbox{\hyperlink{tr__raid0_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00030}\mbox{\hyperlink{tr__raid0_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{tr__raid0_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/kobj.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00043}00043 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{g__raid_8h}{geom/raid/g\_raid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00044}00044 \textcolor{preprocessor}{\#include "{}g\_raid\_tr\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00046}\mbox{\hyperlink{tr__raid0_8c_ac0a18808dfe195476253e40c450a3d30}{00046}} \textcolor{keyword}{static} \mbox{\hyperlink{tr__raid0_8c_ac0a18808dfe195476253e40c450a3d30}{MALLOC\_DEFINE}}(M\_TR\_RAID0, \textcolor{stringliteral}{"{}tr\_raid0\_data"{}}, \textcolor{stringliteral}{"{}GEOM\_RAID RAID0 data"{}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00048}\mbox{\hyperlink{structg__raid__tr__raid0__object}{00048}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00049}\mbox{\hyperlink{structg__raid__tr__raid0__object_aae8e971a70c8579e992b74111d7c01f5}{00049}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}}  \mbox{\hyperlink{structg__raid__tr__raid0__object_aae8e971a70c8579e992b74111d7c01f5}{trso\_base}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00050}\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{00050}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00051}\mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{00051}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{trso\_stopped}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00052}00052 \};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00054}\mbox{\hyperlink{tr__raid0_8c_a3ad92084b80cae1b67ff7154e6d0043b}{00054}} \textcolor{keyword}{static} g\_raid\_tr\_taste\_t \mbox{\hyperlink{tr__raid0_8c_a3ad92084b80cae1b67ff7154e6d0043b}{g\_raid\_tr\_taste\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00055}\mbox{\hyperlink{tr__raid0_8c_a06092a1b2a46a0f44324bb306c71f768}{00055}} \textcolor{keyword}{static} g\_raid\_tr\_event\_t \mbox{\hyperlink{tr__raid0_8c_a06092a1b2a46a0f44324bb306c71f768}{g\_raid\_tr\_event\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00056}\mbox{\hyperlink{tr__raid0_8c_ae01391227f54304dfb086aef4faa54f7}{00056}} \textcolor{keyword}{static} g\_raid\_tr\_start\_t \mbox{\hyperlink{tr__raid0_8c_ae01391227f54304dfb086aef4faa54f7}{g\_raid\_tr\_start\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00057}\mbox{\hyperlink{tr__raid0_8c_a379e0210bcf84f13b3d26e8663e3c927}{00057}} \textcolor{keyword}{static} g\_raid\_tr\_stop\_t \mbox{\hyperlink{tr__raid0_8c_a379e0210bcf84f13b3d26e8663e3c927}{g\_raid\_tr\_stop\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00058}\mbox{\hyperlink{tr__raid0_8c_aa28d324a28bfde9503da952e41ec9932}{00058}} \textcolor{keyword}{static} g\_raid\_tr\_iostart\_t \mbox{\hyperlink{tr__raid0_8c_aa28d324a28bfde9503da952e41ec9932}{g\_raid\_tr\_iostart\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00059}\mbox{\hyperlink{tr__raid0_8c_a369847e26c1ba763616aaf3cc7d23fdd}{00059}} \textcolor{keyword}{static} g\_raid\_tr\_iodone\_t \mbox{\hyperlink{tr__raid0_8c_a369847e26c1ba763616aaf3cc7d23fdd}{g\_raid\_tr\_iodone\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00060}\mbox{\hyperlink{tr__raid0_8c_ac2954f4bea5e67291f482b0274117973}{00060}} \textcolor{keyword}{static} g\_raid\_tr\_kerneldump\_t \mbox{\hyperlink{tr__raid0_8c_ac2954f4bea5e67291f482b0274117973}{g\_raid\_tr\_kerneldump\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00061}\mbox{\hyperlink{tr__raid0_8c_a162fbb0ba534da4206f55b79d25e19ea}{00061}} \textcolor{keyword}{static} g\_raid\_tr\_free\_t \mbox{\hyperlink{tr__raid0_8c_a162fbb0ba534da4206f55b79d25e19ea}{g\_raid\_tr\_free\_raid0}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00063}\mbox{\hyperlink{tr__raid0_8c_a3b8d223ffe6e9b33cdb3dbce66e65769}{00063}} \textcolor{keyword}{static} kobj\_method\_t \mbox{\hyperlink{tr__raid0_8c_a3b8d223ffe6e9b33cdb3dbce66e65769}{g\_raid\_tr\_raid0\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00064}00064         KOBJMETHOD(g\_raid\_tr\_taste,     \mbox{\hyperlink{tr__raid0_8c_a3ad92084b80cae1b67ff7154e6d0043b}{g\_raid\_tr\_taste\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00065}00065         KOBJMETHOD(g\_raid\_tr\_event,     \mbox{\hyperlink{tr__raid0_8c_a06092a1b2a46a0f44324bb306c71f768}{g\_raid\_tr\_event\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00066}00066         KOBJMETHOD(g\_raid\_tr\_start,     \mbox{\hyperlink{tr__raid0_8c_ae01391227f54304dfb086aef4faa54f7}{g\_raid\_tr\_start\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00067}00067         KOBJMETHOD(g\_raid\_tr\_stop,      \mbox{\hyperlink{tr__raid0_8c_a379e0210bcf84f13b3d26e8663e3c927}{g\_raid\_tr\_stop\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00068}00068         KOBJMETHOD(g\_raid\_tr\_iostart,   \mbox{\hyperlink{tr__raid0_8c_aa28d324a28bfde9503da952e41ec9932}{g\_raid\_tr\_iostart\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00069}00069         KOBJMETHOD(g\_raid\_tr\_iodone,    \mbox{\hyperlink{tr__raid0_8c_a369847e26c1ba763616aaf3cc7d23fdd}{g\_raid\_tr\_iodone\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00070}00070         KOBJMETHOD(g\_raid\_tr\_kerneldump,        \mbox{\hyperlink{tr__raid0_8c_ac2954f4bea5e67291f482b0274117973}{g\_raid\_tr\_kerneldump\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00071}00071         KOBJMETHOD(g\_raid\_tr\_free,      \mbox{\hyperlink{tr__raid0_8c_a162fbb0ba534da4206f55b79d25e19ea}{g\_raid\_tr\_free\_raid0}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00072}00072         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00073}00073 \};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00075}\mbox{\hyperlink{tr__raid0_8c_a12586b2d462aca2da60071839afd91a7}{00075}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__class}{g\_raid\_tr\_class}} \mbox{\hyperlink{tr__raid0_8c_a12586b2d462aca2da60071839afd91a7}{g\_raid\_tr\_raid0\_class}} = \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00076}00076         \textcolor{stringliteral}{"{}RAID0"{}},}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00077}00077         \mbox{\hyperlink{tr__raid0_8c_a3b8d223ffe6e9b33cdb3dbce66e65769}{g\_raid\_tr\_raid0\_methods}},}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00078}00078         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}}),}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00079}00079         .trc\_enable = 1,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00080}00080         .trc\_priority = 100,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00081}00081         .trc\_accept\_unmapped = 1}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00082}00082 \};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00084}00084 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00085}\mbox{\hyperlink{tr__raid0_8c_a9ceb7eb6d11ed0ac63b6572c92fe1c44}{00085}} \mbox{\hyperlink{tr__raid0_8c_a3ad92084b80cae1b67ff7154e6d0043b}{g\_raid\_tr\_taste\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__tr__if_8m_a1b9eb8854031ced0905afde9f72c9ea8}{volume}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00086}00086 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00087}00087         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *trs;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00089}00089         trs = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *)tr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00090}00090         \textcolor{keywordflow}{if} (tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} != \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}} ||}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00091}00091             tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}}-\/>\mbox{\hyperlink{structg__raid__volume_ad17bb2da7eadd462f1f27551cb1da76f}{v\_raid\_level\_qualifier}} != \mbox{\hyperlink{g__raid_8h_a9c036957b2fb94761b5fd084e8f991c9}{G\_RAID\_VOLUME\_RLQ\_NONE}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00092}00092                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__tr__if_8m_a6d6fd1743789570a3aab513506428e85}{G\_RAID\_TR\_TASTE\_FAIL}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00093}00093         trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}} = 1;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00094}00094         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__tr__if_8m_a39400a4126bc301e1c305060bfb7c250}{G\_RAID\_TR\_TASTE\_SUCCEED}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00095}00095 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00097}00097 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00098}\mbox{\hyperlink{tr__raid0_8c_afff5c3937ffa43ac693e2af3e967bd1a}{00098}} \mbox{\hyperlink{tr__raid0_8c_afff5c3937ffa43ac693e2af3e967bd1a}{g\_raid\_tr\_update\_state\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00099}00099 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00100}00100         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *trs;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00101}00101         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00102}00102         u\_int s;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00103}00103         \textcolor{keywordtype}{int} n, f;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00105}00105         sc = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5ddf3eff3aa40bdcbbfedb4d0458b332}{v\_softc}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00106}00106         trs = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *)\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a03bf7d238e7b0f9bf3fddadd21624039}{v\_tr}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00107}00107         if (trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{trso\_stopped}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00108}00108                 s = \mbox{\hyperlink{g__raid_8h_af54d408d323606c1f4fc52c10c6d89e1}{G\_RAID\_VOLUME\_S\_STOPPED}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00109}00109         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00110}00110                 s = \mbox{\hyperlink{g__raid_8h_a0b0174c2570883e792d691bc22f9b8d4}{G\_RAID\_VOLUME\_S\_STARTING}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00111}00111         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00112}00112                 n = \mbox{\hyperlink{g__raid_8c_ab8f738fdad1ea577cf8da5e1537f342c}{g\_raid\_nsubdisks}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00113}00113                 f = \mbox{\hyperlink{g__raid_8c_ab8f738fdad1ea577cf8da5e1537f342c}{g\_raid\_nsubdisks}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_a2e56fb1cd5fdab097052e38c28a8c92f}{G\_RAID\_SUBDISK\_S\_FAILED}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00114}00114                 \textcolor{keywordflow}{if} (n + f == \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00115}00115                         \textcolor{keywordflow}{if} (f == 0)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00116}00116                                 s = \mbox{\hyperlink{g__raid_8h_a20afd300edb0e3cdbfb0386d2fbb36c3}{G\_RAID\_VOLUME\_S\_OPTIMAL}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00117}00117                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00118}00118                                 s = \mbox{\hyperlink{g__raid_8h_a48e4e755439965447a7116e19309dd16}{G\_RAID\_VOLUME\_S\_SUBOPTIMAL}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00119}00119                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00120}00120                         s = \mbox{\hyperlink{g__raid_8h_a271c4821091e2a44a8a3412dde015fea}{G\_RAID\_VOLUME\_S\_BROKEN}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00121}00121         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00122}00122         \textcolor{keywordflow}{if} (s != \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00123}00123                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_ac01262dc2989e4e4e0a5a1521809f5b3}{G\_RAID\_VOLUME\_S\_ALIVE}}(s) ?}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00124}00124                     \mbox{\hyperlink{g__raid_8h_ac4efcccfb7b2b1505ea4a458213ca844}{G\_RAID\_VOLUME\_E\_UP}} : \mbox{\hyperlink{g__raid_8h_a6d2e441dd210a0f2e4f9714400f2bab8}{G\_RAID\_VOLUME\_E\_DOWN}},}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00125}00125                     \mbox{\hyperlink{g__raid_8h_aa6f84af705b9b366dcb0e4aabd807667}{G\_RAID\_EVENT\_VOLUME}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00126}00126                 \mbox{\hyperlink{g__raid_8c_aefc2d93d4b02523eea4c62e99988ee67}{g\_raid\_change\_volume\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, s);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00127}00127                 \textcolor{keywordflow}{if} (!trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}} \&\& !trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{trso\_stopped}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00128}00128                         \mbox{\hyperlink{g__raid_8c_a9cf6273a366922dadcce1047df240cb5}{g\_raid\_write\_metadata}}(sc, \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00129}00129         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00130}00130         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00131}00131 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00133}00133 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00134}\mbox{\hyperlink{tr__raid0_8c_a22e10d08f90acd5680659a2603333ed6}{00134}} \mbox{\hyperlink{tr__raid0_8c_a06092a1b2a46a0f44324bb306c71f768}{g\_raid\_tr\_event\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00135}00135     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, u\_int \mbox{\hyperlink{g__raid__md__if_8m_a683a43faabf5ffc974caacd425b678d0}{event}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00136}00136 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00137}00137         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *trs;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00138}00138         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00139}00139         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00140}00140         \textcolor{keywordtype}{int} state;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00142}00142         trs = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *)tr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00143}00143         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00144}00144         sc = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5ddf3eff3aa40bdcbbfedb4d0458b332}{v\_softc}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00146}00146         state = \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00147}00147         \textcolor{keywordflow}{if} (state != \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}} \&\&}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00148}00148             state != \mbox{\hyperlink{g__raid_8h_a2e56fb1cd5fdab097052e38c28a8c92f}{G\_RAID\_SUBDISK\_S\_FAILED}} \&\&}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00149}00149             state != \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00150}00150                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00151}00151                     \textcolor{stringliteral}{"{}Promote subdisk \%s:\%d from \%s to ACTIVE."{}},}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00152}00152                     \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_abdedb24b3ca3f4d3020f94e62d63fa05}{v\_name}}, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}},}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00153}00153                     \mbox{\hyperlink{g__raid_8c_a2851538590fe257cd3714dbf4d03320a}{g\_raid\_subdisk\_state2str}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}}));}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00154}00154                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00155}00155         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00156}00156         \textcolor{keywordflow}{if} (state != \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} \&\&}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00157}00157             !trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}} \&\& !trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{trso\_stopped}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00158}00158                 \mbox{\hyperlink{g__raid_8c_a9cf6273a366922dadcce1047df240cb5}{g\_raid\_write\_metadata}}(sc, \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, NULL);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00159}00159         \mbox{\hyperlink{tr__raid0_8c_afff5c3937ffa43ac693e2af3e967bd1a}{g\_raid\_tr\_update\_state\_raid0}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00160}00160         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00161}00161 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00164}\mbox{\hyperlink{tr__raid0_8c_ae16cae0dcc6f1e500cdfc0ba320e7075}{00164}} \mbox{\hyperlink{tr__raid0_8c_ae01391227f54304dfb086aef4faa54f7}{g\_raid\_tr\_start\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00165}00165 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00166}00166         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *trs;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00167}00167         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00169}00169         trs = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *)tr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00170}00170         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00171}00171         trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}} = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00172}00172         \mbox{\hyperlink{tr__raid0_8c_afff5c3937ffa43ac693e2af3e967bd1a}{g\_raid\_tr\_update\_state\_raid0}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00173}00173         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00174}00174 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00176}00176 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00177}\mbox{\hyperlink{tr__raid0_8c_a36db6f81ba8eba63d6032917e337ce53}{00177}} \mbox{\hyperlink{tr__raid0_8c_a379e0210bcf84f13b3d26e8663e3c927}{g\_raid\_tr\_stop\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00178}00178 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00179}00179         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *trs;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00180}00180         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00182}00182         trs = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__tr__raid0__object}{g\_raid\_tr\_raid0\_object}} *)tr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00183}00183         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00184}00184         trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_ad1dd7bcced3099571bdd07f4626b35aa}{trso\_starting}} = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00185}00185         trs-\/>\mbox{\hyperlink{structg__raid__tr__raid0__object_a3d0fbf6e2caf312f1758a3c8943a4eb7}{trso\_stopped}} = 1;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00186}00186         \mbox{\hyperlink{tr__raid0_8c_afff5c3937ffa43ac693e2af3e967bd1a}{g\_raid\_tr\_update\_state\_raid0}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00187}00187         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00188}00188 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00190}00190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00191}\mbox{\hyperlink{tr__raid0_8c_acd73bd18a56f4774f69cfce30a3aa20c}{00191}} \mbox{\hyperlink{tr__raid0_8c_aa28d324a28bfde9503da952e41ec9932}{g\_raid\_tr\_iostart\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00193}00193         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00194}00194         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00195}00195         \textcolor{keyword}{struct }bio\_queue\_head queue;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00196}00196         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00197}00197         \textcolor{keywordtype}{char} *addr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00198}00198         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}}, nstripe, remain;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00199}00199         u\_int no, strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00201}00201         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00202}00202         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} != \mbox{\hyperlink{g__raid_8h_a20afd300edb0e3cdbfb0386d2fbb36c3}{G\_RAID\_VOLUME\_S\_OPTIMAL}} \&\&}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00203}00203             \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} != \mbox{\hyperlink{g__raid_8h_a48e4e755439965447a7116e19309dd16}{G\_RAID\_VOLUME\_S\_SUBOPTIMAL}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00204}00204                 \mbox{\hyperlink{g__raid_8c_aac26055db228a9070904855aa7fcec89}{g\_raid\_iodone}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, EIO);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00205}00205                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00206}00206         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00207}00207         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_FLUSH || \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_SPEEDUP) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00208}00208                 \mbox{\hyperlink{g__raid_8c_a1f79988e4121e92e58c04fbc2971aeb4}{g\_raid\_tr\_flush\_common}}(tr, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00209}00209                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00211}00211         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00212}00212                 addr = NULL;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00213}00213         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00214}00214                 addr = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00215}00215         strip\_size = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00217}00217         \textcolor{comment}{/* Stripe number. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00218}00218         nstripe = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset / strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00219}00219         \textcolor{comment}{/* Start position in stripe. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00220}00220         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset \% strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00221}00221         \textcolor{comment}{/* Disk number. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00222}00222         no = nstripe \% \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00223}00223         \textcolor{comment}{/* Stripe start position in disk. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00224}00224         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = (nstripe / \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}) * strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00225}00225         \textcolor{comment}{/* Length of data to operate. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00226}00226         remain = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00228}00228         bioq\_init(\&queue);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00229}00229         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00230}00230                 \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = MIN(strip\_size -\/ \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, remain);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00231}00231                 cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00232}00232                 \textcolor{keywordflow}{if} (cbp == NULL)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00233}00233                         \textcolor{keywordflow}{goto} failure;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00234}00234                 cbp-\/>bio\_offset = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00235}00235                 cbp-\/>bio\_length = \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00236}00236                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00237}00237                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd != BIO\_DELETE) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00238}00238                         cbp-\/>bio\_ma\_offset += (uintptr\_t)addr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00239}00239                         cbp-\/>bio\_ma += cbp-\/>bio\_ma\_offset / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00240}00240                         cbp-\/>bio\_ma\_offset \%= PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00241}00241                         cbp-\/>bio\_ma\_n = round\_page(cbp-\/>bio\_ma\_offset +}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00242}00242                             cbp-\/>bio\_length) / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00243}00243                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00244}00244                         cbp-\/>bio\_data = addr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00245}00245                 cbp-\/>bio\_caller1 = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[no];}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00246}00246                 bioq\_insert\_tail(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00247}00247                 \textcolor{keywordflow}{if} (++no >= \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00248}00248                         no = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00249}00249                         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00250}00250                 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00251}00251                 remain -\/= \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00252}00252                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd != BIO\_DELETE)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00253}00253                         addr += \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00254}00254                 \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00255}00255         \} \textcolor{keywordflow}{while} (remain > 0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00256}00256         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00257}00257                 \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = cbp-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00258}00258                 cbp-\/>bio\_caller1 = NULL;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00259}00259                 \mbox{\hyperlink{g__raid_8c_a685376bcb4756d784a9a433ced731e79}{g\_raid\_subdisk\_iostart}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, cbp);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00260}00260         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00261}00261         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00262}00262 failure:}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00263}00263         \textcolor{keywordflow}{while} ((cbp = bioq\_takefirst(\&queue)) != NULL)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00264}00264                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00265}00265         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00266}00266                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00267}00267         \mbox{\hyperlink{g__raid_8c_aac26055db228a9070904855aa7fcec89}{g\_raid\_iodone}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00268}00268 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00270}00270 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00271}\mbox{\hyperlink{tr__raid0_8c_afdb005af7cfe47c547eecbddf673b2d9}{00271}} \mbox{\hyperlink{tr__raid0_8c_ac2954f4bea5e67291f482b0274117973}{g\_raid\_tr\_kerneldump\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00272}00272     \textcolor{keywordtype}{void} *\textcolor{keyword}{virtual}, vm\_offset\_t \mbox{\hyperlink{g__raid__tr__if_8m_a27729ff5ed96d4c7c45950d01a07c654}{physical}}, off\_t boffset, \textcolor{keywordtype}{size\_t} blength)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00273}00273 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00274}00274         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00275}00275         \textcolor{keywordtype}{char} *addr;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00276}00276         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}}, nstripe, remain;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00277}00277         u\_int no, strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00278}00278         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00280}00280         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = tr-\/>\mbox{\hyperlink{structg__raid__tr__object_adda608cedccd305f267d8593f2bebe7f}{tro\_volume}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00281}00281         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} != \mbox{\hyperlink{g__raid_8h_a20afd300edb0e3cdbfb0386d2fbb36c3}{G\_RAID\_VOLUME\_S\_OPTIMAL}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00282}00282                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00283}00283         addr = \textcolor{keyword}{virtual};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00284}00284         strip\_size = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00286}00286         \textcolor{comment}{/* Stripe number. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00287}00287         nstripe = boffset / strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00288}00288         \textcolor{comment}{/* Start position in stripe. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00289}00289         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = boffset \% strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00290}00290         \textcolor{comment}{/* Disk number. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00291}00291         no = nstripe \% \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00292}00292         \textcolor{comment}{/* Stripe tart position in disk. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00293}00293         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = (nstripe / \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}) * strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00294}00294         \textcolor{comment}{/* Length of data to operate. */}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00295}00295         remain = blength;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00297}00297         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00298}00298                 \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = MIN(strip\_size -\/ \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, remain);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00299}00299                 error = \mbox{\hyperlink{g__raid_8c_a756b77f738835af96cae5e6456b11f89}{g\_raid\_subdisk\_kerneldump}}(\&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[no],}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00300}00300                     addr, 0, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00301}00301                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00302}00302                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00303}00303                 \textcolor{keywordflow}{if} (++no >= \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00304}00304                         no = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00305}00305                         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += strip\_size;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00306}00306                 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00307}00307                 remain -\/= \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00308}00308                 addr += \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00309}00309                 \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = 0;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00310}00310         \} \textcolor{keywordflow}{while} (remain > 0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00311}00311         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00312}00312 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00314}00314 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00315}\mbox{\hyperlink{tr__raid0_8c_af2abe5f06529260bde0d7702d0da5f9a}{00315}} \mbox{\hyperlink{tr__raid0_8c_a369847e26c1ba763616aaf3cc7d23fdd}{g\_raid\_tr\_iodone\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr,}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00316}00316     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00317}00317 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00318}00318         \textcolor{keyword}{struct }bio *pbp;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00320}00320         pbp = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00321}00321         \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00322}00322                 pbp-\/>bio\_error = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00323}00323         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00324}00324         pbp-\/>bio\_inbed++;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00325}00325         \textcolor{keywordflow}{if} (pbp-\/>bio\_children == pbp-\/>bio\_inbed) \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00326}00326                 pbp-\/>bio\_completed = pbp-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00327}00327                 \mbox{\hyperlink{g__raid_8c_aac26055db228a9070904855aa7fcec89}{g\_raid\_iodone}}(pbp, pbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00329}00329 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00331}00331 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00332}\mbox{\hyperlink{tr__raid0_8c_a375b3e7399bd094a345daa5803cbd280}{00332}} \mbox{\hyperlink{tr__raid0_8c_a162fbb0ba534da4206f55b79d25e19ea}{g\_raid\_tr\_free\_raid0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__tr__object}{g\_raid\_tr\_object}} *tr)}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00333}00333 \{}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00335}00335         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00336}00336 \}}
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{tr__raid0_8c_source_l00338}\mbox{\hyperlink{tr__raid0_8c_a8c1dae6fc1f3cabf5716a0d671043a9a}{00338}} \mbox{\hyperlink{tr__raid0_8c_a8c1dae6fc1f3cabf5716a0d671043a9a}{G\_RAID\_TR\_DECLARE}}(raid0, \textcolor{stringliteral}{"{}RAID0"{}});}

\end{DoxyCode}
