\hypertarget{g__raid3_8c_source}{}\doxysection{g\+\_\+raid3.\+c}
\label{g__raid3_8c_source}\index{geom/raid3/g\_raid3.c@{geom/raid3/g\_raid3.c}}
\mbox{\hyperlink{g__raid3_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2004-\/2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00030}\mbox{\hyperlink{g__raid3_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__raid3_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/limits.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/eventhandler.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <vm/uma.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/sched.h>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__raid3_8h}{geom/raid3/g\_raid3.h}}>}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00052}\mbox{\hyperlink{g__raid3_8c_abad672ad2a464c4eaec25a7f5d91ed2c}{00052}} \mbox{\hyperlink{g__raid3_8c_abad672ad2a464c4eaec25a7f5d91ed2c}{FEATURE}}(geom\_raid3, \textcolor{stringliteral}{"{}GEOM RAID-\/3 functionality"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00054}\mbox{\hyperlink{g__raid3_8c_ac63e3dbac8cadc423807707c122da2e2}{00054}} \textcolor{keyword}{static} \mbox{\hyperlink{g__raid3_8c_ac63e3dbac8cadc423807707c122da2e2}{MALLOC\_DEFINE}}(M\_RAID3, \textcolor{stringliteral}{"{}raid3\_data"{}}, \textcolor{stringliteral}{"{}GEOM\_RAID3 Data"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00056}\mbox{\hyperlink{g__raid3_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{00056}} \mbox{\hyperlink{g__raid3_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{SYSCTL\_DECL}}(\_kern\_geom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00057}\mbox{\hyperlink{g__raid3_8c_a14665ad7fcf272a5d072de460b3d4df8}{00057}} \textcolor{keyword}{static} \mbox{\hyperlink{g__raid3_8c_a14665ad7fcf272a5d072de460b3d4df8}{SYSCTL\_NODE}}(\_kern\_geom, OID\_AUTO, raid3, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00058}00058     \textcolor{stringliteral}{"{}GEOM\_RAID3 stuff"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00059}\mbox{\hyperlink{g__raid3_8c_a04fb8e0d470bbdee2de52db054113120}{00059}} u\_int \mbox{\hyperlink{g__raid3_8c_a04fb8e0d470bbdee2de52db054113120}{g\_raid3\_debug}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00060}\mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{00060}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, debug, CTLFLAG\_RWTUN, \&\mbox{\hyperlink{g__raid3_8c_a04fb8e0d470bbdee2de52db054113120}{g\_raid3\_debug}}, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00061}00061     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00062}\mbox{\hyperlink{g__raid3_8c_a71f602216317b7276e86034f798f669b}{00062}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a71f602216317b7276e86034f798f669b}{g\_raid3\_timeout}} = 4;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00063}\mbox{\hyperlink{g__raid3_8c_ae62139389aff3eb3bb129103bb3644bc}{00063}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, timeout, CTLFLAG\_RWTUN, \&\mbox{\hyperlink{g__raid3_8c_a71f602216317b7276e86034f798f669b}{g\_raid3\_timeout}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00064}00064     0, \textcolor{stringliteral}{"{}Time to wait on all raid3 components"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00065}\mbox{\hyperlink{g__raid3_8c_aba8a6096547b0b81ff575dd5fd7dc211}{00065}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_aba8a6096547b0b81ff575dd5fd7dc211}{g\_raid3\_idletime}} = 5;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00066}\mbox{\hyperlink{g__raid3_8c_af831bf937ef3a16d072a6c4729304093}{00066}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, idletime, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00067}00067     \&\mbox{\hyperlink{g__raid3_8c_aba8a6096547b0b81ff575dd5fd7dc211}{g\_raid3\_idletime}}, 0, \textcolor{stringliteral}{"{}Mark components as clean when idling"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00068}\mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{00068}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{g\_raid3\_disconnect\_on\_failure}} = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00069}\mbox{\hyperlink{g__raid3_8c_a6f7a76c574c05e0e10e6cccad3a2454d}{00069}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, disconnect\_on\_failure, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00070}00070     \&\mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{g\_raid3\_disconnect\_on\_failure}}, 0, \textcolor{stringliteral}{"{}Disconnect component on I/O failure."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00071}\mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{00071}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}} = 2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00072}\mbox{\hyperlink{g__raid3_8c_a114a35f9c22f071b9015cf25aad30ca8}{00072}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, sync\_requests, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00073}00073     \&\mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}}, 0, \textcolor{stringliteral}{"{}Parallel synchronization I/O requests."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00074}\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{00074}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00075}\mbox{\hyperlink{g__raid3_8c_a3ab9ac250f8ba0e4d9dae798479afdfb}{00075}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, use\_malloc, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00076}00076     \&\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}}, 0, \textcolor{stringliteral}{"{}Use malloc(9) instead of uma(9)."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00078}\mbox{\hyperlink{g__raid3_8c_afb5c22e5b68045b28ff12c956fbf475b}{00078}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_afb5c22e5b68045b28ff12c956fbf475b}{g\_raid3\_n64k}} = 50;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00079}\mbox{\hyperlink{g__raid3_8c_afd9aecd35684ff9929a11e35fec2d7c1}{00079}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, n64k, CTLFLAG\_RDTUN, \&\mbox{\hyperlink{g__raid3_8c_afb5c22e5b68045b28ff12c956fbf475b}{g\_raid3\_n64k}}, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00080}00080     \textcolor{stringliteral}{"{}Maximum number of 64kB allocations"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00081}\mbox{\hyperlink{g__raid3_8c_a7f2fa2589ae94ba5b88ee74a02800e8e}{00081}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a7f2fa2589ae94ba5b88ee74a02800e8e}{g\_raid3\_n16k}} = 200;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00082}\mbox{\hyperlink{g__raid3_8c_a6a8ef26033f2cf7b53a09418e0ac8814}{00082}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, n16k, CTLFLAG\_RDTUN, \&\mbox{\hyperlink{g__raid3_8c_a7f2fa2589ae94ba5b88ee74a02800e8e}{g\_raid3\_n16k}}, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00083}00083     \textcolor{stringliteral}{"{}Maximum number of 16kB allocations"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00084}\mbox{\hyperlink{g__raid3_8c_a364607db2156782ee6aa7b7a176fa420}{00084}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a364607db2156782ee6aa7b7a176fa420}{g\_raid3\_n4k}} = 1200;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00085}\mbox{\hyperlink{g__raid3_8c_aea0932c03f36fd1406e736d9aa741c4d}{00085}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3, OID\_AUTO, n4k, CTLFLAG\_RDTUN, \&\mbox{\hyperlink{g__raid3_8c_a364607db2156782ee6aa7b7a176fa420}{g\_raid3\_n4k}}, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00086}00086     \textcolor{stringliteral}{"{}Maximum number of 4kB allocations"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00088}\mbox{\hyperlink{g__raid3_8c_ae53a9cbd79bf202d5c750e735637ff05}{00088}} \textcolor{keyword}{static} \mbox{\hyperlink{g__raid3_8c_a14665ad7fcf272a5d072de460b3d4df8}{SYSCTL\_NODE}}(\_kern\_geom\_raid3, OID\_AUTO, stat,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00089}00089     CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00090}00090     \textcolor{stringliteral}{"{}GEOM\_RAID3 statistics"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00091}\mbox{\hyperlink{g__raid3_8c_a56e66240e5cf9091139d560920cfe7d3}{00091}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__raid3_8c_a56e66240e5cf9091139d560920cfe7d3}{g\_raid3\_parity\_mismatch}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00092}\mbox{\hyperlink{g__raid3_8c_a3c272757c7a2b39055c50a282e4f6456}{00092}} \mbox{\hyperlink{g__raid3_8c_a5aed8518a28d58fe8292156e3d8099b0}{SYSCTL\_UINT}}(\_kern\_geom\_raid3\_stat, OID\_AUTO, parity\_mismatch, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00093}00093     \&\mbox{\hyperlink{g__raid3_8c_a56e66240e5cf9091139d560920cfe7d3}{g\_raid3\_parity\_mismatch}}, 0, \textcolor{stringliteral}{"{}Number of failures in VERIFY mode"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00095}\mbox{\hyperlink{g__raid3_8c_a2455e9c9cba861e782fa3e81a87b71d8}{00095}} \textcolor{preprocessor}{\#define MSLEEP(ident, mtx, priority, wmesg, timeout)    do \{            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00096}00096 \textcolor{preprocessor}{        G\_RAID3\_DEBUG(4, "{}\%s: Sleeping \%p."{}}, \_\_func\_\_, (ident));        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00097}00097         msleep((ident), (mtx), (priority), (wmesg), (timeout));         \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00098}00098         G\_RAID3\_DEBUG(4, "{}\%s: Woken up \%p."{}, \_\_func\_\_, (ident));        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00099}00099 \} while (0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00101}\mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{00101}} \textcolor{keyword}{static} eventhandler\_tag \mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{g\_raid3\_post\_sync}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00102}\mbox{\hyperlink{g__raid3_8c_a042266d8a642d531324027bbb446c614}{00102}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__raid3_8c_a042266d8a642d531324027bbb446c614}{g\_raid3\_shutdown}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00104}\mbox{\hyperlink{g__raid3_8c_acc01b863af9c3e1fe2779dee9c91c231}{00104}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__raid3_8c_acc01b863af9c3e1fe2779dee9c91c231}{g\_raid3\_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__raid3_8c_source_l00105}00105     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00106}\mbox{\hyperlink{g__raid3_8c_a5f92c730ef47fb20f65ceedfa2c0fa0f}{00106}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a631656592e7bd0d9b508904254e8e7a7}{g\_taste\_t}} \mbox{\hyperlink{g__raid3_8c_a5f92c730ef47fb20f65ceedfa2c0fa0f}{g\_raid3\_taste}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00107}00107 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_a0cf1f5d9eb2c18575211cdda2688d4ea}{g\_raid3\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00108}00108 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_a75753c442aaed0aa237ea0140c189f3b}{g\_raid3\_fini}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00110}\mbox{\hyperlink{g__raid3_8c_aa70f0fd650131e39e9d62774598be3b1}{00110}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{g__raid3_8c_aa70f0fd650131e39e9d62774598be3b1}{g\_raid3\_class}} = \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00111}00111         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}} = \mbox{\hyperlink{g__raid3_8h_adaca5052c17d74148addda231950a29b}{G\_RAID3\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00112}00112         .version = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00113}00113         .ctlreq = \mbox{\hyperlink{g__raid3_8h_a03e1f817e5f67cac30d66a06e05d7a99}{g\_raid3\_config}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00114}00114         .taste = \mbox{\hyperlink{g__raid3_8c_a5f92c730ef47fb20f65ceedfa2c0fa0f}{g\_raid3\_taste}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00115}00115         .destroy\_geom = \mbox{\hyperlink{g__raid3_8c_acc01b863af9c3e1fe2779dee9c91c231}{g\_raid3\_destroy\_geom}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00116}00116         .init = \mbox{\hyperlink{g__raid3_8c_a0cf1f5d9eb2c18575211cdda2688d4ea}{g\_raid3\_init}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00117}00117         .fini = \mbox{\hyperlink{g__raid3_8c_a75753c442aaed0aa237ea0140c189f3b}{g\_raid3\_fini}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00118}00118 \};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00120}00120 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_a35bf66296c96a7aacaa8964e10182d8e}{g\_raid3\_destroy\_provider}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00121}00121 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__raid3_8c_a174790bfb5b3ecbfa6772f3f1f024c46}{g\_raid3\_update\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, u\_int state);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00122}00122 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_acf64ce40bcf240d883b5e0af3c26a61c}{g\_raid3\_update\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, boolean\_t force);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00123}00123 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_aa29604f847129f55c596eb743773dd72}{g\_raid3\_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}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00124}00124     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \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__raid3_8c_source_l00125}00125 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{int} \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00126}00126 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__raid3_8c_a426292df09f88efb8272c9177d85a066}{g\_raid3\_register\_request}}(\textcolor{keyword}{struct} bio *pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00127}00127 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__raid3_8c_af696e4f2129ffbf4e465fa926af50894}{g\_raid3\_sync\_release}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00130}\mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{00130}} \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00131}00131 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00133}00133         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00134}00134         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00135}00135                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NODISK"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00136}00136         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ad25d2039e53f55c72b432b1032bcc6ad}{G\_RAID3\_DISK\_STATE\_NONE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00137}00137                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NONE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00138}00138         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00139}00139                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NEW"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00140}00140         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00141}00141                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}ACTIVE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00142}00142         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00143}00143                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}STALE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00144}00144         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00145}00145                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}SYNCHRONIZING"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00146}00146         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00147}00147                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}DISCONNECTED"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00148}00148         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00149}00149                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}INVALID"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00150}00150         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00151}00151 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00153}00153 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00154}\mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{00154}} \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00155}00155 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00157}00157         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00158}00158         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00159}00159                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}STARTING"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00160}00160         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00161}00161                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}DEGRADED"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00162}00162         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00163}00163                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}COMPLETE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00164}00164         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00165}00165                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}INVALID"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00166}00166         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00169}00169 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00170}\mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{00170}} \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00173}00173         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer == NULL || \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00174}00174                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}[unknown]"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00175}00175         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00176}00176 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00178}00178 \textcolor{keyword}{static} \textcolor{keywordtype}{void} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00179}\mbox{\hyperlink{g__raid3_8c_aee920b9611a5b43ebddc9d3ac8265344}{00179}} \mbox{\hyperlink{g__raid3_8c_aee920b9611a5b43ebddc9d3ac8265344}{g\_raid3\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{size\_t} size, \textcolor{keywordtype}{int} flags)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00180}00180 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00181}00181         \textcolor{keywordtype}{void} *ptr;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00182}00182         \textcolor{keyword}{enum} \mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312a}{g\_raid3\_zones}} zone;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00184}00184         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00185}00185             (zone = \mbox{\hyperlink{g__raid3_8h_ac0e83f4412545975aa7d180a3d76f551}{g\_raid3\_zone}}(size)) == \mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa22546caec33237b9052861d8499ea438}{G\_RAID3\_NUM\_ZONES}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00186}00186                 ptr = malloc(size, M\_RAID3, flags);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00187}00187         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00188}00188                 ptr = uma\_zalloc\_arg(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00189}00189                    \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone], flags);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00190}00190                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00191}00191                 \textcolor{keywordflow}{if} (ptr == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00192}00192                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00193}00193         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00194}00194         \textcolor{keywordflow}{return} (ptr);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00195}00195 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00197}00197 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00198}\mbox{\hyperlink{g__raid3_8c_a31af6abde8c7ae707e395c34d909ee70}{00198}} \mbox{\hyperlink{g__raid3_8c_a31af6abde8c7ae707e395c34d909ee70}{g\_raid3\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00199}00199 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00200}00200         \textcolor{keyword}{enum} \mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312a}{g\_raid3\_zones}} zone;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00202}00202         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00203}00203             (zone = \mbox{\hyperlink{g__raid3_8h_ac0e83f4412545975aa7d180a3d76f551}{g\_raid3\_zone}}(size)) == \mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa22546caec33237b9052861d8499ea438}{G\_RAID3\_NUM\_ZONES}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00204}00204                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(ptr, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00205}00205         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00206}00206                 uma\_zfree\_arg(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00207}00207                     ptr, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[zone]);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00208}00208         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00209}00209 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00211}00211 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00212}\mbox{\hyperlink{g__raid3_8c_a25d410898637f2fc16382f3cfe7a0e74}{00212}} \mbox{\hyperlink{g__raid3_8c_a25d410898637f2fc16382f3cfe7a0e74}{g\_raid3\_uma\_ctor}}(\textcolor{keywordtype}{void} *mem, \textcolor{keywordtype}{int} size, \textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} flags)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00213}00213 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00214}00214         \textcolor{keyword}{struct }\mbox{\hyperlink{g__raid3_8h_ac0e83f4412545975aa7d180a3d76f551}{g\_raid3\_zone}} *sz = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00216}00216         \textcolor{keywordflow}{if} (sz-\/>sz\_max > 0 \&\& sz-\/>sz\_inuse == sz-\/>sz\_max)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00217}00217                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00218}00218         sz-\/>sz\_inuse++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00219}00219         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00220}00220 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00222}00222 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00223}\mbox{\hyperlink{g__raid3_8c_a50c7b0ac770ba0e98df8fa30e9de49fa}{00223}} \mbox{\hyperlink{g__raid3_8c_a50c7b0ac770ba0e98df8fa30e9de49fa}{g\_raid3\_uma\_dtor}}(\textcolor{keywordtype}{void} *mem, \textcolor{keywordtype}{int} size, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00224}00224 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00225}00225         \textcolor{keyword}{struct }\mbox{\hyperlink{g__raid3_8h_ac0e83f4412545975aa7d180a3d76f551}{g\_raid3\_zone}} *sz = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00227}00227         sz-\/>sz\_inuse-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00228}00228 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00230}\mbox{\hyperlink{g__raid3_8c_a059e942e2dc5e776f624c1f437ad6f1c}{00230}} \textcolor{preprocessor}{\#define g\_raid3\_xor(src, dst, size)                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00231}00231 \textcolor{preprocessor}{        \_g\_raid3\_xor((uint64\_t *)(src),                                 \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00232}00232 \textcolor{preprocessor}{            (uint64\_t *)(dst), (size\_t)size)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00233}00233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00234}\mbox{\hyperlink{g__raid3_8c_a87dea08560d10a76a6c9acc505d2e3dd}{00234}} \mbox{\hyperlink{g__raid3_8c_a87dea08560d10a76a6c9acc505d2e3dd}{\_g\_raid3\_xor}}(uint64\_t *src, uint64\_t *dst, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00235}00235 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00237}00237         KASSERT((size \% 128) == 0, (\textcolor{stringliteral}{"{}Invalid size: \%zu."{}}, size));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00238}00238         \textcolor{keywordflow}{for} (; size > 0; size -\/= 128) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00239}00239                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00240}00240                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00241}00241                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00242}00242                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00243}00243                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00244}00244                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00245}00245                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00246}00246                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00247}00247                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00248}00248                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00249}00249                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00250}00250                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00251}00251                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00252}00252                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00253}00253                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00254}00254                 *dst++ \string^= (*src++);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00255}00255         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00256}00256 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00259}\mbox{\hyperlink{g__raid3_8c_af352048209ad695560db6b47298fc1ec}{00259}} \mbox{\hyperlink{g__raid3_8c_af352048209ad695560db6b47298fc1ec}{g\_raid3\_is\_zero}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00260}00260 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00261}00261         \textcolor{keyword}{static} \textcolor{keyword}{const} uint64\_t zeros[] = \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00262}00262             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00263}00263         \};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00264}00264         u\_char *addr;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00265}00265         ssize\_t size;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00267}00267         size = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00268}00268         addr = (u\_char *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00269}00269         for (; size > 0; size -\/= \textcolor{keyword}{sizeof}(zeros), addr += \textcolor{keyword}{sizeof}(zeros)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00270}00270                 \textcolor{keywordflow}{if} (bcmp(addr, zeros, \textcolor{keyword}{sizeof}(zeros)) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00271}00271                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00272}00272         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00273}00273         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00274}00274 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00276}00276 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00277}00277 \textcolor{comment}{ * -\/-\/-\/ Events handling functions -\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00278}00278 \textcolor{comment}{ * Events in geom\_raid3 are used to maintain disks and device status}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00279}00279 \textcolor{comment}{ * from one thread to simplify locking.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00280}00280 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00281}00281 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00282}\mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{00282}} \mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{g\_raid3\_event\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00285}00285         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(ep, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00286}00286 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00288}00288 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00289}\mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{00289}} \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} state, \textcolor{keywordtype}{int} flags)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00290}00290 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00291}00291         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00292}00292         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00293}00293         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00294}00294         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00296}00296         ep = malloc(\textcolor{keyword}{sizeof}(*ep), M\_RAID3, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00297}00297         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Sending event \%p."{}}, \_\_func\_\_, ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00298}00298         \textcolor{keywordflow}{if} ((flags \& \mbox{\hyperlink{g__raid3_8h_abc36a7cccb37dec35a44c25d2f1f9cf9}{G\_RAID3\_EVENT\_DEVICE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00299}00299                 \mbox{\hyperlink{structdisk}{disk}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00300}00300                 sc = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00301}00301         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00302}00302                 \mbox{\hyperlink{structdisk}{disk}} = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00303}00303                 sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00304}00304         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00305}00305         ep-\/>\mbox{\hyperlink{structg__raid3__event_a6998d13e389baa4899e32bd6d15f3d8c}{e\_disk}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00306}00306         ep-\/>\mbox{\hyperlink{structg__raid3__event_a33dda18f8a73ae4077a940f119ad0ea0}{e\_state}} = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00307}00307         ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} = flags;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00308}00308         ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00309}00309         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00310}00310         TAILQ\_INSERT\_TAIL(\&sc-\/>sc\_events, ep, e\_next);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00311}00311         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00312}00312         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_, sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00313}00313         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00314}00314         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00315}00315         wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00316}00316         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00317}00317         \textcolor{keywordflow}{if} ((flags \& \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00318}00318                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00319}00319         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00320}00320         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Sleeping \%p."{}}, \_\_func\_\_, ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00321}00321         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00322}00322         \textcolor{keywordflow}{while} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_afdccc70d271f9888f7945de34fba2c7c}{G\_RAID3\_EVENT\_DONE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00323}00323                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00324}00324                 \mbox{\hyperlink{g__raid3_8c_a2455e9c9cba861e782fa3e81a87b71d8}{MSLEEP}}(ep, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}}, PRIBIO | PDROP, \textcolor{stringliteral}{"{}r3:event"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00325}00325                     hz * 5);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00326}00326         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00327}00327         error = ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00328}00328         \mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{g\_raid3\_event\_free}}(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00329}00329         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00330}00330         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00331}00331 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00333}00333 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00334}\mbox{\hyperlink{g__raid3_8c_acb3ca1e5b06d6685a64a6ac50fe7e54d}{00334}} \mbox{\hyperlink{g__raid3_8c_acb3ca1e5b06d6685a64a6ac50fe7e54d}{g\_raid3\_event\_get}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00335}00335 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00336}00336         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00338}00338         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00339}00339         ep = TAILQ\_FIRST(\&sc-\/>sc\_events);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00340}00340         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00341}00341         \textcolor{keywordflow}{return} (ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00342}00342 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00344}00344 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00345}\mbox{\hyperlink{g__raid3_8c_a718a9f874e49c00038ab04477a6ac9b3}{00345}} \mbox{\hyperlink{g__raid3_8c_a718a9f874e49c00038ab04477a6ac9b3}{g\_raid3\_event\_remove}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00346}00346 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00347}00347 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00348}00348         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00349}00349         TAILQ\_REMOVE(\&sc-\/>sc\_events, ep, e\_next);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00350}00350         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00351}00351 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00352}00352 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00353}00353 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00354}\mbox{\hyperlink{g__raid3_8c_ad552c2dd64059143604b52592e02eb73}{00354}} \mbox{\hyperlink{g__raid3_8c_ad552c2dd64059143604b52592e02eb73}{g\_raid3\_event\_cancel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00355}00355 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00356}00356         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00357}00357         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep, *tmpep;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00359}00359         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00360}00360         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00362}00362         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00363}00363         TAILQ\_FOREACH\_SAFE(ep, \&sc-\/>sc\_events, e\_next, tmpep) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00364}00364                 \textcolor{keywordflow}{if} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_abc36a7cccb37dec35a44c25d2f1f9cf9}{G\_RAID3\_EVENT\_DEVICE}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00365}00365                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00366}00366                 \textcolor{keywordflow}{if} (ep-\/>\mbox{\hyperlink{structg__raid3__event_a6998d13e389baa4899e32bd6d15f3d8c}{e\_disk}} != \mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00367}00367                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00368}00368                 TAILQ\_REMOVE(\&sc-\/>sc\_events, ep, e\_next);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00369}00369                 \textcolor{keywordflow}{if} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00370}00370                         \mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{g\_raid3\_event\_free}}(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00371}00371                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00372}00372                         ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} = ECANCELED;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00373}00373                         wakeup(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00374}00374                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00375}00375         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00376}00376         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00377}00377 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00379}00379 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00380}00380 \textcolor{comment}{ * Return the number of disks in the given state.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00381}00381 \textcolor{comment}{ * If state is equal to -\/1, count all connected disks.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00382}00382 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00383}00383 u\_int}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00384}\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{00384}} \mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00385}00385 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00386}00386         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00387}00387         u\_int n, ndisks;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00389}00389         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00390}00390 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00391}00391         \textcolor{keywordflow}{for} (n = ndisks = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00392}00392                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00393}00393                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00394}00394                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00395}00395                 \textcolor{keywordflow}{if} (state == -\/1 || \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == state)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00396}00396                         ndisks++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00397}00397         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00398}00398         \textcolor{keywordflow}{return} (ndisks);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00399}00399 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00401}00401 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00402}\mbox{\hyperlink{g__raid3_8c_a94ab7484ab4b4328c9c39633b5f92541}{00402}} \mbox{\hyperlink{g__raid3_8c_a94ab7484ab4b4328c9c39633b5f92541}{g\_raid3\_nrequests}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00403}00403 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00404}00404         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00405}00405         u\_int nreqs = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00407}00407         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00408}00408         TAILQ\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}.queue, bio\_queue) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00409}00409                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from == \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00410}00410                         nreqs++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00411}00411         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00412}00412         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00413}00413         \textcolor{keywordflow}{return} (nreqs);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00414}00414 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00415}00415 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00416}00416 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00417}\mbox{\hyperlink{g__raid3_8c_a23ad8f3199efc8cc7ddc7283bec89fe8}{00417}} \mbox{\hyperlink{g__raid3_8c_a23ad8f3199efc8cc7ddc7283bec89fe8}{g\_raid3\_is\_busy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00418}00418 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00419}00419 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00420}00420         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}} > 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00421}00421                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00422}00422                     \textcolor{stringliteral}{"{}I/O requests for \%s exist, can't destroy it now."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00423}00423                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00424}00424                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00425}00425         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00426}00426         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a94ab7484ab4b4328c9c39633b5f92541}{g\_raid3\_nrequests}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}) > 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00427}00427                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00428}00428                     \textcolor{stringliteral}{"{}I/O requests for \%s in queue, can't destroy it now."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00429}00429                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00430}00430                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00431}00431         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00432}00432         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00433}00433 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00434}00434 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00435}00435 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00436}\mbox{\hyperlink{g__raid3_8c_a5e53b3e564af9e17bbb8a0d0455419cd}{00436}} \mbox{\hyperlink{g__raid3_8c_a5e53b3e564af9e17bbb8a0d0455419cd}{g\_raid3\_destroy\_consumer}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} flags \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00437}00437 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00438}00438         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00440}00440         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00442}00442         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00443}00443         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Consumer \%s destroyed."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00444}00444         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00445}00445         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00446}00446 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00448}00448 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00449}\mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{00449}} \mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{g\_raid3\_kill\_consumer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00450}00450 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00451}00451         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00452}00452         \textcolor{keywordtype}{int} retaste\_wait;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00454}00454         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00456}00456         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00457}00457         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a23ad8f3199efc8cc7ddc7283bec89fe8}{g\_raid3\_is\_busy}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00458}00458                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00459}00459         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Consumer \%s destroyed."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00460}00460         \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__raid3_8c_source_l00461}00461         retaste\_wait = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00462}00462         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} == 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00463}00463                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_afa218bd6b4ead71e6238ecd0577e1cc9}{flags}} \& \mbox{\hyperlink{geom_8h_ac5e457264b1579081f1d544c1eceb256}{G\_GEOM\_WITHER}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00464}00464                         retaste\_wait = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00465}00465         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00466}00466         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Access \%s r\%dw\%de\%d = \%d"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00467}00467             -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00468}00468         \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__raid3_8c_source_l00469}00469                 \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, -\/\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00470}00470         \textcolor{keywordflow}{if} (retaste\_wait) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00471}00471                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00472}00472 \textcolor{comment}{                 * After retaste event was send (inside g\_access()), we can send}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00473}00473 \textcolor{comment}{                 * event to detach and destroy consumer.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00474}00474 \textcolor{comment}{                 * A class, which has consumer to the given provider connected}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00475}00475 \textcolor{comment}{                 * will not receive retaste event for the provider.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00476}00476 \textcolor{comment}{                 * This is the way how I ignore retaste events when I close}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00477}00477 \textcolor{comment}{                 * consumers opened for write: I detach and destroy consumer}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00478}00478 \textcolor{comment}{                 * after retaste event is sent.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00479}00479 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00480}00480                 \mbox{\hyperlink{geom_8h_a196998b2923eb556355a617daaef1879}{g\_post\_event}}(\mbox{\hyperlink{g__raid3_8c_a5e53b3e564af9e17bbb8a0d0455419cd}{g\_raid3\_destroy\_consumer}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, M\_WAITOK, NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00481}00481                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00482}00482         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00483}00483         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Consumer \%s destroyed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00484}00484         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00485}00485         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00486}00486 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00488}00488 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00489}\mbox{\hyperlink{g__raid3_8c_af3f152b42d1430af4eece62cb032704d}{00489}} \mbox{\hyperlink{g__raid3_8c_af3f152b42d1430af4eece62cb032704d}{g\_raid3\_connect\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00490}00490 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00491}00491         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00492}00492         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00493}00493 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00494}00494         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00495}00495         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer == NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00496}00496             (\textcolor{stringliteral}{"{}Disk already connected (device \%s)."{}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00498}00498         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00499}00499         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc-\/>sc\_geom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00500}00500         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__raid3_8c_source_l00501}00501         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00502}00502                 \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00503}00503                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00504}00504                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00505}00505         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00506}00506         error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00507}00507                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00508}00508         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00509}00509                 \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00510}00510                 \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00511}00511                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot open consumer \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00512}00512                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00513}00513                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00514}00514         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00515}00515         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00516}00516         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>private = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00517}00517         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>index = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00518}00518         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Disk \%s connected."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00519}00519         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00520}00520 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00521}00521 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00522}00522 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00523}\mbox{\hyperlink{g__raid3_8c_a8bbcd1274b79133ba020080d67593a30}{00523}} \mbox{\hyperlink{g__raid3_8c_a8bbcd1274b79133ba020080d67593a30}{g\_raid3\_disconnect\_consumer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00524}00524 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00526}00526         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00528}00528         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00529}00529                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00530}00530         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00531}00531                 \mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{g\_raid3\_kill\_consumer}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00532}00532         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00533}00533                 \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00534}00534 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00535}00535 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00536}00536 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00537}00537 \textcolor{comment}{ * Initialize disk. This means allocate memory, create consumer, attach it}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00538}00538 \textcolor{comment}{ * to the provider and open access (r1w1e1) to it.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00539}00539 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00540}00540 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00541}\mbox{\hyperlink{g__raid3_8c_a1710367dd1e13af7721736b4f30d8c61}{00541}} \mbox{\hyperlink{g__raid3_8c_a1710367dd1e13af7721736b4f30d8c61}{g\_raid3\_init\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00542}00542     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} *md, \textcolor{keywordtype}{int} *errorp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00543}00543 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00544}00544         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00545}00545         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00547}00547         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}}];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00548}00548         error = \mbox{\hyperlink{g__raid3_8c_af3f152b42d1430af4eece62cb032704d}{g\_raid3\_connect\_disk}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00549}00549         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00550}00550                 \textcolor{keywordflow}{if} (errorp != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00551}00551                         *errorp = error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00552}00552                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00553}00553         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00554}00554         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = \mbox{\hyperlink{g__raid3_8h_ad25d2039e53f55c72b432b1032bcc6ad}{G\_RAID3\_DISK\_STATE\_NONE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00555}00555         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8408d4e788a104cc683bcb361cc8feee}{md\_dflags}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00556}00556         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_ac421dfa4e0c0df94e903f34678f539da}{md\_provider}}[0] != \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00557}00557                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a716568d6e59e37d05e95bda2ce7e6e8c}{G\_RAID3\_DISK\_FLAG\_HARDCODED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00558}00558         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00559}00559         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a7fafc14ec30e6d39c6348588b24d3d66}{md\_sync\_offset}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00560}00560         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset\_done = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a7fafc14ec30e6d39c6348588b24d3d66}{md\_sync\_offset}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00561}00561         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8427865226439b0cfca50232b7c41f12}{md\_genid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00562}00562         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid = md-\/>\mbox{\hyperlink{structg__raid3__metadata_acd2aed4c1f529d8f3166aed6a052acb7}{md\_syncid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00563}00563         \textcolor{keywordflow}{if} (errorp != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00564}00564                 *errorp = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00565}00565         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00566}00566 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00567}00567 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00568}00568 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00569}\mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{00569}} \mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{g\_raid3\_destroy\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00570}00570 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00571}00571         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00572}00572 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00573}00573         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00574}00574         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00575}00575         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00577}00577         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00578}00578                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00579}00579         \mbox{\hyperlink{g__raid3_8c_ad552c2dd64059143604b52592e02eb73}{g\_raid3\_event\_cancel}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00580}00580         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00581}00581         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00582}00582                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00583}00583                         \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00584}00584                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00585}00585         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00586}00586         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00587}00587         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00588}00588                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00589}00589                 \mbox{\hyperlink{g__raid3_8c_a8bbcd1274b79133ba020080d67593a30}{g\_raid3\_disconnect\_consumer}}(sc, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00590}00590                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00591}00591                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00592}00592                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00593}00593         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00594}00594                 KASSERT(0 == 1, (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00595}00595                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00596}00596                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00597}00597         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00598}00598         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00599}00599 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00600}00600 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00601}00601 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00602}\mbox{\hyperlink{g__raid3_8c_a51fc254533ec029f9faf8f7d196f7067}{00602}} \mbox{\hyperlink{g__raid3_8c_a51fc254533ec029f9faf8f7d196f7067}{g\_raid3\_destroy\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00603}00603 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00604}00604         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00605}00605         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00606}00606         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00607}00607         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00608}00608         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00610}00610         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00611}00611         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00613}00613         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00614}00614         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00615}00615                 \mbox{\hyperlink{g__raid3_8c_a35bf66296c96a7aacaa8964e10182d8e}{g\_raid3\_destroy\_provider}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00616}00616         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00617}00617                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00618}00618                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00619}00619                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00620}00620                         \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00621}00621                         \mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{g\_raid3\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00622}00622                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00623}00623         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00624}00624         \textcolor{keywordflow}{while} ((ep = \mbox{\hyperlink{g__raid3_8c_acb3ca1e5b06d6685a64a6ac50fe7e54d}{g\_raid3\_event\_get}}(sc)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00625}00625                 \mbox{\hyperlink{g__raid3_8c_a718a9f874e49c00038ab04477a6ac9b3}{g\_raid3\_event\_remove}}(sc, ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00626}00626                 \textcolor{keywordflow}{if} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00627}00627                         \mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{g\_raid3\_event\_free}}(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00628}00628                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00629}00629                         ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} = ECANCELED;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00630}00630                         ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} |= \mbox{\hyperlink{g__raid3_8h_afdccc70d271f9888f7945de34fba2c7c}{G\_RAID3\_EVENT\_DONE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00631}00631                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_, ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00632}00632                         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00633}00633                         wakeup(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00634}00634                         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00635}00635                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00636}00636         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00637}00637         callout\_drain(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a19d603e7447071147b944e92c3386dfc}{sc\_callout}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00638}00638         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00639}00639         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00640}00640         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00641}00641                 \mbox{\hyperlink{g__raid3_8c_a8bbcd1274b79133ba020080d67593a30}{g\_raid3\_disconnect\_consumer}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00642}00642         \mbox{\hyperlink{geom_8h_a87a0eb5de79ed5e49fcfec012f213c9b}{g\_wither\_geom}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00643}00643         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s destroyed."{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00644}00644         \mbox{\hyperlink{geom_8h_a87a0eb5de79ed5e49fcfec012f213c9b}{g\_wither\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00645}00645         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00646}00646         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00647}00647                 uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00648}00648                 uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00649}00649                 uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00650}00650         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00651}00651         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00652}00652         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00653}00653         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00654}00654         sx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00655}00655 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00656}00656 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00657}00657 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00658}\mbox{\hyperlink{g__raid3_8c_abdf016931111fa8a9b7a39a05605af79}{00658}} \mbox{\hyperlink{g__raid3_8c_abdf016931111fa8a9b7a39a05605af79}{g\_raid3\_orphan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00659}00659 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00660}00660         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00661}00661 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00662}00662         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00663}00663 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00664}00664         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00665}00665         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00666}00666                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00667}00667         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc-\/>sc\_bump\_id = \mbox{\hyperlink{g__raid3_8h_acd04b9ef99451674f75b121c61e7e0f9}{G\_RAID3\_BUMP\_SYNCID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00668}00668         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00669}00669             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00670}00670 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00671}00671 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00672}00672 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00673}\mbox{\hyperlink{g__raid3_8c_adbf480cafee8516de6f2c97c8c3bd9b5}{00673}} \mbox{\hyperlink{g__raid3_8c_adbf480cafee8516de6f2c97c8c3bd9b5}{g\_raid3\_write\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00674}00674 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00675}00675         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00676}00676         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00677}00677         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00678}00678         u\_char *sector;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00679}00679         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00680}00680 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00681}00681         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00682}00682         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00683}00683         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00684}00684 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00685}00685         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00686}00686         KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL, (\textcolor{stringliteral}{"{}NULL consumer (\%s)."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00687}00687         KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}} != NULL, (\textcolor{stringliteral}{"{}NULL provider (\%s)."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00688}00688         KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00689}00689             (\textcolor{stringliteral}{"{}Consumer \%s closed? (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00690}00690             \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00691}00691         \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00692}00692         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00693}00693         sector = malloc((\textcolor{keywordtype}{size\_t})\mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}}, M\_RAID3, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00694}00694         \textcolor{keywordflow}{if} (md != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00695}00695                 \mbox{\hyperlink{g__raid3_8h_a878aa6351f9e614a75e848a062fcd6a3}{raid3\_metadata\_encode}}(md, sector);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00696}00696         error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, sector, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00697}00697         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sector, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00698}00698         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00699}00699                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00700}00700                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot write metadata on \%s "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00701}00701                             \textcolor{stringliteral}{"{}(device=\%s, error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00702}00702                             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name, error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00703}00703                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00704}00704                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00705}00705                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot write metadata on \%s "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00706}00706                             \textcolor{stringliteral}{"{}(device=\%s, error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00707}00707                             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name, error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00708}00708                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00709}00709                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{g\_raid3\_disconnect\_on\_failure}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00710}00710                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00711}00711                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00712}00712                         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00713}00713                             \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00714}00714                             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00715}00715                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00716}00716         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00717}00717         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00718}00718 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00720}00720 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00721}\mbox{\hyperlink{g__raid3_8c_a103d19ab81b882f6e9a94764ca3ab6db}{00721}} \mbox{\hyperlink{g__raid3_8c_a103d19ab81b882f6e9a94764ca3ab6db}{g\_raid3\_clear\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00722}00722 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00723}00723         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00725}00725         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00726}00726         sx\_assert(\&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc-\/>sc\_lock, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00727}00727 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00728}00728         error = \mbox{\hyperlink{g__raid3_8c_adbf480cafee8516de6f2c97c8c3bd9b5}{g\_raid3\_write\_metadata}}(\mbox{\hyperlink{structdisk}{disk}}, NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00729}00729         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00730}00730                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Metadata on \%s cleared."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00731}00731                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00732}00732         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00733}00733                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00734}00734                     \textcolor{stringliteral}{"{}Cannot clear metadata on disk \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00735}00735                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00736}00736         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00737}00737         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00738}00738 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00740}00740 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00741}\mbox{\hyperlink{g__raid3_8c_a3176876f4870f1f43c10ca247f2bf5c6}{00741}} \mbox{\hyperlink{g__raid3_8c_a3176876f4870f1f43c10ca247f2bf5c6}{g\_raid3\_fill\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00742}00742 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00743}00743         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00744}00744         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00746}00746         bzero(md, \textcolor{keyword}{sizeof}(*md));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00747}00747         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00748}00748         strlcpy(md-\/>\mbox{\hyperlink{structg__raid3__metadata_a6afc0b5867f32dc50d230086f0cbd583}{md\_magic}}, \mbox{\hyperlink{g__raid3_8h_a8bef29a737244aeb885e796f9be1e8e9}{G\_RAID3\_MAGIC}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__raid3__metadata_a6afc0b5867f32dc50d230086f0cbd583}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00749}00749         md-\/>\mbox{\hyperlink{structg__raid3__metadata_a1f20d30bb3c841206af6b0974cf7207f}{md\_version}} = \mbox{\hyperlink{g__raid3_8h_a115da3b66392aa82089d7a767734d0d9}{G\_RAID3\_VERSION}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00750}00750         strlcpy(md-\/>\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}}, sc-\/>sc\_name, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00751}00751         md-\/>\mbox{\hyperlink{structg__raid3__metadata_ad5e1967c9fb4431227df8752beb43b83}{md\_id}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad7f46106047c0e4fa1fe3203a72a6aaf}{sc\_id}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00752}00752         md-\/>\mbox{\hyperlink{structg__raid3__metadata_a5a4ebca0d975d5566cf73b4decaeac7a}{md\_all}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00753}00753         md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8427865226439b0cfca50232b7c41f12}{md\_genid}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00754}00754         md-\/>\mbox{\hyperlink{structg__raid3__metadata_a18248f9dd03aad04c689d4e2148da9b6}{md\_mediasize}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00755}00755         md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00756}00756         md-\/>\mbox{\hyperlink{structg__raid3__metadata_aaee866d4bf17205839a57362566ed577}{md\_mflags}} = (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a8476eba0a9f686e33d337bf13e419e9c}{G\_RAID3\_DEVICE\_FLAG\_MASK}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00757}00757         md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_no;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00758}00758         md-\/>\mbox{\hyperlink{structg__raid3__metadata_acd2aed4c1f529d8f3166aed6a052acb7}{md\_syncid}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00759}00759         md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8408d4e788a104cc683bcb361cc8feee}{md\_dflags}} = (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ad349a5fe58c8a17aa5421ecbca716c0e}{G\_RAID3\_DISK\_FLAG\_MASK}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00760}00760         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00761}00761                 md-\/>\mbox{\hyperlink{structg__raid3__metadata_a7fafc14ec30e6d39c6348588b24d3d66}{md\_sync\_offset}} =}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00762}00762                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset\_done / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00763}00763         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00764}00764         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL \&\& \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00765}00765                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00766}00766         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00767}00767                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00768}00768         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a716568d6e59e37d05e95bda2ce7e6e8c}{G\_RAID3\_DISK\_FLAG\_HARDCODED}}) != 0 \&\& \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00769}00769                 strlcpy(md-\/>\mbox{\hyperlink{structg__raid3__metadata_ac421dfa4e0c0df94e903f34678f539da}{md\_provider}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__raid3__metadata_ac421dfa4e0c0df94e903f34678f539da}{md\_provider}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00770}00770         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00771}00771                 md-\/>\mbox{\hyperlink{structg__raid3__metadata_a381b7ff0993cad7f7beac9c92ab9578a}{md\_provsize}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00772}00772 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00774}00774 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00775}\mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{00775}} \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00776}00776 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00777}00777         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00778}00778         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00779}00779         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00780}00780 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00781}00781         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00782}00782         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00783}00783         sx\_assert(\&sc-\/>sc\_lock, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00784}00784 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00785}00785         \mbox{\hyperlink{g__raid3_8c_a3176876f4870f1f43c10ca247f2bf5c6}{g\_raid3\_fill\_metadata}}(\mbox{\hyperlink{structdisk}{disk}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00786}00786         error = \mbox{\hyperlink{g__raid3_8c_adbf480cafee8516de6f2c97c8c3bd9b5}{g\_raid3\_write\_metadata}}(\mbox{\hyperlink{structdisk}{disk}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00787}00787         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00788}00788                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Metadata on \%s updated."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00789}00789                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00790}00790         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00791}00791                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00792}00792                     \textcolor{stringliteral}{"{}Cannot update metadata on disk \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00793}00793                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00794}00794         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00795}00795 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00796}00796 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00797}00797 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00798}\mbox{\hyperlink{g__raid3_8c_a5ca498e40450cfe71b6a488a3b67810d}{00798}} \mbox{\hyperlink{g__raid3_8c_a5ca498e40450cfe71b6a488a3b67810d}{g\_raid3\_bump\_syncid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00799}00799 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00800}00800         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00801}00801         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00803}00803         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00804}00804         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00805}00805         KASSERT(\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) > 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00806}00806             (\textcolor{stringliteral}{"{}\%s called with no active disks (device=\%s)."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00807}00807             sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00808}00808 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00809}00809         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00810}00810         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s: syncid bumped to \%u."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00811}00811             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00812}00812         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00813}00813                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00814}00814                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00815}00815                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00816}00816                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00817}00817                         \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00818}00818                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00819}00819         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00820}00820 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00822}00822 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00823}\mbox{\hyperlink{g__raid3_8c_af2e680b64d8a7407fd71ec9c36469986}{00823}} \mbox{\hyperlink{g__raid3_8c_af2e680b64d8a7407fd71ec9c36469986}{g\_raid3\_bump\_genid}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00824}00824 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00825}00825         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00826}00826         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00827}00827 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00828}00828         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00829}00829         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00830}00830         KASSERT(\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) > 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00831}00831             (\textcolor{stringliteral}{"{}\%s called with no active disks (device=\%s)."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00832}00832             sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00834}00834         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00835}00835         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s: genid bumped to \%u."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00836}00836             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00837}00837         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00838}00838                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00839}00839                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00840}00840                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00841}00841                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00842}00842                         \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00843}00843                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00844}00844         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00845}00845 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00846}00846 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00847}00847 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00848}\mbox{\hyperlink{g__raid3_8c_a04b035fceb386b932e93a04447edc72f}{00848}} \mbox{\hyperlink{g__raid3_8c_a04b035fceb386b932e93a04447edc72f}{g\_raid3\_idle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{int} acw)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00849}00849 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00850}00850         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00851}00851         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00852}00852         \textcolor{keywordtype}{int} timeout;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00853}00853 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00854}00854         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00855}00855         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00856}00856 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00857}00857         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00858}00858                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00859}00859         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_acd0b9737417b02e49e34410aca1a4407}{G\_RAID3\_DEVICE\_FLAG\_NOFAILSYNC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00860}00860                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00861}00861         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00862}00862                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00863}00863         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_acd47263f78491b4d94e4f15afc52d4ef}{sc\_writes}} > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00864}00864                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00865}00865         \textcolor{keywordflow}{if} (acw > 0 || (acw == -\/1 \&\& sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} > 0)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00866}00866                 timeout = \mbox{\hyperlink{g__raid3_8c_aba8a6096547b0b81ff575dd5fd7dc211}{g\_raid3\_idletime}} -\/ (time\_uptime -\/ sc-\/>\mbox{\hyperlink{structg__raid3__softc_a7ee1d5a0fdb55a5c2a04e896b5c43477}{sc\_last\_write}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00867}00867                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_a042266d8a642d531324027bbb446c614}{g\_raid3\_shutdown}} \&\& timeout > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00868}00868                         \textcolor{keywordflow}{return} (timeout);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00869}00869         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00870}00870         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}} = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00871}00871         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00872}00872                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[i];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00873}00873                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00874}00874                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00875}00875                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s (device \%s) marked as clean."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00876}00876                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00877}00877                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00878}00878                 \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00879}00879         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00880}00880         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00881}00881 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00882}00882 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00883}00883 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00884}\mbox{\hyperlink{g__raid3_8c_afe1d21402624db1b51f1e20c0c1955bd}{00884}} \mbox{\hyperlink{g__raid3_8c_afe1d21402624db1b51f1e20c0c1955bd}{g\_raid3\_unidle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00885}00885 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00886}00886         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00887}00887         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00888}00888 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00889}00889         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00890}00890         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00892}00892         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_acd0b9737417b02e49e34410aca1a4407}{G\_RAID3\_DEVICE\_FLAG\_NOFAILSYNC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00893}00893                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00894}00894         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00895}00895         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a7ee1d5a0fdb55a5c2a04e896b5c43477}{sc\_last\_write}} = time\_uptime;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00896}00896         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00897}00897                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[i];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00898}00898                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00899}00899                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00900}00900                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s (device \%s) marked as dirty."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00901}00901                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00902}00902                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00903}00903                 \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00904}00904         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00905}00905 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00906}00906 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00907}00907 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00908}00908 \textcolor{comment}{ * Treat bio\_driver1 field in parent bio as list head and field bio\_caller1}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00909}00909 \textcolor{comment}{ * in child bio as pointer to the next element on the list.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00910}00910 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00911}\mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{00911}} \textcolor{preprocessor}{\#define G\_RAID3\_HEAD\_BIO(pbp)   (pbp)-\/>bio\_driver1}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00913}\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{00913}} \textcolor{preprocessor}{\#define G\_RAID3\_NEXT\_BIO(cbp)   (cbp)-\/>bio\_caller1}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00914}00914 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00915}\mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{00915}} \textcolor{preprocessor}{\#define G\_RAID3\_FOREACH\_BIO(pbp, bp)                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00916}00916 \textcolor{preprocessor}{        for ((bp) = G\_RAID3\_HEAD\_BIO(pbp); (bp) != NULL;                \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00917}00917 \textcolor{preprocessor}{            (bp) = G\_RAID3\_NEXT\_BIO(bp))}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00919}\mbox{\hyperlink{g__raid3_8c_ae57ffe6ee0366a5bcd8e5e27a9dd6608}{00919}} \textcolor{preprocessor}{\#define G\_RAID3\_FOREACH\_SAFE\_BIO(pbp, bp, tmpbp)                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00920}00920 \textcolor{preprocessor}{        for ((bp) = G\_RAID3\_HEAD\_BIO(pbp);                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00921}00921 \textcolor{preprocessor}{            (bp) != NULL \&\& ((tmpbp) = G\_RAID3\_NEXT\_BIO(bp), 1);        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00922}00922 \textcolor{preprocessor}{            (bp) = (tmpbp))}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00923}00923 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00924}00924 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00925}\mbox{\hyperlink{g__raid3_8c_aed6b428c071943382b779c351c9197ce}{00925}} \mbox{\hyperlink{g__raid3_8c_aed6b428c071943382b779c351c9197ce}{g\_raid3\_init\_bio}}(\textcolor{keyword}{struct} bio *pbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00926}00926 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00927}00927 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00928}00928         \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00929}00929 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00931}00931 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00932}\mbox{\hyperlink{g__raid3_8c_a3050222c9379cf32b54601c24b7dda95}{00932}} \mbox{\hyperlink{g__raid3_8c_a3050222c9379cf32b54601c24b7dda95}{g\_raid3\_remove\_bio}}(\textcolor{keyword}{struct} bio *cbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00933}00933 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00934}00934         \textcolor{keyword}{struct }bio *pbp, *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00935}00935 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00936}00936         pbp = cbp-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00937}00937         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) == cbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00938}00938                 \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) = \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00939}00939         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00940}00940                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00941}00941                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00942}00942                                 \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) = \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00943}00943                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00944}00944                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00945}00945                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00946}00946         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00947}00947         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00948}00948 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00950}00950 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00951}\mbox{\hyperlink{g__raid3_8c_a16a97ace01e4c3c1b6353dc4f67fc569}{00951}} \mbox{\hyperlink{g__raid3_8c_a16a97ace01e4c3c1b6353dc4f67fc569}{g\_raid3\_replace\_bio}}(\textcolor{keyword}{struct} bio *sbp, \textcolor{keyword}{struct} bio *dbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00952}00952 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00953}00953         \textcolor{keyword}{struct }bio *pbp, *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00954}00954 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00955}00955         \mbox{\hyperlink{g__raid3_8c_a3050222c9379cf32b54601c24b7dda95}{g\_raid3\_remove\_bio}}(sbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00956}00956         pbp = dbp-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00957}00957         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(sbp) = \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(dbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00958}00958         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) == dbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00959}00959                 \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) = sbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00960}00960         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00961}00961                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00962}00962                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == dbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00963}00963                                 \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) = sbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00964}00964                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00965}00965                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00966}00966                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00967}00967         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00968}00968         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(dbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00969}00969 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00971}00971 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00972}\mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{00972}} \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *cbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00973}00973 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00974}00974         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, *pbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00975}00975         \textcolor{keywordtype}{size\_t} size;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00976}00976 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00977}00977         pbp = cbp-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00978}00978         pbp-\/>bio\_children-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00979}00979         KASSERT(cbp-\/>bio\_data != NULL, (\textcolor{stringliteral}{"{}NULL bio\_data"{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00980}00980         size = pbp-\/>bio\_length / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00981}00981         \mbox{\hyperlink{g__raid3_8c_a31af6abde8c7ae707e395c34d909ee70}{g\_raid3\_free}}(sc, cbp-\/>bio\_data, size);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00982}00982         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) == cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00983}00983                 \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) = \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00984}00984                 \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00985}00985                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00986}00986         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00987}00987                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00988}00988                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == cbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00989}00989                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00990}00990                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00991}00991                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00992}00992                         KASSERT(\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) != NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00993}00993                             (\textcolor{stringliteral}{"{}NULL bp-\/>bio\_driver1"{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00994}00994                         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) = \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00995}00995                         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00996}00996                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00997}00997                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00998}00998         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l00999}00999 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01001}01001 \textcolor{keyword}{static} \textcolor{keyword}{struct }bio *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01002}\mbox{\hyperlink{g__raid3_8c_a5dad65beefbae95e150fbbcc1a52f458}{01002}} \mbox{\hyperlink{g__raid3_8c_a5dad65beefbae95e150fbbcc1a52f458}{g\_raid3\_clone\_bio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *pbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01003}01003 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01004}01004         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, *cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01005}01005         \textcolor{keywordtype}{size\_t} size;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01006}01006         \textcolor{keywordtype}{int} memflag;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01008}01008         cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01009}01009         \textcolor{keywordflow}{if} (cbp == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01010}01010                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01011}01011         size = pbp-\/>bio\_length / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01012}01012         \textcolor{keywordflow}{if} ((pbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a484371371fcc5c4d1fcd8756606ec454}{G\_RAID3\_BIO\_CFLAG\_REGULAR}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01013}01013                 memflag = M\_WAITOK;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01014}01014         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01015}01015                 memflag = M\_NOWAIT;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01016}01016         cbp-\/>bio\_data = \mbox{\hyperlink{g__raid3_8c_aee920b9611a5b43ebddc9d3ac8265344}{g\_raid3\_alloc}}(sc, size, memflag);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01017}01017         \textcolor{keywordflow}{if} (cbp-\/>bio\_data == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01018}01018                 pbp-\/>bio\_children-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01019}01019                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01020}01020                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01022}01022         \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(cbp) = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01023}01023         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01024}01024                 \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp) = cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01025}01025         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01026}01026                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01027}01027                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01028}01028                                 \mbox{\hyperlink{g__raid3_8c_a332eb9e26645be6ec5f202ebe924eef2}{G\_RAID3\_NEXT\_BIO}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) = cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01029}01029                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01030}01030                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01031}01031                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01032}01032         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01033}01033         \textcolor{keywordflow}{return} (cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01034}01034 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01036}01036 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01037}\mbox{\hyperlink{g__raid3_8c_a6168aa8569272c9d8dcf2c32fbbdd4ec}{01037}} \mbox{\hyperlink{g__raid3_8c_a6168aa8569272c9d8dcf2c32fbbdd4ec}{g\_raid3\_scatter}}(\textcolor{keyword}{struct} bio *pbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01038}01038 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01039}01039         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01040}01040         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01041}01041         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, *cbp, *tmpbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01042}01042         off\_t atom, cadd, padd, left;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01043}01043         \textcolor{keywordtype}{int} first;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01045}01045         sc = pbp-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01046}01046         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01047}01047         \textcolor{keywordflow}{if} ((pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_aaef52036436beaa135b20ef43002c628}{G\_RAID3\_BIO\_PFLAG\_NOPARITY}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01048}01048                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01049}01049 \textcolor{comment}{                 * Find bio for which we should calculate data.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01050}01050 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01051}01051                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01052}01052                         \textcolor{keywordflow}{if} ((cbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01053}01053                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01054}01054                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01055}01055                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01056}01056                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01057}01057                 KASSERT(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} != NULL, (\textcolor{stringliteral}{"{}NULL parity bio."{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01058}01058         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01059}01059         atom = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01060}01060         cadd = padd = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01061}01061         \textcolor{keywordflow}{for} (left = pbp-\/>bio\_length; left > 0; left -\/= sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01062}01062                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01063}01063                         \textcolor{keywordflow}{if} (cbp == \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01064}01064                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01065}01065                         bcopy(pbp-\/>bio\_data + padd, cbp-\/>bio\_data + cadd, atom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01066}01066                         padd += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01067}01067                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01068}01068                 cadd += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01069}01069         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01070}01070         \textcolor{keywordflow}{if} ((pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_aaef52036436beaa135b20ef43002c628}{G\_RAID3\_BIO\_PFLAG\_NOPARITY}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01071}01071                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01072}01072 \textcolor{comment}{                 * Calculate parity.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01073}01073 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01074}01074                 first = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01075}01075                 \mbox{\hyperlink{g__raid3_8c_ae57ffe6ee0366a5bcd8e5e27a9dd6608}{G\_RAID3\_FOREACH\_SAFE\_BIO}}(pbp, cbp, tmpbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01076}01076                         \textcolor{keywordflow}{if} (cbp == \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01077}01077                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01078}01078                         \textcolor{keywordflow}{if} (first) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01079}01079                                 bcopy(cbp-\/>bio\_data, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01080}01080                                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01081}01081                                 first = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01082}01082                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01083}01083                                 \mbox{\hyperlink{g__raid3_8c_a059e942e2dc5e776f624c1f437ad6f1c}{g\_raid3\_xor}}(cbp-\/>bio\_data, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01084}01084                                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01085}01085                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01086}01086                         \textcolor{keywordflow}{if} ((cbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_ab12e298f51bfafcad4954f5e3927f744}{G\_RAID3\_BIO\_CFLAG\_NODISK}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01087}01087                                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01088}01088                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01089}01089         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01090}01090         \mbox{\hyperlink{g__raid3_8c_ae57ffe6ee0366a5bcd8e5e27a9dd6608}{G\_RAID3\_FOREACH\_SAFE\_BIO}}(pbp, cbp, tmpbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01091}01091                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01092}01092 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01093}01093                 \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01094}01094                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01095}01095                 cbp-\/>bio\_to = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01096}01096                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, cbp, \textcolor{stringliteral}{"{}Sending request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01097}01097                 KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01098}01098                     (\textcolor{stringliteral}{"{}Consumer \%s not opened (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01099}01099                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01100}01100                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01101}01101                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_acd47263f78491b4d94e4f15afc52d4ef}{sc\_writes}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01102}01102                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01103}01103         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01104}01104 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01105}01105 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01106}01106 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01107}\mbox{\hyperlink{g__raid3_8c_aa34b69f24c51e90912268ded58bd1835}{01107}} \mbox{\hyperlink{g__raid3_8c_aa34b69f24c51e90912268ded58bd1835}{g\_raid3\_gather}}(\textcolor{keyword}{struct} bio *pbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01108}01108 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01109}01109         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01110}01110         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01111}01111         \textcolor{keyword}{struct }bio *xbp, *fbp, *cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01112}01112         off\_t atom, cadd, padd, left;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01114}01114         sc = pbp-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01115}01115         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01116}01116 \textcolor{comment}{         * Find bio for which we have to calculate data.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01117}01117 \textcolor{comment}{         * While going through this path, check if all requests}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01118}01118 \textcolor{comment}{         * succeeded, if not, deny whole request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01119}01119 \textcolor{comment}{         * If we're in COMPLETE mode, we allow one request to fail,}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01120}01120 \textcolor{comment}{         * so if we find one, we're sending it to the parity consumer.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01121}01121 \textcolor{comment}{         * If there are more failed requests, we deny whole request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01122}01122 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01123}01123         xbp = fbp = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01124}01124         \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01125}01125                 \textcolor{keywordflow}{if} ((cbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01126}01126                         KASSERT(xbp == NULL, (\textcolor{stringliteral}{"{}More than one parity bio."{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01127}01127                         xbp = cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01128}01128                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01129}01129                 \textcolor{keywordflow}{if} (cbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01130}01130                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01131}01131                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01132}01132 \textcolor{comment}{                 * Found failed request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01133}01133 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01134}01134                 \textcolor{keywordflow}{if} (fbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01135}01135                         \textcolor{keywordflow}{if} ((pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_a4850f389aa37342323ccbfef51629946}{G\_RAID3\_BIO\_PFLAG\_DEGRADED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01136}01136                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01137}01137 \textcolor{comment}{                                 * We are already in degraded mode, so we can't}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01138}01138 \textcolor{comment}{                                 * accept any failures.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01139}01139 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01140}01140                                 \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01141}01141                                         pbp-\/>bio\_error = cbp-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01142}01142                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01143}01143                                 fbp = cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01144}01144                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01145}01145                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01146}01146                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01147}01147 \textcolor{comment}{                         * Next failed request, that's too many.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01148}01148 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01149}01149                         \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01150}01150                                 pbp-\/>bio\_error = fbp-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01151}01151                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01152}01152                 \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01153}01153                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01154}01154                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01155}01155                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01156}01156                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01157}01157                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, cbp, \textcolor{stringliteral}{"{}Request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01158}01158                             cbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01159}01159                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01160}01160                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(1, cbp, \textcolor{stringliteral}{"{}Request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01161}01161                             cbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01162}01162                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01163}01163                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{g\_raid3\_disconnect\_on\_failure}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01164}01164                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01165}01165                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01166}01166                         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01167}01167                             \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01168}01168                             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01169}01169                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01170}01170         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01171}01171         \textcolor{keywordflow}{if} (pbp-\/>bio\_error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01172}01172                 \textcolor{keywordflow}{goto} finish;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01173}01173         \textcolor{keywordflow}{if} (fbp != NULL \&\& (pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_a0e5e2cacdd9b5ee7907f1e62bca0495c}{G\_RAID3\_BIO\_PFLAG\_VERIFY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01174}01174                 pbp-\/>bio\_pflags \&= \string~G\_RAID3\_BIO\_PFLAG\_VERIFY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01175}01175                 \textcolor{keywordflow}{if} (xbp != fbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01176}01176                         \mbox{\hyperlink{g__raid3_8c_a16a97ace01e4c3c1b6353dc4f67fc569}{g\_raid3\_replace\_bio}}(xbp, fbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01177}01177                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, fbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01178}01178         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (fbp != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01179}01179                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01181}01181                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01182}01182 \textcolor{comment}{                 * One request failed, so send the same request to}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01183}01183 \textcolor{comment}{                 * the parity consumer.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01184}01184 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01185}01185                 \mbox{\hyperlink{structdisk}{disk}} = pbp-\/>bio\_driver2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01186}01186                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01187}01187                         pbp-\/>bio\_error = fbp-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01188}01188                         \textcolor{keywordflow}{goto} finish;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01189}01189                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01190}01190                 pbp-\/>bio\_pflags |= \mbox{\hyperlink{g__raid3_8h_a4850f389aa37342323ccbfef51629946}{G\_RAID3\_BIO\_PFLAG\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01191}01191                 pbp-\/>bio\_inbed-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01192}01192                 fbp-\/>bio\_flags \&= \string~(BIO\_DONE | BIO\_ERROR);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01193}01193                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_no == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01194}01194                         fbp-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01195}01195                 fbp-\/>bio\_error = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01196}01196                 fbp-\/>bio\_completed = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01197}01197                 fbp-\/>bio\_children = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01198}01198                 fbp-\/>bio\_inbed = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01199}01199                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01200}01200                 fbp-\/>bio\_caller2 = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01201}01201                 fbp-\/>bio\_to = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01202}01202                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, fbp, \textcolor{stringliteral}{"{}Sending request (recover)."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01203}01203                 KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01204}01204                     (\textcolor{stringliteral}{"{}Consumer \%s not opened (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01205}01205                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01206}01206                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01207}01207                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(fbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01208}01208                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01209}01209         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01210}01210         \textcolor{keywordflow}{if} (xbp != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01211}01211                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01212}01212 \textcolor{comment}{                 * Calculate parity.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01213}01213 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01214}01214                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01215}01215                         \textcolor{keywordflow}{if} ((cbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01216}01216                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01217}01217                         \mbox{\hyperlink{g__raid3_8c_a059e942e2dc5e776f624c1f437ad6f1c}{g\_raid3\_xor}}(cbp-\/>bio\_data, xbp-\/>bio\_data,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01218}01218                             xbp-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01219}01219                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01220}01220                 xbp-\/>bio\_cflags \&= \string~G\_RAID3\_BIO\_CFLAG\_PARITY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01221}01221                 \textcolor{keywordflow}{if} ((pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_a0e5e2cacdd9b5ee7907f1e62bca0495c}{G\_RAID3\_BIO\_PFLAG\_VERIFY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01222}01222                         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_af352048209ad695560db6b47298fc1ec}{g\_raid3\_is\_zero}}(xbp)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01223}01223                                 \mbox{\hyperlink{g__raid3_8c_a56e66240e5cf9091139d560920cfe7d3}{g\_raid3\_parity\_mismatch}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01224}01224                                 pbp-\/>bio\_error = EIO;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01225}01225                                 \textcolor{keywordflow}{goto} finish;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01226}01226                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01227}01227                         \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, xbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01228}01228                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01229}01229         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01230}01230         atom = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01231}01231         cadd = padd = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01232}01232         \textcolor{keywordflow}{for} (left = pbp-\/>bio\_length; left > 0; left -\/= sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01233}01233                 \mbox{\hyperlink{g__raid3_8c_a5f967901d6a16094c0e7c425fb52973c}{G\_RAID3\_FOREACH\_BIO}}(pbp, cbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01234}01234                         bcopy(cbp-\/>bio\_data + cadd, pbp-\/>bio\_data + padd, atom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01235}01235                         pbp-\/>bio\_completed += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01236}01236                         padd += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01237}01237                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01238}01238                 cadd += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01239}01239         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01240}01240 finish:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01241}01241         \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01242}01242                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, pbp, \textcolor{stringliteral}{"{}Request finished."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01243}01243         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01244}01244                 \textcolor{keywordflow}{if} ((pbp-\/>bio\_pflags \& \mbox{\hyperlink{g__raid3_8h_a0e5e2cacdd9b5ee7907f1e62bca0495c}{G\_RAID3\_BIO\_PFLAG\_VERIFY}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01245}01245                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(1, pbp, \textcolor{stringliteral}{"{}Verification error."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01246}01246                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01247}01247                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, pbp, \textcolor{stringliteral}{"{}Request failed."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01248}01248         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01249}01249         pbp-\/>bio\_pflags \&= \string~G\_RAID3\_BIO\_PFLAG\_MASK;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01250}01250         \textcolor{keywordflow}{while} ((cbp = \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp)) != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01251}01251                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01252}01252         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(pbp, pbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01253}01253 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01254}01254 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01255}01255 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01256}\mbox{\hyperlink{g__raid3_8c_a446e7de3157c98686aed115f70980e7f}{01256}} \mbox{\hyperlink{g__raid3_8c_a446e7de3157c98686aed115f70980e7f}{g\_raid3\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01257}01257 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01258}01258         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01259}01259 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01260}01260         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01261}01261         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_a484371371fcc5c4d1fcd8756606ec454}{G\_RAID3\_BIO\_CFLAG\_REGULAR}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01262}01262         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Regular request done (error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01263}01263         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01264}01264         bioq\_insert\_head(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01265}01265         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01266}01266         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01267}01267         wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01268}01268 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01269}01269 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01270}01270 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01271}\mbox{\hyperlink{g__raid3_8c_ac735848067cd8601f49bcd015f7fd8f6}{01271}} \mbox{\hyperlink{g__raid3_8c_ac735848067cd8601f49bcd015f7fd8f6}{g\_raid3\_regular\_request}}(\textcolor{keyword}{struct} bio *cbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01272}01272 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01273}01273         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01274}01274         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01275}01275         \textcolor{keyword}{struct }bio *pbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01276}01276 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01277}01277         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01278}01278 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01279}01279         pbp = cbp-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01280}01280         sc = pbp-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01281}01281         cbp-\/>bio\_from-\/>index-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01282}01282         \textcolor{keywordflow}{if} (cbp-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01283}01283                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_acd47263f78491b4d94e4f15afc52d4ef}{sc\_writes}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01284}01284         \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_from-\/>private;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01285}01285         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01286}01286                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01287}01287                 \mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{g\_raid3\_kill\_consumer}}(sc, cbp-\/>bio\_from);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01288}01288                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01289}01289         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01290}01290 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01291}01291         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, cbp, \textcolor{stringliteral}{"{}Request finished."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01292}01292         pbp-\/>bio\_inbed++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01293}01293         KASSERT(pbp-\/>bio\_inbed <= pbp-\/>bio\_children,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01294}01294             (\textcolor{stringliteral}{"{}bio\_inbed (\%u) is bigger than bio\_children (\%u)."{}}, pbp-\/>bio\_inbed,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01295}01295             pbp-\/>bio\_children));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01296}01296         \textcolor{keywordflow}{if} (pbp-\/>bio\_inbed != pbp-\/>bio\_children)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01297}01297                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01298}01298         \textcolor{keywordflow}{switch} (pbp-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01299}01299         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01300}01300                 \mbox{\hyperlink{g__raid3_8c_aa34b69f24c51e90912268ded58bd1835}{g\_raid3\_gather}}(pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01301}01301                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01302}01302         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01303}01303         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01304}01304             \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01305}01305                 \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01307}01307                 pbp-\/>bio\_completed = pbp-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01308}01308                 \textcolor{keywordflow}{while} ((cbp = \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01309}01309                         \textcolor{keywordflow}{if} (cbp-\/>bio\_error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01310}01310                                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01311}01311                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01312}01312                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01313}01313 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01314}01314                         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01315}01315                                 error = cbp-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01316}01316                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01317}01317                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01318}01318 \textcolor{comment}{                                 * Next failed request, that's too many.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01319}01319 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01320}01320                                 pbp-\/>bio\_error = error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01321}01321                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01322}01322 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01323}01323                         \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01324}01324                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01325}01325                                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01326}01326                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01327}01327                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01328}01328 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01329}01329                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01330}01330                                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01331}01331                                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, cbp,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01332}01332                                     \textcolor{stringliteral}{"{}Request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01333}01333                                     cbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01334}01334                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01335}01335                                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(1, cbp,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01336}01336                                     \textcolor{stringliteral}{"{}Request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01337}01337                                     cbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01338}01338                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01339}01339                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a60e2c9dc29c3ab57ec3cdb6b0db6b37f}{g\_raid3\_disconnect\_on\_failure}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01340}01340                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01341}01341                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01342}01342                                 \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01343}01343                                     \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01344}01344                                     \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01345}01345                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01346}01346                         \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01347}01347                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01348}01348                 \textcolor{keywordflow}{if} (pbp-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01349}01349                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, pbp, \textcolor{stringliteral}{"{}Request finished."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01350}01350                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01351}01351                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, pbp, \textcolor{stringliteral}{"{}Request failed."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01352}01352                 pbp-\/>bio\_pflags \&= \string~G\_RAID3\_BIO\_PFLAG\_DEGRADED;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01353}01353                 pbp-\/>bio\_pflags \&= \string~G\_RAID3\_BIO\_PFLAG\_NOPARITY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01354}01354                 bioq\_remove(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a70eaadd87e4099d053da4ff3a3514ec5}{sc\_inflight}}, pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01355}01355                 \textcolor{comment}{/* Release delayed sync requests if possible. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01356}01356                 \mbox{\hyperlink{g__raid3_8c_af696e4f2129ffbf4e465fa926af50894}{g\_raid3\_sync\_release}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01357}01357                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(pbp, pbp-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01358}01358                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01359}01359             \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01360}01360         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01361}01361 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01362}01362 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01363}01363 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01364}\mbox{\hyperlink{g__raid3_8c_a047cd31ea9c5072a28c7b690266a22f0}{01364}} \mbox{\hyperlink{g__raid3_8c_a047cd31ea9c5072a28c7b690266a22f0}{g\_raid3\_sync\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01365}01365 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01366}01366         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01367}01367 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01368}01368         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Synchronization request delivered."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01369}01369         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01370}01370         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_ac55629f9c30f51cc9b4b076e0c90a1ec}{G\_RAID3\_BIO\_CFLAG\_SYNC}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01371}01371         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01372}01372         bioq\_insert\_head(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01373}01373         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01374}01374         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01375}01375         wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01376}01376 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01377}01377 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01378}01378 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01379}\mbox{\hyperlink{g__raid3_8c_af04d197ef6d86fd07538c2a8c7df4b3e}{01379}} \mbox{\hyperlink{g__raid3_8c_af04d197ef6d86fd07538c2a8c7df4b3e}{g\_raid3\_flush}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01380}01380 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01381}01381         \textcolor{keyword}{struct }bio\_queue\_head queue;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01382}01382         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01383}01383         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01384}01384         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01385}01385         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01386}01386 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01387}01387         bioq\_init(\&queue);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01388}01388         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01389}01389                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[i];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01390}01390                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01391}01391                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01392}01392                 cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01393}01393                 \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01394}01394                         \textcolor{keywordflow}{for} (cbp = bioq\_first(\&queue); cbp != NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01395}01395                             cbp = bioq\_first(\&queue)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01396}01396                                 bioq\_remove(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01397}01397                                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01398}01398                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01399}01399                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01400}01400                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01401}01401                         \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__raid3_8c_source_l01402}01402                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01403}01403                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01404}01404                 bioq\_insert\_tail(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01405}01405                 cbp-\/>bio\_done = \mbox{\hyperlink{geom_8h_a3b40808daecd7db79de16471ac14397a}{g\_std\_done}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01406}01406                 cbp-\/>bio\_caller1 = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01407}01407                 cbp-\/>bio\_to = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01408}01408         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01409}01409         \textcolor{keywordflow}{for} (cbp = bioq\_first(\&queue); cbp != NULL; cbp = bioq\_first(\&queue)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01410}01410                 bioq\_remove(\&queue, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01411}01411                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, cbp, \textcolor{stringliteral}{"{}Sending request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01412}01412                 \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01413}01413                 cbp-\/>bio\_caller1 = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01414}01414                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01415}01415                 KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01416}01416                     (\textcolor{stringliteral}{"{}Consumer \%s not opened (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01417}01417                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01418}01418                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01419}01419         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01420}01420 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01421}01421 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01422}01422 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01423}\mbox{\hyperlink{g__raid3_8c_a4a156f60a69d13906d66c907ed0a03cc}{01423}} \mbox{\hyperlink{g__raid3_8c_a4a156f60a69d13906d66c907ed0a03cc}{g\_raid3\_start}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01424}01424 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01425}01425         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01426}01426 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01427}01427         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01428}01428         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01429}01429 \textcolor{comment}{         * If sc == NULL or there are no valid disks, provider's error}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01430}01430 \textcolor{comment}{         * should be set and g\_raid3\_start() should not be called at all.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01431}01431 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01432}01432         KASSERT(sc != NULL \&\& (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01433}01433             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01434}01434             (\textcolor{stringliteral}{"{}Provider's error should be set (error=\%d)(device=\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01435}01435             \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__raid3_8c_source_l01436}01436         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Request received."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01438}01438         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01439}01439         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01440}01440         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01441}01441         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01442}01442                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01443}01443         \textcolor{keywordflow}{case} BIO\_SPEEDUP:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01444}01444         \textcolor{keywordflow}{case} BIO\_FLUSH:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01445}01445                 \mbox{\hyperlink{g__raid3_8c_af04d197ef6d86fd07538c2a8c7df4b3e}{g\_raid3\_flush}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01446}01446                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01447}01447         \textcolor{keywordflow}{case} BIO\_GETATTR:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01448}01448         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01449}01449                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01450}01450                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01451}01451         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01452}01452         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01453}01453         bioq\_insert\_tail(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01454}01454         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01455}01455         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_, sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01456}01456         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01457}01457 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01458}01458 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01459}01459 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01460}01460 \textcolor{comment}{ * Return TRUE if the given request is colliding with a in-\/progress}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01461}01461 \textcolor{comment}{ * synchronization request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01462}01462 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01463}01463 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01464}\mbox{\hyperlink{g__raid3_8c_affb1959c0b0d6d8fa10b0024e789433a}{01464}} \mbox{\hyperlink{g__raid3_8c_affb1959c0b0d6d8fa10b0024e789433a}{g\_raid3\_sync\_collision}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01465}01465 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01466}01466         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01467}01467         \textcolor{keyword}{struct }bio *sbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01468}01468         off\_t rstart, rend, sstart, send;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01469}01469         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01470}01470 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01471}01471         \mbox{\hyperlink{structdisk}{disk}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01472}01472         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01473}01473                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01474}01474         rstart = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01475}01475         rend = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01476}01476         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01477}01477                 sbp = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios[i];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01478}01478                 \textcolor{keywordflow}{if} (sbp == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01479}01479                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01480}01480                 sstart = sbp-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01481}01481                 send = sbp-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01482}01482                 \textcolor{keywordflow}{if} (sbp-\/>bio\_cmd == BIO\_WRITE) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01483}01483                         sstart *= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01484}01484                         send *= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01485}01485                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01486}01486                 send += sstart;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01487}01487                 \textcolor{keywordflow}{if} (rend > sstart \&\& rstart < send)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01488}01488                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01489}01489         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01490}01490         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01491}01491 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01492}01492 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01493}01493 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01494}01494 \textcolor{comment}{ * Return TRUE if the given sync request is colliding with a in-\/progress regular}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01495}01495 \textcolor{comment}{ * request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01496}01496 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01497}01497 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01498}\mbox{\hyperlink{g__raid3_8c_ae8af9dab442ac406f6cddc4cc7c72310}{01498}} \mbox{\hyperlink{g__raid3_8c_ae8af9dab442ac406f6cddc4cc7c72310}{g\_raid3\_regular\_collision}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *sbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01499}01499 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01500}01500         off\_t rstart, rend, sstart, send;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01501}01501         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01502}01502 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01503}01503         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01504}01504                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01505}01505         sstart = sbp-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01506}01506         send = sstart + sbp-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01507}01507         TAILQ\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a70eaadd87e4099d053da4ff3a3514ec5}{sc\_inflight}}.queue, bio\_queue) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01508}01508                 rstart = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01509}01509                 rend = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01510}01510                 \textcolor{keywordflow}{if} (rend > sstart \&\& rstart < send)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01511}01511                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01512}01512         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01513}01513         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01514}01514 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01515}01515 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01516}01516 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01517}01517 \textcolor{comment}{ * Puts request onto delayed queue.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01518}01518 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01519}01519 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01520}\mbox{\hyperlink{g__raid3_8c_a1ecada52c131f5d5345922a7e35e2536}{01520}} \mbox{\hyperlink{g__raid3_8c_a1ecada52c131f5d5345922a7e35e2536}{g\_raid3\_regular\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01521}01521 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01523}01523         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(2, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Delaying request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01524}01524         bioq\_insert\_head(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_af141955c69fb78c6e135fa97f685c3ed}{sc\_regular\_delayed}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01525}01525 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01526}01526 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01527}01527 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01528}01528 \textcolor{comment}{ * Puts synchronization request onto delayed queue.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01529}01529 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01530}01530 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01531}\mbox{\hyperlink{g__raid3_8c_a009842f0e91038d7c1380f3ffc3c44f7}{01531}} \mbox{\hyperlink{g__raid3_8c_a009842f0e91038d7c1380f3ffc3c44f7}{g\_raid3\_sync\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01532}01532 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01533}01533 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01534}01534         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(2, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Delaying synchronization request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01535}01535         bioq\_insert\_tail(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a62a663402e73b66d65791d286a1a09ae}{sc\_sync\_delayed}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01536}01536 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01537}01537 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01538}01538 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01539}01539 \textcolor{comment}{ * Releases delayed regular requests which don't collide anymore with sync}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01540}01540 \textcolor{comment}{ * requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01541}01541 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01542}01542 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01543}\mbox{\hyperlink{g__raid3_8c_a9f7a70e5b9703a1a323b854c882200d8}{01543}} \mbox{\hyperlink{g__raid3_8c_a9f7a70e5b9703a1a323b854c882200d8}{g\_raid3\_regular\_release}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01544}01544 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01545}01545         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, *bp2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01546}01546 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01547}01547         TAILQ\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_af141955c69fb78c6e135fa97f685c3ed}{sc\_regular\_delayed}}.queue, bio\_queue, bp2) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01548}01548                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_affb1959c0b0d6d8fa10b0024e789433a}{g\_raid3\_sync\_collision}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01549}01549                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01550}01550                 bioq\_remove(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_af141955c69fb78c6e135fa97f685c3ed}{sc\_regular\_delayed}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01551}01551                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(2, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Releasing delayed request (\%p)."{}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01552}01552                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01553}01553                 bioq\_insert\_head(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01554}01554 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01555}01555                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01556}01556 \textcolor{comment}{                 * wakeup() is not needed, because this function is called from}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01557}01557 \textcolor{comment}{                 * the worker thread.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01558}01558 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01559}01559                 wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01560}01560 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01561}01561                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01562}01562         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01563}01563 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01564}01564 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01565}01565 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01566}01566 \textcolor{comment}{ * Releases delayed sync requests which don't collide anymore with regular}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01567}01567 \textcolor{comment}{ * requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01568}01568 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01569}01569 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01570}\mbox{\hyperlink{g__raid3_8c_af696e4f2129ffbf4e465fa926af50894}{01570}} \mbox{\hyperlink{g__raid3_8c_af696e4f2129ffbf4e465fa926af50894}{g\_raid3\_sync\_release}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01571}01571 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01572}01572         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, *bp2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01573}01573 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01574}01574         TAILQ\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a62a663402e73b66d65791d286a1a09ae}{sc\_sync\_delayed}}.queue, bio\_queue, bp2) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01575}01575                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_ae8af9dab442ac406f6cddc4cc7c72310}{g\_raid3\_regular\_collision}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01576}01576                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01577}01577                 bioq\_remove(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a62a663402e73b66d65791d286a1a09ae}{sc\_sync\_delayed}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01578}01578                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(2, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01579}01579                     \textcolor{stringliteral}{"{}Releasing delayed synchronization request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01580}01580                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01581}01581         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01582}01582 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01583}01583 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01584}01584 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01585}01585 \textcolor{comment}{ * Handle synchronization requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01586}01586 \textcolor{comment}{ * Every synchronization request is two-\/steps process: first, READ request is}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01587}01587 \textcolor{comment}{ * send to active provider and then WRITE request (with read data) to the provider}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01588}01588 \textcolor{comment}{ * being synchronized. When WRITE is finished, new synchronization request is}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01589}01589 \textcolor{comment}{ * send.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01590}01590 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01591}01591 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01592}\mbox{\hyperlink{g__raid3_8c_a437b90c370ef92211ad8931b9cc1b51a}{01592}} \mbox{\hyperlink{g__raid3_8c_a437b90c370ef92211ad8931b9cc1b51a}{g\_raid3\_sync\_request}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01593}01593 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01594}01594         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01595}01595         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01596}01596 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01597}01597         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>index-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01598}01598         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01599}01599         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>private;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01600}01600         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01601}01601                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}); \textcolor{comment}{/* Avoid recursion on sc\_lock. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01602}01602                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01603}01603                 \mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{g\_raid3\_kill\_consumer}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01604}01604                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01605}01605                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01606}01606                 \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01607}01607                 sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01608}01608                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01609}01609         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01610}01610 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01611}01611         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01612}01612 \textcolor{comment}{         * Synchronization request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01613}01613 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01614}01614         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01615}01615         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01616}01616             \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01617}01617                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01618}01618                 u\_char *dst, *src;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01619}01619                 off\_t left;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01620}01620                 u\_int atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01621}01621 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01622}01622                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01623}01623                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01624}01624                             \textcolor{stringliteral}{"{}Synchronization request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01625}01625                             \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01626}01626                         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01627}01627                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01628}01628                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01629}01629                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Synchronization request finished."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01630}01630                 atom = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01631}01631                 dst = src = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01632}01632                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_no == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01633}01633                         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01634}01634 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01635}01635                         \textcolor{comment}{/* Parity component. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01636}01636                         \textcolor{keywordflow}{for} (left = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length; left > 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01637}01637                             left -\/= sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01638}01638                                 bcopy(src, dst, atom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01639}01639                                 src += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01640}01640                                 \textcolor{keywordflow}{for} (n = 1; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01641}01641                                         \mbox{\hyperlink{g__raid3_8c_a059e942e2dc5e776f624c1f437ad6f1c}{g\_raid3\_xor}}(src, dst, atom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01642}01642                                         src += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01643}01643                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01644}01644                                 dst += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01645}01645                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01646}01646                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01647}01647                         \textcolor{comment}{/* Regular component. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01648}01648                         src += atom * \mbox{\hyperlink{structdisk}{disk}}-\/>d\_no;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01649}01649                         \textcolor{keywordflow}{for} (left = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length; left > 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01650}01650                             left -\/= sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01651}01651                                 bcopy(src, dst, atom);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01652}01652                                 src += sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01653}01653                                 dst += atom;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01654}01654                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01655}01655                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01656}01656                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_driver1 = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_driver2 = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01657}01657                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_pflags = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01658}01658                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset /= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01659}01659                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length /= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01660}01660                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd = BIO\_WRITE;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01661}01661                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01662}01662                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_children = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_inbed = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01663}01663                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01664}01664                 KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01665}01665                     (\textcolor{stringliteral}{"{}Consumer \%s not opened (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01666}01666                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01667}01667                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01668}01668                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01669}01669                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01670}01670             \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01671}01671         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01672}01672             \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01673}01673                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk__sync}{g\_raid3\_disk\_sync}} *sync;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01674}01674                 off\_t boffset, moffset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01675}01675                 \textcolor{keywordtype}{void} *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01676}01676                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01677}01677 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01678}01678                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01679}01679                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(0, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01680}01680                             \textcolor{stringliteral}{"{}Synchronization request failed (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01681}01681                             \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01682}01682                         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01683}01683                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01684}01684                         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01685}01685                             \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01686}01686                             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01687}01687                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01688}01688                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01689}01689                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Synchronization request finished."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01690}01690                 sync = \&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01691}01691                 \textcolor{keywordflow}{if} (sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a87f8a48c6bb9fba8b8e3dc67acac231f}{ds\_offset}} == sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01692}01692                     sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a1855db42ebfe778801d87dd238dde50c}{ds\_consumer}} == NULL ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01693}01693                     (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01694}01694                         \textcolor{comment}{/* Don't send more synchronization requests. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01695}01695                         sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a27b366e3a65355ef92f6ee6e58b82962}{ds\_inflight}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01696}01696                         \textcolor{keywordflow}{if} (sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_ac693dec599e7098eca675a616172b3da}{ds\_bios}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01697}01697                                 i = (int)(uintptr\_t)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01698}01698                                 sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_ac693dec599e7098eca675a616172b3da}{ds\_bios}}[i] = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01699}01699                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01700}01700                         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01701}01701                         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01702}01702                         \textcolor{keywordflow}{if} (sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a27b366e3a65355ef92f6ee6e58b82962}{ds\_inflight}} > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01703}01703                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01704}01704                         \textcolor{keywordflow}{if} (sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a1855db42ebfe778801d87dd238dde50c}{ds\_consumer}} == NULL ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01705}01705                             (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01706}01706                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01707}01707                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01708}01708                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01709}01709 \textcolor{comment}{                         * Disk up-\/to-\/date, activate it.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01710}01710 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01711}01711                         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01712}01712                             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01713}01713                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01714}01714                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01715}01715 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01716}01716                 \textcolor{comment}{/* Send next synchronization request. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01717}01717                 \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01718}01718                 \mbox{\hyperlink{geom_8h_ac7e5011386a1b89e762abf3a1e4fa76b}{g\_reset\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01719}01719                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd = BIO\_READ;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01720}01720                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset = sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a87f8a48c6bb9fba8b8e3dc67acac231f}{ds\_offset}} * (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01721}01721                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = MIN(maxphys, sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01722}01722                 sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a87f8a48c6bb9fba8b8e3dc67acac231f}{ds\_offset}} += \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01723}01723                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_done = \mbox{\hyperlink{g__raid3_8c_a047cd31ea9c5072a28c7b690266a22f0}{g\_raid3\_sync\_done}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01724}01724                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01725}01725                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from = sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a1855db42ebfe778801d87dd238dde50c}{ds\_consumer}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01726}01726                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to = sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01727}01727                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Sending synchronization request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01728}01728                 sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a1855db42ebfe778801d87dd238dde50c}{ds\_consumer}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01729}01729                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01730}01730 \textcolor{comment}{                 * Delay the request if it is colliding with a regular request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01731}01731 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01732}01732                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_ae8af9dab442ac406f6cddc4cc7c72310}{g\_raid3\_regular\_collision}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01733}01733                         \mbox{\hyperlink{g__raid3_8c_a009842f0e91038d7c1380f3ffc3c44f7}{g\_raid3\_sync\_delay}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01734}01734                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01735}01735                         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a1855db42ebfe778801d87dd238dde50c}{ds\_consumer}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01736}01736 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01737}01737                 \textcolor{comment}{/* Release delayed requests if possible. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01738}01738                 \mbox{\hyperlink{g__raid3_8c_a9f7a70e5b9703a1a323b854c882200d8}{g\_raid3\_regular\_release}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01739}01739 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01740}01740                 \textcolor{comment}{/* Find the smallest offset. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01741}01741                 moffset = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01742}01742                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01743}01743                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_ac693dec599e7098eca675a616172b3da}{ds\_bios}}[i];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01744}01744                         boffset = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01745}01745                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01746}01746                                 boffset *= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01747}01747                         \textcolor{keywordflow}{if} (boffset < moffset)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01748}01748                                 moffset = boffset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01749}01749                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01750}01750                 \textcolor{keywordflow}{if} (sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a6041b9fa190a6d7c4d9f66e1baf6b33d}{ds\_offset\_done}} + maxphys * 100 < moffset) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01751}01751                         \textcolor{comment}{/* Update offset\_done on every 100 blocks. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01752}01752                         sync-\/>\mbox{\hyperlink{structg__raid3__disk__sync_a6041b9fa190a6d7c4d9f66e1baf6b33d}{ds\_offset\_done}} = moffset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01753}01753                         \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01754}01754                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01755}01755                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01756}01756             \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01757}01757         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01758}01758                 KASSERT(1 == 0, (\textcolor{stringliteral}{"{}Invalid command here: \%u (device=\%s)"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01759}01759                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01760}01760                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01761}01761         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01762}01762 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01763}01763 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01764}01764 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01765}\mbox{\hyperlink{g__raid3_8c_a426292df09f88efb8272c9177d85a066}{01765}} \mbox{\hyperlink{g__raid3_8c_a426292df09f88efb8272c9177d85a066}{g\_raid3\_register\_request}}(\textcolor{keyword}{struct} bio *pbp)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01766}01766 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01767}01767         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01768}01768         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01769}01769         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01770}01770         \textcolor{keyword}{struct }bio *cbp, *tmpbp;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01771}01771         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01772}01772         u\_int n, ndisks;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01773}01773         \textcolor{keywordtype}{int} round\_robin, verify;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01774}01774 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01775}01775         ndisks = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01776}01776         sc = pbp-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01777}01777         \textcolor{keywordflow}{if} ((pbp-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a2de573c5e57f73ec8b0f76f724e2fc0a}{G\_RAID3\_BIO\_CFLAG\_REGSYNC}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01778}01778             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01779}01779                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(pbp, EIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01780}01780                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01781}01781         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01782}01782         \mbox{\hyperlink{g__raid3_8c_aed6b428c071943382b779c351c9197ce}{g\_raid3\_init\_bio}}(pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01783}01783         \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = pbp-\/>bio\_length / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01784}01784         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = pbp-\/>bio\_offset / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01785}01785         round\_robin = verify = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01786}01786         \textcolor{keywordflow}{switch} (pbp-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01787}01787         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01788}01788                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a4b40ddb04da52a14bd04c8761802a99f}{G\_RAID3\_DEVICE\_FLAG\_VERIFY}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01789}01789                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01790}01790                         pbp-\/>bio\_pflags |= \mbox{\hyperlink{g__raid3_8h_a0e5e2cacdd9b5ee7907f1e62bca0495c}{G\_RAID3\_BIO\_PFLAG\_VERIFY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01791}01791                         verify = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01792}01792                         ndisks = sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01793}01793                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01794}01794                         verify = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01795}01795                         ndisks = sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01796}01796                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01797}01797                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a3fea077718788462e655b1363fe0bcc9}{G\_RAID3\_DEVICE\_FLAG\_ROUND\_ROBIN}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01798}01798                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01799}01799                         round\_robin = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01800}01800                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01801}01801                         round\_robin = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01802}01802                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01803}01803                 KASSERT(!round\_robin || !verify,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01804}01804                     (\textcolor{stringliteral}{"{}ROUND-\/ROBIN and VERIFY are mutually exclusive."{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01805}01805                 pbp-\/>bio\_driver2 = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01806}01806                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01807}01807         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01808}01808         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01809}01809                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01810}01810 \textcolor{comment}{                 * Delay the request if it is colliding with a synchronization}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01811}01811 \textcolor{comment}{                 * request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01812}01812 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01813}01813                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_affb1959c0b0d6d8fa10b0024e789433a}{g\_raid3\_sync\_collision}}(sc, pbp)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01814}01814                         \mbox{\hyperlink{g__raid3_8c_a1ecada52c131f5d5345922a7e35e2536}{g\_raid3\_regular\_delay}}(sc, pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01815}01815                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01816}01816                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01817}01817 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01818}01818                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01819}01819                         \mbox{\hyperlink{g__raid3_8c_afe1d21402624db1b51f1e20c0c1955bd}{g\_raid3\_unidle}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01820}01820                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01821}01821                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a7ee1d5a0fdb55a5c2a04e896b5c43477}{sc\_last\_write}} = time\_uptime;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01822}01822 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01823}01823                 ndisks = sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01824}01824                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01825}01825         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01826}01826         \textcolor{keywordflow}{for} (n = 0; n < ndisks; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01827}01827                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01828}01828                 cbp = \mbox{\hyperlink{g__raid3_8c_a5dad65beefbae95e150fbbcc1a52f458}{g\_raid3\_clone\_bio}}(sc, pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01829}01829                 \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01830}01830                         \textcolor{keywordflow}{while} ((cbp = \mbox{\hyperlink{g__raid3_8c_a49fb75e7f330f8e18d3cc7153f4d07a6}{G\_RAID3\_HEAD\_BIO}}(pbp)) != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01831}01831                                 \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01832}01832                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01833}01833 \textcolor{comment}{                         * To prevent deadlock, we must run back up}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01834}01834 \textcolor{comment}{                         * with the ENOMEM for failed requests of any}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01835}01835 \textcolor{comment}{                         * of our consumers.  Our own sync requests}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01836}01836 \textcolor{comment}{                         * can stick around, as they are finite.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01837}01837 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01838}01838                         \textcolor{keywordflow}{if} ((pbp-\/>bio\_cflags \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01839}01839                             \mbox{\hyperlink{g__raid3_8h_a484371371fcc5c4d1fcd8756606ec454}{G\_RAID3\_BIO\_CFLAG\_REGULAR}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01840}01840                                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(pbp, ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01841}01841                                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01842}01842                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01843}01843                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01844}01844                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01845}01845                 cbp-\/>bio\_offset = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01846}01846                 cbp-\/>bio\_length = \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01847}01847                 cbp-\/>bio\_done = \mbox{\hyperlink{g__raid3_8c_a446e7de3157c98686aed115f70980e7f}{g\_raid3\_done}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01848}01848                 \textcolor{keywordflow}{switch} (pbp-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01849}01849                 \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01850}01850                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01851}01851                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01852}01852 \textcolor{comment}{                                 * Replace invalid component with the parity}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01853}01853 \textcolor{comment}{                                 * component.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01854}01854 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01855}01855                                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01856}01856                                 cbp-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01857}01857                                 pbp-\/>bio\_pflags |= \mbox{\hyperlink{g__raid3_8h_a4850f389aa37342323ccbfef51629946}{G\_RAID3\_BIO\_PFLAG\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01858}01858                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (round\_robin \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01859}01859                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_no == sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad30ebb5f1f01e4ed9516342420bea2c2}{sc\_round\_robin}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01860}01860                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01861}01861 \textcolor{comment}{                                 * In round-\/robin mode skip one data component}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01862}01862 \textcolor{comment}{                                 * and use parity component when reading.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01863}01863 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01864}01864                                 pbp-\/>bio\_driver2 = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01865}01865                                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01866}01866                                 cbp-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01867}01867                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad30ebb5f1f01e4ed9516342420bea2c2}{sc\_round\_robin}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01868}01868                                 round\_robin = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01869}01869                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (verify \&\& \mbox{\hyperlink{structdisk}{disk}}-\/>d\_no == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01870}01870                                 cbp-\/>bio\_cflags |= \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01871}01871                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01872}01872                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01873}01873                 \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01874}01874                 \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01875}01875                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01876}01876                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01877}01877                                 \textcolor{keywordflow}{if} (n == ndisks -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01878}01878                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01879}01879 \textcolor{comment}{                                         * Active parity component, mark it as such.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01880}01880 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01881}01881                                         cbp-\/>bio\_cflags |=}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01882}01882                                             \mbox{\hyperlink{g__raid3_8h_a91122e71a637447f66461f690ef40166}{G\_RAID3\_BIO\_CFLAG\_PARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01883}01883                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01884}01884                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01885}01885                                 pbp-\/>bio\_pflags |= \mbox{\hyperlink{g__raid3_8h_a4850f389aa37342323ccbfef51629946}{G\_RAID3\_BIO\_PFLAG\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01886}01886                                 \textcolor{keywordflow}{if} (n == ndisks -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01887}01887                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01888}01888 \textcolor{comment}{                                         * Parity component is not connected,}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01889}01889 \textcolor{comment}{                                         * so destroy its request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01890}01890 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01891}01891                                         pbp-\/>bio\_pflags |=}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01892}01892                                             \mbox{\hyperlink{g__raid3_8h_aaef52036436beaa135b20ef43002c628}{G\_RAID3\_BIO\_PFLAG\_NOPARITY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01893}01893                                         \mbox{\hyperlink{g__raid3_8c_aff8e54dee93341e0dc18bf90111b5f31}{g\_raid3\_destroy\_bio}}(sc, cbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01894}01894                                         cbp = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01895}01895                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01896}01896                                         cbp-\/>bio\_cflags |=}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01897}01897                                             \mbox{\hyperlink{g__raid3_8h_ab12e298f51bfafcad4954f5e3927f744}{G\_RAID3\_BIO\_CFLAG\_NODISK}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01898}01898                                         \mbox{\hyperlink{structdisk}{disk}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01899}01899                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01900}01900                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01901}01901                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01902}01902                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01903}01903                 \textcolor{keywordflow}{if} (cbp != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01904}01904                         cbp-\/>bio\_caller2 = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01905}01905         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01906}01906         \textcolor{keywordflow}{switch} (pbp-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01907}01907         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01908}01908                 \textcolor{keywordflow}{if} (round\_robin) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01909}01909                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01910}01910 \textcolor{comment}{                         * If we are in round-\/robin mode and 'round\_robin' is}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01911}01911 \textcolor{comment}{                         * still 1, it means, that we skipped parity component}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01912}01912 \textcolor{comment}{                         * for this read and must reset sc\_round\_robin field.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01913}01913 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01914}01914                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad30ebb5f1f01e4ed9516342420bea2c2}{sc\_round\_robin}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01915}01915                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01916}01916                 \mbox{\hyperlink{g__raid3_8c_ae57ffe6ee0366a5bcd8e5e27a9dd6608}{G\_RAID3\_FOREACH\_SAFE\_BIO}}(pbp, cbp, tmpbp) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01917}01917                         \mbox{\hyperlink{structdisk}{disk}} = cbp-\/>bio\_caller2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01918}01918                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01919}01919                         cbp-\/>bio\_to = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01920}01920                         \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, cbp, \textcolor{stringliteral}{"{}Sending request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01921}01921                         KASSERT(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} >= 1 \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}} >= 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01922}01922                             (\textcolor{stringliteral}{"{}Consumer \%s not opened (r\%dw\%de\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01923}01923                             \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01924}01924                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a0bd70ab96dc6a56c4e0db0608af9c9a4}{index}}++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01925}01925                         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01926}01926                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01927}01927                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01928}01928         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01929}01929         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01930}01930                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01931}01931 \textcolor{comment}{                 * Put request onto inflight queue, so we can check if new}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01932}01932 \textcolor{comment}{                 * synchronization requests don't collide with it.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01933}01933 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01934}01934                 bioq\_insert\_tail(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a70eaadd87e4099d053da4ff3a3514ec5}{sc\_inflight}}, pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01935}01935 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01936}01936                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01937}01937 \textcolor{comment}{                 * Bump syncid on first write.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01938}01938 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01939}01939                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \& \mbox{\hyperlink{g__raid3_8h_acd04b9ef99451674f75b121c61e7e0f9}{G\_RAID3\_BUMP\_SYNCID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01940}01940                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \&= \string~G\_RAID3\_BUMP\_SYNCID;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01941}01941                         \mbox{\hyperlink{g__raid3_8c_a5ca498e40450cfe71b6a488a3b67810d}{g\_raid3\_bump\_syncid}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01942}01942                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01943}01943                 \mbox{\hyperlink{g__raid3_8c_a6168aa8569272c9d8dcf2c32fbbdd4ec}{g\_raid3\_scatter}}(pbp);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01944}01944                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01945}01945         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01946}01946         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01947}01947 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01948}01948 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01949}01949 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01950}\mbox{\hyperlink{g__raid3_8c_aa5ff3e592b306f9bb92387697a6abe00}{01950}} \mbox{\hyperlink{g__raid3_8c_aa5ff3e592b306f9bb92387697a6abe00}{g\_raid3\_can\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01951}01951 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01952}01952         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01953}01953         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01954}01954 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01955}01955         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01956}01956         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01957}01957         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01958}01958                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01959}01959         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer, consumer) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01960}01960                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a23ad8f3199efc8cc7ddc7283bec89fe8}{g\_raid3\_is\_busy}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01961}01961                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01962}01962         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01963}01963         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01964}01964         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer, consumer) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01965}01965                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a23ad8f3199efc8cc7ddc7283bec89fe8}{g\_raid3\_is\_busy}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01966}01966                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01967}01967         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01968}01968         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}No I/O requests for \%s, it can be destroyed."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01969}01969             sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01970}01970         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01971}01971 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01972}01972 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01973}01973 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01974}\mbox{\hyperlink{g__raid3_8c_add4dc22eceac32e48ff87ea97812f7f8}{01974}} \mbox{\hyperlink{g__raid3_8c_add4dc22eceac32e48ff87ea97812f7f8}{g\_raid3\_try\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01975}01975 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01976}01976 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01977}01977         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01978}01978         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01979}01979 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01980}01980         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01981}01981                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}root\_mount\_rel[\%u] \%p"{}}, \_\_LINE\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01982}01982                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01983}01983                 root\_mount\_rel(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01984}01984                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01985}01985         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01986}01986 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01987}01987         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01988}01988         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_aa5ff3e592b306f9bb92387697a6abe00}{g\_raid3\_can\_destroy}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01989}01989                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01990}01990                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01991}01991         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01992}01992         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01993}01993         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01994}01994         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a497139c8e9f5b8d83953bc8001022f46}{G\_RAID3\_DEVICE\_FLAG\_WAIT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01995}01995                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01996}01996                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01997}01997                     \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01998}01998                 \textcolor{comment}{/* Unlock sc\_lock here, as it can be destroyed after wakeup. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l01999}01999                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02000}02000                 wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02001}02001                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02002}02002         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02003}02003                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02004}02004                 \mbox{\hyperlink{g__raid3_8c_a51fc254533ec029f9faf8f7d196f7067}{g\_raid3\_destroy\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02005}02005                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02006}02006                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02007}02007         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02008}02008         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02009}02009 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02010}02010 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02011}02011 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02012}02012 \textcolor{comment}{ * Worker thread.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02013}02013 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02014}02014 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02015}\mbox{\hyperlink{g__raid3_8c_ac5295ecb6a3203300e862f36a0983fd5}{02015}} \mbox{\hyperlink{g__raid3_8c_ac5295ecb6a3203300e862f36a0983fd5}{g\_raid3\_worker}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02016}02016 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02017}02017         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02018}02018         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__event}{g\_raid3\_event}} *ep;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02019}02019         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02020}02020         \textcolor{keywordtype}{int} timeout;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02021}02021 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02022}02022         sc = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02023}02023         thread\_lock(curthread);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02024}02024         sched\_prio(curthread, PRIBIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02025}02025         thread\_unlock(curthread);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02026}02026 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02027}02027         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02028}02028         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02029}02029                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(5, \textcolor{stringliteral}{"{}\%s: Let's see..."{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02030}02030                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02031}02031 \textcolor{comment}{                 * First take a look at events.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02032}02032 \textcolor{comment}{                 * This is important to handle events before any I/O requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02033}02033 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02034}02034                 ep = \mbox{\hyperlink{g__raid3_8c_acb3ca1e5b06d6685a64a6ac50fe7e54d}{g\_raid3\_event\_get}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02035}02035                 \textcolor{keywordflow}{if} (ep != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02036}02036                         \mbox{\hyperlink{g__raid3_8c_a718a9f874e49c00038ab04477a6ac9b3}{g\_raid3\_event\_remove}}(sc, ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02037}02037                         \textcolor{keywordflow}{if} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_abc36a7cccb37dec35a44c25d2f1f9cf9}{G\_RAID3\_EVENT\_DEVICE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02038}02038                                 \textcolor{comment}{/* Update only device status. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02039}02039                                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(3,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02040}02040                                     \textcolor{stringliteral}{"{}Running event for device \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02041}02041                                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02042}02042                                 ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02043}02043                                 \mbox{\hyperlink{g__raid3_8c_acf64ce40bcf240d883b5e0af3c26a61c}{g\_raid3\_update\_device}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02044}02044                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02045}02045                                 \textcolor{comment}{/* Update disk status. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02046}02046                                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(3, \textcolor{stringliteral}{"{}Running event for disk \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02047}02047                                      \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(ep-\/>\mbox{\hyperlink{structg__raid3__event_a6998d13e389baa4899e32bd6d15f3d8c}{e\_disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02048}02048                                 ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} = \mbox{\hyperlink{g__raid3_8c_a174790bfb5b3ecbfa6772f3f1f024c46}{g\_raid3\_update\_disk}}(ep-\/>\mbox{\hyperlink{structg__raid3__event_a6998d13e389baa4899e32bd6d15f3d8c}{e\_disk}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02049}02049                                     ep-\/>\mbox{\hyperlink{structg__raid3__event_a33dda18f8a73ae4077a940f119ad0ea0}{e\_state}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02050}02050                                 \textcolor{keywordflow}{if} (ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02051}02051                                         \mbox{\hyperlink{g__raid3_8c_acf64ce40bcf240d883b5e0af3c26a61c}{g\_raid3\_update\_device}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02052}02052                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02053}02053                         \textcolor{keywordflow}{if} ((ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} \& \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02054}02054                                 KASSERT(ep-\/>\mbox{\hyperlink{structg__raid3__event_ae3d5dd8f0db6fd6c2b7482fb93c6176e}{e\_error}} == 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02055}02055                                     (\textcolor{stringliteral}{"{}Error cannot be handled."{}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02056}02056                                 \mbox{\hyperlink{g__raid3_8c_a6daa7c0975386f168898330996cee241}{g\_raid3\_event\_free}}(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02057}02057                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02058}02058                                 ep-\/>\mbox{\hyperlink{structg__raid3__event_a565017a009cbadd1a64458b62f97d530}{e\_flags}} |= \mbox{\hyperlink{g__raid3_8h_afdccc70d271f9888f7945de34fba2c7c}{G\_RAID3\_EVENT\_DONE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02059}02059                                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02060}02060                                     ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02061}02061                                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02062}02062                                 wakeup(ep);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02063}02063                                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02064}02064                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02065}02065                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02066}02066                             \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02067}02067                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_add4dc22eceac32e48ff87ea97812f7f8}{g\_raid3\_try\_destroy}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02068}02068                                         curthread-\/>td\_pflags \&= \string~TDP\_GEOM;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02069}02069                                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Thread exiting."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02070}02070                                         kproc\_exit(0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02071}02071                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02072}02072                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02073}02073                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(5, \textcolor{stringliteral}{"{}\%s: I'm here 1."{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02074}02074                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02075}02075                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02076}02076                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02077}02077 \textcolor{comment}{                 * Check if we can mark array as CLEAN and if we can't take}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02078}02078 \textcolor{comment}{                 * how much seconds should we wait.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02079}02079 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02080}02080                 timeout = \mbox{\hyperlink{g__raid3_8c_a04b035fceb386b932e93a04447edc72f}{g\_raid3\_idle}}(sc, -\/1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02081}02081                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02082}02082 \textcolor{comment}{                 * Now I/O requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02083}02083 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02084}02084                 \textcolor{comment}{/* Get first request from the queue. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02085}02085                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02086}02086                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = bioq\_first(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02087}02087                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02088}02088                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02089}02089                             \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02090}02090                                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02091}02091                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_add4dc22eceac32e48ff87ea97812f7f8}{g\_raid3\_try\_destroy}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02092}02092                                         curthread-\/>td\_pflags \&= \string~TDP\_GEOM;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02093}02093                                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Thread exiting."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02094}02094                                         kproc\_exit(0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02095}02095                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02096}02096                                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02097}02097                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02098}02098                         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02099}02099                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02100}02100 \textcolor{comment}{                         * XXX: We can miss an event here, because an event}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02101}02101 \textcolor{comment}{                         *      can be added without sx-\/device-\/lock and without}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02102}02102 \textcolor{comment}{                         *      mtx-\/queue-\/lock. Maybe I should just stop using}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02103}02103 \textcolor{comment}{                         *      dedicated mutex for events synchronization and}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02104}02104 \textcolor{comment}{                         *      stick with the queue lock?}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02105}02105 \textcolor{comment}{                         *      The event will hang here until next I/O request}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02106}02106 \textcolor{comment}{                         *      or next event is received.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02107}02107 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02108}02108                         \mbox{\hyperlink{g__raid3_8c_a2455e9c9cba861e782fa3e81a87b71d8}{MSLEEP}}(sc, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}}, PRIBIO | PDROP, \textcolor{stringliteral}{"{}r3:w1"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02109}02109                             timeout * hz);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02110}02110                         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02111}02111                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(5, \textcolor{stringliteral}{"{}\%s: I'm here 4."{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02112}02112                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02113}02113                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02114}02114 process:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02115}02115                 bioq\_remove(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02116}02116                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02117}02117 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02118}02118                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from-\/>geom == sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02119}02119                     (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_ac55629f9c30f51cc9b4b076e0c90a1ec}{G\_RAID3\_BIO\_CFLAG\_SYNC}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02120}02120                         \mbox{\hyperlink{g__raid3_8c_a437b90c370ef92211ad8931b9cc1b51a}{g\_raid3\_sync\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}); \textcolor{comment}{/* READ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02121}02121                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to != sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02122}02122                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a484371371fcc5c4d1fcd8756606ec454}{G\_RAID3\_BIO\_CFLAG\_REGULAR}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02123}02123                                 \mbox{\hyperlink{g__raid3_8c_ac735848067cd8601f49bcd015f7fd8f6}{g\_raid3\_regular\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02124}02124                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_ac55629f9c30f51cc9b4b076e0c90a1ec}{G\_RAID3\_BIO\_CFLAG\_SYNC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02125}02125                                 \mbox{\hyperlink{g__raid3_8c_a437b90c370ef92211ad8931b9cc1b51a}{g\_raid3\_sync\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}); \textcolor{comment}{/* WRITE */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02126}02126                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02127}02127                                 KASSERT(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02128}02128                                     (\textcolor{stringliteral}{"{}Invalid request cflags=0x\%hx to=\%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02129}02129                                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02130}02130                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02131}02131                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a426292df09f88efb8272c9177d85a066}{g\_raid3\_register\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02132}02132                         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02133}02133                         bioq\_insert\_head(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02134}02134                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02135}02135 \textcolor{comment}{                         * We are short in memory, let see if there are finished}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02136}02136 \textcolor{comment}{                         * request we can free.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02137}02137 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02138}02138                         TAILQ\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}.queue, bio\_queue) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02139}02139                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_a484371371fcc5c4d1fcd8756606ec454}{G\_RAID3\_BIO\_CFLAG\_REGULAR}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02140}02140                                         \textcolor{keywordflow}{goto} process;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02141}02141                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02142}02142                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02143}02143 \textcolor{comment}{                         * No finished regular request, so at least keep}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02144}02144 \textcolor{comment}{                         * synchronization running.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02145}02145 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02146}02146                         TAILQ\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}.queue, bio\_queue) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02147}02147                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags \& \mbox{\hyperlink{g__raid3_8h_ac55629f9c30f51cc9b4b076e0c90a1ec}{G\_RAID3\_BIO\_CFLAG\_SYNC}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02148}02148                                         \textcolor{keywordflow}{goto} process;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02149}02149                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02150}02150                         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02151}02151                         \mbox{\hyperlink{g__raid3_8c_a2455e9c9cba861e782fa3e81a87b71d8}{MSLEEP}}(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}}, PRIBIO | PDROP,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02152}02152                             \textcolor{stringliteral}{"{}r3:lowmem"{}}, hz / 10);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02153}02153                         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02154}02154                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02155}02155                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(5, \textcolor{stringliteral}{"{}\%s: I'm here 9."{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02156}02156         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02157}02157 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02158}02158 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02159}02159 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02160}\mbox{\hyperlink{g__raid3_8c_a1ad84f5fec2dad0ff4564557d27ad74d}{02160}} \mbox{\hyperlink{g__raid3_8c_a1ad84f5fec2dad0ff4564557d27ad74d}{g\_raid3\_update\_idle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02161}02161 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02162}02162 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02163}02163         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02164}02164         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_acd0b9737417b02e49e34410aca1a4407}{G\_RAID3\_DEVICE\_FLAG\_NOFAILSYNC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02165}02165                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02166}02166         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}} \&\& (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02167}02167                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s (device \%s) marked as dirty."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02168}02168                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02169}02169                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02170}02170         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02171}02171             (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02172}02172                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s (device \%s) marked as clean."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02173}02173                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02174}02174                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02175}02175         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02176}02176 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02177}02177 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02178}02178 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02179}\mbox{\hyperlink{g__raid3_8c_aabf10d030d3015f47c6d61520c0776f7}{02179}} \mbox{\hyperlink{g__raid3_8c_aabf10d030d3015f47c6d61520c0776f7}{g\_raid3\_sync\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02180}02180 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02181}02181         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02182}02182         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02183}02183         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02184}02184         \textcolor{keywordtype}{int} error \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02185}02185         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02186}02186 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02187}02187         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02188}02188         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02189}02189 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02190}02190         KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02191}02191             (\textcolor{stringliteral}{"{}Device not in DEGRADED state (\%s, \%u)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02192}02192             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02193}02193         KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} == NULL, (\textcolor{stringliteral}{"{}Syncdisk is not NULL (\%s, \%u)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02194}02194             sc-\/>sc\_name, sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02195}02195         \mbox{\hyperlink{structdisk}{disk}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02196}02196         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02197}02197                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n].\mbox{\hyperlink{structg__raid3__disk_a0652aa020ff42d68b49327eb9497b9b3}{d\_state}} != \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02198}02198                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02199}02199                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02200}02200                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02201}02201         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02202}02202         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02203}02203                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02204}02204 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02205}02205         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02206}02206         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02207}02207         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02208}02208         error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02209}02209         KASSERT(error == 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02210}02210             (\textcolor{stringliteral}{"{}Cannot attach to \%s (error=\%d)."{}}, sc-\/>sc\_name, error));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02211}02211         error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02212}02212         KASSERT(error == 0, (\textcolor{stringliteral}{"{}Cannot open \%s (error=\%d)."{}}, sc-\/>sc\_name, error));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02213}02213         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02214}02214         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02215}02215 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02216}02216         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: rebuilding provider \%s."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02217}02217             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02218}02218         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_acd0b9737417b02e49e34410aca1a4407}{G\_RAID3\_DEVICE\_FLAG\_NOFAILSYNC}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02219}02219                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02220}02220         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer == NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02221}02221             (\textcolor{stringliteral}{"{}Sync consumer already exists (device=\%s, disk=\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02222}02222             sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}})));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02223}02223 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02224}02224         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02225}02225         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer-\/>private = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02226}02226         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer-\/>index = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02227}02227         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02228}02228 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02229}02229         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02230}02230 \textcolor{comment}{         * Allocate memory for synchronization bios and initialize them.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02231}02231 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02232}02232         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} bio *) * \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02233}02233             M\_RAID3, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02234}02234         \textcolor{keywordflow}{for} (n = 0; n < \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02235}02235                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = \mbox{\hyperlink{geom_8h_ae13a6895af777c09cf19545f48517fe4}{g\_alloc\_bio}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02236}02236                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios[n] = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02237}02237                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_parent = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02238}02238                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd = BIO\_READ;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02239}02239                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = malloc(maxphys, M\_RAID3, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02240}02240                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cflags = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02241}02241                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset * (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02242}02242                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = MIN(maxphys, sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02243}02243                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset += \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02244}02244                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_done = \mbox{\hyperlink{g__raid3_8c_a047cd31ea9c5072a28c7b690266a22f0}{g\_raid3\_sync\_done}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02245}02245                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_from = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02246}02246                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to = sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02247}02247                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_caller1 = (\textcolor{keywordtype}{void} *)(uintptr\_t)n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02248}02248         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02249}02249 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02250}02250         \textcolor{comment}{/* Set the number of in-\/flight synchronization requests. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02251}02251         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_inflight = \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02252}02252 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02253}02253         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02254}02254 \textcolor{comment}{         * Fire off first synchronization requests.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02255}02255 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02256}02256         \textcolor{keywordflow}{for} (n = 0; n < \mbox{\hyperlink{g__raid3_8c_a31434bd3c79cc2589eef0c21b2340476}{g\_raid3\_syncreqs}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02257}02257                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02258}02258                 \mbox{\hyperlink{g__raid3_8h_abb843e5e52a99af00c5c04091e5bd411}{G\_RAID3\_LOGREQ}}(3, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}Sending synchronization request."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02259}02259                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer-\/>index++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02260}02260                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02261}02261 \textcolor{comment}{                 * Delay the request if it is colliding with a regular request.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02262}02262 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02263}02263                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_ae8af9dab442ac406f6cddc4cc7c72310}{g\_raid3\_regular\_collision}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02264}02264                         \mbox{\hyperlink{g__raid3_8c_a009842f0e91038d7c1380f3ffc3c44f7}{g\_raid3\_sync\_delay}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02265}02265                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02266}02266                         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02267}02267         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02268}02268 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02269}02269 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02270}02270 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02271}02271 \textcolor{comment}{ * Stop synchronization process.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02272}02272 \textcolor{comment}{ * type: 0 -\/ synchronization finished}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02273}02273 \textcolor{comment}{ *       1 -\/ synchronization stopped}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02274}02274 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02275}02275 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02276}\mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{02276}} \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{int} \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02277}02277 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02278}02278         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02279}02279         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02280}02280 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02281}02281         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02282}02282         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02283}02283 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02284}02284         KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02285}02285             (\textcolor{stringliteral}{"{}Device not in DEGRADED state (\%s, \%u)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02286}02286             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02287}02287         \mbox{\hyperlink{structdisk}{disk}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02288}02288         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02289}02289         KASSERT(\mbox{\hyperlink{structdisk}{disk}} != NULL, (\textcolor{stringliteral}{"{}No disk was synchronized (\%s)."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02290}02290         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02291}02291             (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02292}02292             \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02293}02293         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02294}02294                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02295}02295 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02296}02296         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02297}02297                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: rebuilding provider \%s finished."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02298}02298                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02299}02299         \} \textcolor{keywordflow}{else} \textcolor{comment}{/* if (type == 1) */} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02300}02300                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: rebuilding provider \%s stopped."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02301}02301                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02302}02302         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02303}02303         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02304}02304         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_bios = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02305}02305         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02306}02306         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02307}02307         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02308}02308         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}); \textcolor{comment}{/* Avoid recursion on sc\_lock. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02309}02309         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02310}02310         \mbox{\hyperlink{g__raid3_8c_a65fca18b5fddeeb4ef0a907a90a2e564}{g\_raid3\_kill\_consumer}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02311}02311         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02312}02312         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02313}02313 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02314}02314 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02315}02315 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02316}\mbox{\hyperlink{g__raid3_8c_ac4337beb6106378f9b27c6687a379876}{02316}} \mbox{\hyperlink{g__raid3_8c_ac4337beb6106378f9b27c6687a379876}{g\_raid3\_launch\_provider}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02317}02317 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02318}02318         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02319}02319         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02320}02320         \textcolor{keywordtype}{int} n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02321}02321 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02322}02322         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_LOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02323}02323 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02324}02324         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02325}02325         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a79a5fe6e79cbc1a257454a3554fa11ef}{g\_new\_providerf}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}}, \textcolor{stringliteral}{"{}raid3/\%s"{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02326}02326         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02327}02327         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02328}02328         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02329}02329         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02330}02330         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02331}02331                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02332}02332                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer \&\& \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02333}02333                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>stripesize > \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02334}02334                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>stripesize;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02335}02335                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>stripeoffset;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02336}02336                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02337}02337         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02338}02338         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} *= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02339}02339         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} *= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02340}02340         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02341}02341         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02342}02342         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02343}02343         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s launched (\%u/\%u)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02344}02344             \mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}), sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02345}02345 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02346}02346         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02347}02347                 \mbox{\hyperlink{g__raid3_8c_aabf10d030d3015f47c6d61520c0776f7}{g\_raid3\_sync\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02348}02348 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02349}02349 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02350}02350 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02351}\mbox{\hyperlink{g__raid3_8c_a35bf66296c96a7aacaa8964e10182d8e}{02351}} \mbox{\hyperlink{g__raid3_8c_a35bf66296c96a7aacaa8964e10182d8e}{g\_raid3\_destroy\_provider}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02352}02352 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02353}02353         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02354}02354 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02355}02355         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02356}02356         KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} != NULL, (\textcolor{stringliteral}{"{}NULL provider (device=\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02357}02357             sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02358}02358 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02359}02359         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02360}02360         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02361}02361         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02362}02362         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = bioq\_first(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02363}02363                 bioq\_remove(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02364}02364                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02365}02365         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02366}02366         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02367}02367         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: provider \%s destroyed."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02368}02368             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02369}02369         \mbox{\hyperlink{geom_8h_a164882713025c4e0cc58b1ac8501bcf0}{g\_wither\_provider}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02370}02370         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02371}02371         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02372}02372         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02373}02373                 \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02374}02374 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02375}02375 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02376}02376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02377}\mbox{\hyperlink{g__raid3_8c_a8c307327d5d88911abc6a25fb648628e}{02377}} \mbox{\hyperlink{g__raid3_8c_a8c307327d5d88911abc6a25fb648628e}{g\_raid3\_go}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02378}02378 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02379}02379         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02380}02380 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02381}02381         sc = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02382}02382         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Force device \%s start due to timeout."{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02383}02383         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(sc, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02384}02384             \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}} | \mbox{\hyperlink{g__raid3_8h_abc36a7cccb37dec35a44c25d2f1f9cf9}{G\_RAID3\_EVENT\_DEVICE}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02385}02385 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02386}02386 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02387}02387 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02388}\mbox{\hyperlink{g__raid3_8c_a7656e4b8cb619b58fdcc893b49539228}{02388}} \mbox{\hyperlink{g__raid3_8c_a7656e4b8cb619b58fdcc893b49539228}{g\_raid3\_determine\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02389}02389 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02390}02390         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02391}02391         u\_int state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02392}02392 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02393}02393         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02394}02394         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}} == \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02395}02395                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02396}02396                     \mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02397}02397                         \textcolor{comment}{/* Disk does not need synchronization. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02398}02398                         state = \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02399}02399                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02400}02400                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02401}02401                              \mbox{\hyperlink{g__raid3_8h_a0a94748b2d425a256c3cef0f51ad5176}{G\_RAID3\_DEVICE\_FLAG\_NOAUTOSYNC}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02402}02402                             (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02403}02403                              \mbox{\hyperlink{g__raid3_8h_a5282abc5a8e372654d24cac5b7d0302b}{G\_RAID3\_DISK\_FLAG\_FORCE\_SYNC}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02404}02404                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02405}02405 \textcolor{comment}{                                 * We can start synchronization from}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02406}02406 \textcolor{comment}{                                 * the stored offset.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02407}02407 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02408}02408                                 state = \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02409}02409                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02410}02410                                 state = \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02411}02411                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02412}02412                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02413}02413         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid < sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02414}02414                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02415}02415 \textcolor{comment}{                 * Reset all synchronization data for this disk,}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02416}02416 \textcolor{comment}{                 * because if it even was synchronized, it was}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02417}02417 \textcolor{comment}{                 * synchronized to disks with different syncid.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02418}02418 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02419}02419                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02420}02420                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02421}02421                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset\_done = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02422}02422                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid = sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02423}02423                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a0a94748b2d425a256c3cef0f51ad5176}{G\_RAID3\_DEVICE\_FLAG\_NOAUTOSYNC}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02424}02424                     (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a5282abc5a8e372654d24cac5b7d0302b}{G\_RAID3\_DISK\_FLAG\_FORCE\_SYNC}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02425}02425                         state = \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02426}02426                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02427}02427                         state = \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02428}02428                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02429}02429         \} \textcolor{keywordflow}{else} \textcolor{comment}{/* if (sc-\/>sc\_syncid < disk-\/>d\_sync.ds\_syncid) */} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02430}02430                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02431}02431 \textcolor{comment}{                 * Not good, NOT GOOD!}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02432}02432 \textcolor{comment}{                 * It means that device was started on stale disks}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02433}02433 \textcolor{comment}{                 * and more fresh disk just arrive.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02434}02434 \textcolor{comment}{                 * If there were writes, device is broken, sorry.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02435}02435 \textcolor{comment}{                 * I think the best choice here is don't touch}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02436}02436 \textcolor{comment}{                 * this disk and inform the user loudly.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02437}02437 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02438}02438                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s was started before the freshest "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02439}02439                     \textcolor{stringliteral}{"{}disk (\%s) arrives!! It will not be connected to the "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02440}02440                     \textcolor{stringliteral}{"{}running device."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02441}02441                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02442}02442                 \mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{g\_raid3\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02443}02443                 state = \mbox{\hyperlink{g__raid3_8h_ad25d2039e53f55c72b432b1032bcc6ad}{G\_RAID3\_DISK\_STATE\_NONE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02444}02444                 \textcolor{comment}{/* Return immediately, because disk was destroyed. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02445}02445                 \textcolor{keywordflow}{return} (state);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02446}02446         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02447}02447         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(3, \textcolor{stringliteral}{"{}State for \%s disk: \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02448}02448             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02449}02449         \textcolor{keywordflow}{return} (state);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02450}02450 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02451}02451 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02452}02452 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02453}02453 \textcolor{comment}{ * Update device state.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02454}02454 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02455}02455 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02456}\mbox{\hyperlink{g__raid3_8c_acf64ce40bcf240d883b5e0af3c26a61c}{02456}} \mbox{\hyperlink{g__raid3_8c_acf64ce40bcf240d883b5e0af3c26a61c}{g\_raid3\_update\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, boolean\_t force)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02457}02457 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02458}02458         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02459}02459         u\_int state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02460}02460 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02461}02461         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02462}02462 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02463}02463         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02464}02464         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02465}02465             \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02466}02466                 u\_int n, ndirty, ndisks, genid, syncid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02467}02467 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02468}02468                 KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} == NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02469}02469                     (\textcolor{stringliteral}{"{}Non-\/NULL provider in STARTING state (\%s)."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02470}02470                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02471}02471 \textcolor{comment}{                 * Are we ready? We are, if all disks are connected or}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02472}02472 \textcolor{comment}{                 * one disk is missing and 'force' is true.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02473}02473 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02474}02474                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, -\/1) + force == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02475}02475                         \textcolor{keywordflow}{if} (!force)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02476}02476                                 callout\_drain(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a19d603e7447071147b944e92c3386dfc}{sc\_callout}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02477}02477                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02478}02478                         \textcolor{keywordflow}{if} (force) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02479}02479                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02480}02480 \textcolor{comment}{                                 * Timeout expired, so destroy device.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02481}02481 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02482}02482                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02483}02483                                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}root\_mount\_rel[\%u] \%p"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02484}02484                                     \_\_LINE\_\_, sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02485}02485                                 root\_mount\_rel(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02486}02486                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02487}02487                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02488}02488                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02489}02489                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02490}02490 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02491}02491                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02492}02492 \textcolor{comment}{                 * Find the biggest genid.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02493}02493 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02494}02494                 genid = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02495}02495                 \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02496}02496                         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02497}02497                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02498}02498                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02499}02499                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid > genid)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02500}02500                                 genid = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02501}02501                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02502}02502                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}} = genid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02503}02503                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02504}02504 \textcolor{comment}{                 * Remove all disks without the biggest genid.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02505}02505 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02506}02506                 \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02507}02507                         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02508}02508                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02509}02509                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02510}02510                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid < genid) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02511}02511                                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02512}02512                                     \textcolor{stringliteral}{"{}Component \%s (device \%s) broken, skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02513}02513                                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02514}02514                                 \mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{g\_raid3\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02515}02515                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02516}02516                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02517}02517 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02518}02518                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02519}02519 \textcolor{comment}{                 * There must be at least 'sc-\/>sc\_ndisks -\/ 1' components}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02520}02520 \textcolor{comment}{                 * with the same syncid and without SYNCHRONIZING flag.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02521}02521 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02522}02522 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02523}02523                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02524}02524 \textcolor{comment}{                 * Find the biggest syncid, number of valid components and}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02525}02525 \textcolor{comment}{                 * number of dirty components.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02526}02526 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02527}02527                 ndirty = ndisks = syncid = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02528}02528                 \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02529}02529                         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02530}02530                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02531}02531                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02532}02532                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02533}02533                                 ndirty++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02534}02534                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid > syncid) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02535}02535                                 syncid = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02536}02536                                 ndisks = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02537}02537                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid < syncid) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02538}02538                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02539}02539                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02540}02540                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02541}02541                             \mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02542}02542                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02543}02543                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02544}02544                         ndisks++;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02545}02545                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02546}02546                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02547}02547 \textcolor{comment}{                 * Do we have enough valid components?}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02548}02548 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02549}02549                 \textcolor{keywordflow}{if} (ndisks + 1 < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02550}02550                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02551}02551                             \textcolor{stringliteral}{"{}Device \%s is broken, too few valid components."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02552}02552                             sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02553}02553                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02554}02554                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02555}02555                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02556}02556                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02557}02557 \textcolor{comment}{                 * If there is one DIRTY component and all disks are present,}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02558}02558 \textcolor{comment}{                 * mark it for synchronization. If there is more than one DIRTY}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02559}02559 \textcolor{comment}{                 * component, mark parity component for synchronization.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02560}02560 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02561}02561                 \textcolor{keywordflow}{if} (ndisks == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} \&\& ndirty == 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02562}02562                         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02563}02563                                 \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02564}02564                                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02565}02565                                     \mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02566}02566                                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02567}02567                                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02568}02568                                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |=}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02569}02569                                     \mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02570}02570                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02571}02571                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ndisks == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} \&\& ndirty > 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02572}02572                         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02573}02573                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02574}02574                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02575}02575 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02576}02576                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}} = syncid;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02577}02577                 \textcolor{keywordflow}{if} (force) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02578}02578                         \textcolor{comment}{/* Remember to bump syncid on first write. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02579}02579                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_acd04b9ef99451674f75b121c61e7e0f9}{G\_RAID3\_BUMP\_SYNCID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02580}02580                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02581}02581                 \textcolor{keywordflow}{if} (ndisks == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02582}02582                         state = \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02583}02583                 \textcolor{keywordflow}{else} \textcolor{comment}{/* if (ndisks == sc-\/>sc\_ndisks -\/ 1) */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02584}02584                         state = \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02585}02585                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s state changed from \%s to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02586}02586                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02587}02587                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02588}02588                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02589}02589                 \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02590}02590                         \mbox{\hyperlink{structdisk}{disk}} = \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n];}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02591}02591                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02592}02592                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02593}02593                         state = \mbox{\hyperlink{g__raid3_8c_a7656e4b8cb619b58fdcc893b49539228}{g\_raid3\_determine\_state}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02594}02594                         \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}}, state, \mbox{\hyperlink{g__raid3_8h_ae3e037f5bd1cbe056f756097fabdec8c}{G\_RAID3\_EVENT\_DONTWAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02595}02595                         \textcolor{keywordflow}{if} (state == \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02596}02596                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} |= \mbox{\hyperlink{g__raid3_8h_acd04b9ef99451674f75b121c61e7e0f9}{G\_RAID3\_BUMP\_SYNCID}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02597}02597                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02598}02598                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02599}02599             \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02600}02600         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02601}02601                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02602}02602 \textcolor{comment}{                 * Genid need to be bumped immediately, so do it here.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02603}02603 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02604}02604                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \& \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02605}02605                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \&= \string~G\_RAID3\_BUMP\_GENID;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02606}02606                         \mbox{\hyperlink{g__raid3_8c_af2e680b64d8a7407fd71ec9c36469986}{g\_raid3\_bump\_genid}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02607}02607                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02608}02608 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02609}02609                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}}) > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02610}02610                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02611}02611                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) <}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02612}02612                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02613}02613                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02614}02614                                 \mbox{\hyperlink{g__raid3_8c_a35bf66296c96a7aacaa8964e10182d8e}{g\_raid3\_destroy\_provider}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02615}02615                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02616}02616                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02617}02617                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02618}02618                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) ==}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02619}02619                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02620}02620                         state = \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02621}02621                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02622}02622                             \textcolor{stringliteral}{"{}Device \%s state changed from \%s to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02623}02623                             sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02624}02624                             \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02625}02625                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02626}02626                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02627}02627                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02628}02628                         \mbox{\hyperlink{g__raid3_8c_ac4337beb6106378f9b27c6687a379876}{g\_raid3\_launch\_provider}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02629}02629                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02630}02630                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}root\_mount\_rel[\%u] \%p"{}}, \_\_LINE\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02631}02631                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02632}02632                         root\_mount\_rel(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02633}02633                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02634}02634                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02635}02635                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02636}02636         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02637}02637                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02638}02638 \textcolor{comment}{                 * Genid need to be bumped immediately, so do it here.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02639}02639 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02640}02640                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \& \mbox{\hyperlink{g__raid3_8h_aa216c96dce280b6a8ff40227a6fc2cf7}{G\_RAID3\_BUMP\_GENID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02641}02641                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \&= \string~G\_RAID3\_BUMP\_GENID;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02642}02642                         \mbox{\hyperlink{g__raid3_8c_af2e680b64d8a7407fd71ec9c36469986}{g\_raid3\_bump\_genid}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02643}02643                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02644}02644 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02645}02645                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}}) > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02646}02646                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02647}02647                 KASSERT(\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) >=}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02648}02648                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02649}02649                     (\textcolor{stringliteral}{"{}Too few ACTIVE components in COMPLETE state (device \%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02650}02650                     sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02651}02651                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) ==}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02652}02652                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02653}02653                         state = \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02654}02654                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02655}02655                             \textcolor{stringliteral}{"{}Device \%s state changed from \%s to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02656}02656                             sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02657}02657                             \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02658}02658                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02659}02659                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02660}02660                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02661}02661                         \mbox{\hyperlink{g__raid3_8c_ac4337beb6106378f9b27c6687a379876}{g\_raid3\_launch\_provider}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02662}02662                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02663}02663                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}root\_mount\_rel[\%u] \%p"{}}, \_\_LINE\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02664}02664                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02665}02665                         root\_mount\_rel(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02666}02666                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02667}02667                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02668}02668                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02669}02669         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02670}02670                 KASSERT(1 == 0, (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02671}02671                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}})));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02672}02672                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02673}02673         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02674}02674 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02675}02675 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02676}02676 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02677}02677 \textcolor{comment}{ * Update disk state and device state if needed.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02678}02678 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02679}\mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{02679}} \textcolor{preprocessor}{\#define DISK\_STATE\_CHANGED()    G\_RAID3\_DEBUG(1,                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02680}02680 \textcolor{preprocessor}{        "{}Disk \%s state changed from \%s to \%s (device \%s)."{}},             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02681}02681         g\_raid3\_get\_diskname(disk),                                     \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02682}02682         g\_raid3\_disk\_state2str(disk-\/>d\_state),                          \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02683}02683         g\_raid3\_disk\_state2str(state), sc-\/>sc\_name)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02684}02684 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02685}\mbox{\hyperlink{g__raid3_8c_a174790bfb5b3ecbfa6772f3f1f024c46}{02685}} \mbox{\hyperlink{g__raid3_8c_a174790bfb5b3ecbfa6772f3f1f024c46}{g\_raid3\_update\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, u\_int state)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02686}02686 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02687}02687         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02688}02688 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02689}02689         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02690}02690         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02691}02691 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02692}02692 again:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02693}02693         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(3, \textcolor{stringliteral}{"{}Changing disk \%s state from \%s to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02694}02694             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}), \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02695}02695             \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02696}02696         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02697}02697         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02698}02698                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02699}02699 \textcolor{comment}{                 * Possible scenarios:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02700}02700 \textcolor{comment}{                 * 1. New disk arrive.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02701}02701 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02702}02702                 \textcolor{comment}{/* Previous state should be NONE. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02703}02703                 KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_ad25d2039e53f55c72b432b1032bcc6ad}{G\_RAID3\_DISK\_STATE\_NONE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02704}02704                     (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02705}02705                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02706}02706                 \mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{DISK\_STATE\_CHANGED}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02707}02707 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02708}02708                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02709}02709                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s: provider \%s detected."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02710}02710                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02711}02711                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02712}02712                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02713}02713                 KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02714}02714                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02715}02715                     (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02716}02716                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02717}02717                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02718}02718                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02719}02719                 state = \mbox{\hyperlink{g__raid3_8c_a7656e4b8cb619b58fdcc893b49539228}{g\_raid3\_determine\_state}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02720}02720                 \textcolor{keywordflow}{if} (state != \mbox{\hyperlink{g__raid3_8h_ad25d2039e53f55c72b432b1032bcc6ad}{G\_RAID3\_DISK\_STATE\_NONE}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02721}02721                         \textcolor{keywordflow}{goto} again;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02722}02722                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02723}02723         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02724}02724                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02725}02725 \textcolor{comment}{                 * Possible scenarios:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02726}02726 \textcolor{comment}{                 * 1. New disk does not need synchronization.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02727}02727 \textcolor{comment}{                 * 2. Synchronization process finished successfully.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02728}02728 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02729}02729                 KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02730}02730                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02731}02731                     (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02732}02732                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02733}02733                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02734}02734                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02735}02735                 \textcolor{comment}{/* Previous state should be NEW or SYNCHRONIZING. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02736}02736                 KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02737}02737                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02738}02738                     (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02739}02739                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02740}02740                 \mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{DISK\_STATE\_CHANGED}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02741}02741 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02742}02742                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02743}02743                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02744}02744                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_FORCE\_SYNC;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02745}02745                         \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02746}02746                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02747}02747                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02748}02748                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02749}02749                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset\_done = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02750}02750                 \mbox{\hyperlink{g__raid3_8c_a1ad84f5fec2dad0ff4564557d27ad74d}{g\_raid3\_update\_idle}}(sc, \mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02751}02751                 \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02752}02752                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s: provider \%s activated."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02753}02753                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02754}02754                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02755}02755         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02756}02756                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02757}02757 \textcolor{comment}{                 * Possible scenarios:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02758}02758 \textcolor{comment}{                 * 1. Stale disk was connected.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02759}02759 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02760}02760                 \textcolor{comment}{/* Previous state should be NEW. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02761}02761                 KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02762}02762                     (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02763}02763                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02764}02764                 KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02765}02765                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02766}02766                     (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02767}02767                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02768}02768                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02769}02769                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02770}02770                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02771}02771 \textcolor{comment}{                 * STALE state is only possible if device is marked}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02772}02772 \textcolor{comment}{                 * NOAUTOSYNC.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02773}02773 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02774}02774                 KASSERT((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a0a94748b2d425a256c3cef0f51ad5176}{G\_RAID3\_DEVICE\_FLAG\_NOAUTOSYNC}}) != 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02775}02775                     (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02776}02776                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02777}02777                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02778}02778                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02779}02779                 \mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{DISK\_STATE\_CHANGED}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02780}02780 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02781}02781                 \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02782}02782                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02783}02783                 \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02784}02784                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: provider \%s is stale."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02785}02785                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02786}02786                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02787}02787         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02788}02788                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02789}02789 \textcolor{comment}{                 * Possible scenarios:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02790}02790 \textcolor{comment}{                 * 1. Disk which needs synchronization was connected.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02791}02791 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02792}02792                 \textcolor{comment}{/* Previous state should be NEW. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02793}02793                 KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02794}02794                     (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}}, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02795}02795                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02796}02796                 KASSERT(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02797}02797                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02798}02798                     (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}}, sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02799}02799                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02800}02800                     \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02801}02801                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02802}02802                 \mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{DISK\_STATE\_CHANGED}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02803}02803 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02804}02804                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02805}02805                         \mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~G\_RAID3\_DISK\_FLAG\_DIRTY;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02806}02806                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = state;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02807}02807                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02808}02808                         \mbox{\hyperlink{g__raid3_8c_aabf10d030d3015f47c6d61520c0776f7}{g\_raid3\_sync\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02809}02809                         \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02810}02810                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02811}02811                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02812}02812         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ac183dd891e800c2b90022cb3c515b4f0}{G\_RAID3\_DISK\_STATE\_DISCONNECTED}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02813}02813                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02814}02814 \textcolor{comment}{                 * Possible scenarios:}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02815}02815 \textcolor{comment}{                 * 1. Device wasn't running yet, but disk disappear.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02816}02816 \textcolor{comment}{                 * 2. Disk was active and disapppear.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02817}02817 \textcolor{comment}{                 * 3. Disk disappear during synchronization process.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02818}02818 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02819}02819                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a38357d2aaf6a5d91e618a24fbbfa4b46}{G\_RAID3\_DEVICE\_STATE\_DEGRADED}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02820}02820                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_ad7ddf883f74b9ee11091e04b772a8daa}{G\_RAID3\_DEVICE\_STATE\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02821}02821                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02822}02822 \textcolor{comment}{                         * Previous state should be ACTIVE, STALE or}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02823}02823 \textcolor{comment}{                         * SYNCHRONIZING.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02824}02824 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02825}02825                         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02826}02826                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a4f9f8ae589476a6db2c1743f022bcc89}{G\_RAID3\_DISK\_STATE\_STALE}} ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02827}02827                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02828}02828                             (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02829}02829                             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02830}02830                             \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02831}02831                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} == \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02832}02832                         \textcolor{comment}{/* Previous state should be NEW. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02833}02833                         KASSERT(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02834}02834                             (\textcolor{stringliteral}{"{}Wrong disk state (\%s, \%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02835}02835                             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02836}02836                             \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02837}02837                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02838}02838 \textcolor{comment}{                         * Reset bumping syncid if disk disappeared in STARTING}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02839}02839 \textcolor{comment}{                         * state.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02840}02840 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02841}02841                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \& \mbox{\hyperlink{g__raid3_8h_acd04b9ef99451674f75b121c61e7e0f9}{G\_RAID3\_BUMP\_SYNCID}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02842}02842                                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} \&= \string~G\_RAID3\_BUMP\_SYNCID;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02843}02843 \textcolor{preprocessor}{\#ifdef  INVARIANTS}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02844}02844                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02845}02845                         KASSERT(1 == 0, (\textcolor{stringliteral}{"{}Wrong device state (\%s, \%s, \%s, \%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02846}02846                             sc-\/>sc\_name,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02847}02847                             \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02848}02848                             \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}),}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02849}02849                             \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state)));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02850}02850 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02851}02851                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02852}02852                 \mbox{\hyperlink{g__raid3_8c_a3474126360731c18878b398fc264cb1d}{DISK\_STATE\_CHANGED}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02853}02853                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s: provider \%s disconnected."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02854}02854                     sc-\/>sc\_name, \mbox{\hyperlink{g__raid3_8c_ad9d7fb0dcc6e0b518b388c59cec15691}{g\_raid3\_get\_diskname}}(\mbox{\hyperlink{structdisk}{disk}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02855}02855 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02856}02856                 \mbox{\hyperlink{g__raid3_8c_a39873e7c268e9f2cfd9f332d1c1fddaa}{g\_raid3\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02857}02857                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02858}02858         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02859}02859                 KASSERT(1 == 0, (\textcolor{stringliteral}{"{}Unknown state (\%u)."{}}, state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02860}02860                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02861}02861         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02862}02862         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02863}02863 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02864}02864 \textcolor{preprocessor}{\#undef  DISK\_STATE\_CHANGED}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02865}02865 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02866}02866 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02867}\mbox{\hyperlink{g__raid3_8c_aa8e10436037e4c49ea411c850f53ea27}{02867}} \mbox{\hyperlink{g__raid3_8c_aa8e10436037e4c49ea411c850f53ea27}{g\_raid3\_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__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02868}02868 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02869}02869         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02870}02870         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02871}02871         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02872}02872 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02873}02873         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02874}02874 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02875}02875         \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__raid3_8c_source_l02876}02876         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02877}02877                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02878}02878         \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__raid3_8c_source_l02879}02879         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02880}02880         \textcolor{comment}{/* Metadata are stored on last sector. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02881}02881         \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__raid3_8c_source_l02882}02882             \&\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02883}02883         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02884}02884         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02885}02885         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02886}02886                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02887}02887                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02888}02888                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02889}02889         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02890}02890 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02891}02891         \textcolor{comment}{/* Decode metadata. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02892}02892         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{g__raid3_8h_aa5da5c4eb9c6448ad9f856200d6684de}{raid3\_metadata\_decode}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02893}02893         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02894}02894         \textcolor{keywordflow}{if} (strcmp(md-\/>\mbox{\hyperlink{structg__raid3__metadata_a6afc0b5867f32dc50d230086f0cbd583}{md\_magic}}, \mbox{\hyperlink{g__raid3_8h_a8bef29a737244aeb885e796f9be1e8e9}{G\_RAID3\_MAGIC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02895}02895                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02896}02896         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_a1f20d30bb3c841206af6b0974cf7207f}{md\_version}} > \mbox{\hyperlink{g__raid3_8h_a115da3b66392aa82089d7a767734d0d9}{G\_RAID3\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02897}02897                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02898}02898                     \textcolor{stringliteral}{"{}Kernel module is too old to handle metadata from \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02899}02899                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02900}02900                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02901}02901         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02902}02902         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02903}02903                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}MD5 metadata hash mismatch for provider \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02904}02904                     \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02905}02905                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02906}02906         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02907}02907         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}} > maxphys) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02908}02908                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}The blocksize is too big."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02909}02909                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02910}02910         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02911}02911 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02912}02912         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02913}02913 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02914}02914 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02915}02915 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02916}\mbox{\hyperlink{g__raid3_8c_a9762e67b9d4486d6132f2c2e33976274}{02916}} \mbox{\hyperlink{g__raid3_8c_a9762e67b9d4486d6132f2c2e33976274}{g\_raid3\_check\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02917}02917     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02918}02918 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02919}02919 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02920}02920         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}} >= sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02921}02921                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Invalid disk \%s number (no=\%u), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02922}02922                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02923}02923                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02924}02924         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02925}02925         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}}].\mbox{\hyperlink{structg__raid3__disk_a0652aa020ff42d68b49327eb9497b9b3}{d\_state}} != \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02926}02926                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Disk \%s (no=\%u) already exists, skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02927}02927                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_addb5a523d753f2c72840650d4825cb02}{md\_no}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02928}02928                 \textcolor{keywordflow}{return} (EEXIST);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02929}02929         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02930}02930         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_a5a4ebca0d975d5566cf73b4decaeac7a}{md\_all}} != sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02931}02931                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02932}02932                     \textcolor{stringliteral}{"{}Invalid '\%s' field on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02933}02933                     \textcolor{stringliteral}{"{}md\_all"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02934}02934                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02935}02935         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02936}02936         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_a18248f9dd03aad04c689d4e2148da9b6}{md\_mediasize}} \% md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02937}02937                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Invalid metadata (mediasize \%\% sectorsize != "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02938}02938                     \textcolor{stringliteral}{"{}0) on disk \%s (device \%s), skipping."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02939}02939                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02940}02940                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02941}02941         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02942}02942         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_a18248f9dd03aad04c689d4e2148da9b6}{md\_mediasize}} != sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02943}02943                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02944}02944                     \textcolor{stringliteral}{"{}Invalid '\%s' field on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02945}02945                     \textcolor{stringliteral}{"{}md\_mediasize"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02946}02946                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02947}02947         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02948}02948         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_a18248f9dd03aad04c689d4e2148da9b6}{md\_mediasize}} \% (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02949}02949                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02950}02950                     \textcolor{stringliteral}{"{}Invalid '\%s' field on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02951}02951                     \textcolor{stringliteral}{"{}md\_mediasize"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02952}02952                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02953}02953         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02954}02954         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1)) > \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02955}02955                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02956}02956                     \textcolor{stringliteral}{"{}Invalid size of disk \%s (device \%s), skipping."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02957}02957                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02958}02958                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02959}02959         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02960}02960         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02961}02961                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02962}02962                     \textcolor{stringliteral}{"{}Invalid '\%s' field on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02963}02963                     \textcolor{stringliteral}{"{}md\_sectorsize"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02964}02964                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02965}02965         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02966}02966         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}} != sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02967}02967                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02968}02968                     \textcolor{stringliteral}{"{}Invalid '\%s' field on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02969}02969                     \textcolor{stringliteral}{"{}md\_sectorsize"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02970}02970                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02971}02971         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02972}02972         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}} \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02973}02973                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02974}02974                     \textcolor{stringliteral}{"{}Invalid sector size of disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02975}02975                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02976}02976                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02977}02977         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02978}02978         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_aaee866d4bf17205839a57362566ed577}{md\_mflags}} \& \string~\mbox{\hyperlink{g__raid3_8h_a8476eba0a9f686e33d337bf13e419e9c}{G\_RAID3\_DEVICE\_FLAG\_MASK}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02979}02979                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02980}02980                     \textcolor{stringliteral}{"{}Invalid device flags on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02981}02981                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02982}02982                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02983}02983         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02984}02984         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_aaee866d4bf17205839a57362566ed577}{md\_mflags}} \& \mbox{\hyperlink{g__raid3_8h_a4b40ddb04da52a14bd04c8761802a99f}{G\_RAID3\_DEVICE\_FLAG\_VERIFY}}) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02985}02985             (md-\/>\mbox{\hyperlink{structg__raid3__metadata_aaee866d4bf17205839a57362566ed577}{md\_mflags}} \& \mbox{\hyperlink{g__raid3_8h_a3fea077718788462e655b1363fe0bcc9}{G\_RAID3\_DEVICE\_FLAG\_ROUND\_ROBIN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02986}02986                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02987}02987 \textcolor{comment}{                 * VERIFY and ROUND-\/ROBIN options are mutally exclusive.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02988}02988 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02989}02989                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Both VERIFY and ROUND-\/ROBIN flags exist on "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02990}02990                     \textcolor{stringliteral}{"{}disk \%s (device \%s), skipping."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02991}02991                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02992}02992         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02993}02993         \textcolor{keywordflow}{if} ((md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8408d4e788a104cc683bcb361cc8feee}{md\_dflags}} \& \string~\mbox{\hyperlink{g__raid3_8h_ad349a5fe58c8a17aa5421ecbca716c0e}{G\_RAID3\_DISK\_FLAG\_MASK}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02994}02994                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02995}02995                     \textcolor{stringliteral}{"{}Invalid disk flags on disk \%s (device \%s), skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02996}02996                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02997}02997                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02998}02998         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l02999}02999         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03000}03000 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03001}03001 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03002}03002 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03003}\mbox{\hyperlink{g__raid3_8c_a57067dc9d2716940c7591ba5f98882fb}{03003}} \mbox{\hyperlink{g__raid3_8c_a57067dc9d2716940c7591ba5f98882fb}{g\_raid3\_add\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03004}03004     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03005}03005 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03006}03006         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03007}03007         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03008}03008 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03009}03009         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03010}03010         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Adding disk \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03011}03011 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03012}03012         error = \mbox{\hyperlink{g__raid3_8c_a9762e67b9d4486d6132f2c2e33976274}{g\_raid3\_check\_metadata}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03013}03013         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03014}03014                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03015}03015         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} != \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03016}03016             md-\/>\mbox{\hyperlink{structg__raid3__metadata_a8427865226439b0cfca50232b7c41f12}{md\_genid}} < sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03017}03017                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Component \%s (device \%s) broken, skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03018}03018                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03019}03019                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03020}03020         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03021}03021         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__raid3_8c_a1710367dd1e13af7721736b4f30d8c61}{g\_raid3\_init\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, md, \&error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03022}03022         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03023}03023                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03024}03024         error = \mbox{\hyperlink{g__raid3_8c_acb7631fd8c8866baeee95476f9a354e4}{g\_raid3\_event\_send}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid3_8h_a2190ba5a3e4ce318cca047cb1e36bae8}{G\_RAID3\_DISK\_STATE\_NEW}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03025}03025             \mbox{\hyperlink{g__raid3_8h_ae8b2c5fbde2256d5644065c6f91e4c03}{G\_RAID3\_EVENT\_WAIT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03026}03026         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03027}03027                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03028}03028         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_a1f20d30bb3c841206af6b0974cf7207f}{md\_version}} < \mbox{\hyperlink{g__raid3_8h_a115da3b66392aa82089d7a767734d0d9}{G\_RAID3\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03029}03029                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Upgrading metadata on \%s (v\%d-\/>v\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03030}03030                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_a1f20d30bb3c841206af6b0974cf7207f}{md\_version}}, \mbox{\hyperlink{g__raid3_8h_a115da3b66392aa82089d7a767734d0d9}{G\_RAID3\_VERSION}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03031}03031                 \mbox{\hyperlink{g__raid3_8c_a77e53f047f24b1bba6976a7c8e56181b}{g\_raid3\_update\_metadata}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03032}03032         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03033}03033         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03034}03034 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03035}03035 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03036}03036 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03037}\mbox{\hyperlink{g__raid3_8c_a20640c6598e30ec1c1556da5f7072313}{03037}} \mbox{\hyperlink{g__raid3_8c_a20640c6598e30ec1c1556da5f7072313}{g\_raid3\_destroy\_delayed}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03038}03038 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03039}03039         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03040}03040         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03041}03041 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03042}03042         \textcolor{keywordflow}{if} (flag == \mbox{\hyperlink{geom_8h_afd5164d1355b481a911bb285baf4bc82}{EV\_CANCEL}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03043}03043                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Destroying canceled."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03044}03044                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03045}03045         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03046}03046         sc = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03047}03047         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03048}03048         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03049}03049         KASSERT((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) == 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03050}03050             (\textcolor{stringliteral}{"{}DESTROY flag set on \%s."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03051}03051         KASSERT((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a7611b8b4647cbe7726eb973cdcdac076}{G\_RAID3\_DEVICE\_FLAG\_DESTROYING}}) != 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03052}03052             (\textcolor{stringliteral}{"{}DESTROYING flag not set on \%s."{}}, sc-\/>sc\_name));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03053}03053         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Destroying \%s (delayed)."{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03054}03054         error = \mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{g\_raid3\_destroy}}(sc, \mbox{\hyperlink{g__raid3_8h_a9cdb38eaf9670811d5e532aa8eccee1c}{G\_RAID3\_DESTROY\_SOFT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03055}03055         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03056}03056                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot destroy \%s."{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03057}03057                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03058}03058         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03059}03059         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03060}03060 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03061}03061 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03062}03062 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03063}\mbox{\hyperlink{g__raid3_8c_a9138f60c2f400eefea1c9140791712b7}{03063}} \mbox{\hyperlink{g__raid3_8c_a9138f60c2f400eefea1c9140791712b7}{g\_raid3\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} acr, \textcolor{keywordtype}{int} acw, \textcolor{keywordtype}{int} ace)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03064}03064 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03065}03065         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03066}03066         \textcolor{keywordtype}{int} dcr, dcw, dce, error = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03067}03067 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03068}03068         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03069}03069         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Access request for \%s: r\%dw\%de\%d."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, acr,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03070}03070             acw, ace);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03071}03071 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03072}03072         sc = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03073}03073         \textcolor{keywordflow}{if} (sc == NULL \&\& acr <= 0 \&\& acw <= 0 \&\& ace <= 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03074}03074                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03075}03075         KASSERT(sc != NULL, (\textcolor{stringliteral}{"{}NULL softc (provider=\%s)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03076}03076 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03077}03077         dcr = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} + acr;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03078}03078         dcw = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} + acw;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03079}03079         dce = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} + ace;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03080}03080 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03081}03081         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03082}03082         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03083}03083         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}}) != 0 ||}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03084}03084             \mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a61fe6cfc543b348c8c4f4261e80fda60}{G\_RAID3\_DISK\_STATE\_ACTIVE}}) < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03085}03085                 \textcolor{keywordflow}{if} (acr > 0 || acw > 0 || ace > 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03086}03086                         error = ENXIO;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03087}03087                 \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03088}03088         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03089}03089         \textcolor{keywordflow}{if} (dcw == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03090}03090                 \mbox{\hyperlink{g__raid3_8c_a04b035fceb386b932e93a04447edc72f}{g\_raid3\_idle}}(sc, dcw);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03091}03091         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} \& \mbox{\hyperlink{g__raid3_8h_a7611b8b4647cbe7726eb973cdcdac076}{G\_RAID3\_DEVICE\_FLAG\_DESTROYING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03092}03092                 \textcolor{keywordflow}{if} (acr > 0 || acw > 0 || ace > 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03093}03093                         error = ENXIO;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03094}03094                         \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03095}03095                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03096}03096                 \textcolor{keywordflow}{if} (dcr == 0 \&\& dcw == 0 \&\& dce == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03097}03097                         \mbox{\hyperlink{geom_8h_a196998b2923eb556355a617daaef1879}{g\_post\_event}}(\mbox{\hyperlink{g__raid3_8c_a20640c6598e30ec1c1556da5f7072313}{g\_raid3\_destroy\_delayed}}, sc, M\_WAITOK,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03098}03098                             sc, NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03099}03099                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03100}03100         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03101}03101 end:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03102}03102         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03103}03103         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03104}03104         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03105}03105 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03106}03106 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03107}03107 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03108}\mbox{\hyperlink{g__raid3_8c_ac59c50e4b795076734cfd33b73f75971}{03108}} \mbox{\hyperlink{g__raid3_8c_ac59c50e4b795076734cfd33b73f75971}{g\_raid3\_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__raid3__metadata}{g\_raid3\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03109}03109 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03110}03110         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03111}03111         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03112}03112         \textcolor{keywordtype}{int} error, timeout;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03113}03113         u\_int n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03114}03114 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03115}03115         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03116}03116         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Creating device \%s (id=\%u)."{}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_ad5e1967c9fb4431227df8752beb43b83}{md\_id}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03117}03117 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03118}03118         \textcolor{comment}{/* One disk is minimum. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03119}03119         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__raid3__metadata_a5a4ebca0d975d5566cf73b4decaeac7a}{md\_all}} < 1)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03120}03120                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03121}03121         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03122}03122 \textcolor{comment}{         * Action geom.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03123}03123 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03124}03124         \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__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03125}03125         sc = malloc(\textcolor{keyword}{sizeof}(*sc), M\_RAID3, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03126}03126         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}} = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}}) * md-\/>\mbox{\hyperlink{structg__raid3__metadata_a5a4ebca0d975d5566cf73b4decaeac7a}{md\_all}}, M\_RAID3,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03127}03127             M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03128}03128         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a160a0c74f128936d97064e56052dc2ef}{start}} = \mbox{\hyperlink{g__raid3_8c_a4a156f60a69d13906d66c907ed0a03cc}{g\_raid3\_start}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03129}03129         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__raid3_8c_abdf016931111fa8a9b7a39a05605af79}{g\_raid3\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03130}03130         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{g__raid3_8c_a9138f60c2f400eefea1c9140791712b7}{g\_raid3\_access}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03131}03131         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a5944d44b6aba36f1a37c67f020b5588b}{dumpconf}} = \mbox{\hyperlink{g__raid3_8c_aa29604f847129f55c596eb743773dd72}{g\_raid3\_dumpconf}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03132}03132 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03133}03133         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad7f46106047c0e4fa1fe3203a72a6aaf}{sc\_id}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_ad5e1967c9fb4431227df8752beb43b83}{md\_id}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03134}03134         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a18248f9dd03aad04c689d4e2148da9b6}{md\_mediasize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03135}03135         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a6b5e2324d6e525897dfe323e420e128b}{sc\_sectorsize}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_af1a15cd686e2345e4267c6f7e0148915}{md\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03136}03136         sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_a5a4ebca0d975d5566cf73b4decaeac7a}{md\_all}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03137}03137         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad30ebb5f1f01e4ed9516342420bea2c2}{sc\_round\_robin}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03138}03138         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} = md-\/>\mbox{\hyperlink{structg__raid3__metadata_aaee866d4bf17205839a57362566ed577}{md\_mflags}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03139}03139         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a8d6c8ddd7837ba9305f96bb8cdbf10e5}{sc\_bump\_id}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03140}03140         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a3f65dfd8c54d68e831669a9b7c04c444}{sc\_idle}} = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03141}03141         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a7ee1d5a0fdb55a5c2a04e896b5c43477}{sc\_last\_write}} = time\_uptime;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03142}03142         sc-\/>\mbox{\hyperlink{structg__raid3__softc_acd47263f78491b4d94e4f15afc52d4ef}{sc\_writes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03143}03143         \textcolor{keywordflow}{for} (n = 0; n < sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}; n++) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03144}03144                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n].\mbox{\hyperlink{structg__raid3__disk_a986ec821adbf2342eb7a4bf29dee7dd6}{d\_softc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03145}03145                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n].\mbox{\hyperlink{structg__raid3__disk_a49712ee9a61df5ad718342b82ec4f16f}{d\_no}} = n;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03146}03146                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}[n].\mbox{\hyperlink{structg__raid3__disk_a0652aa020ff42d68b49327eb9497b9b3}{d\_state}} = \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03147}03147         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03148}03148         sx\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, \textcolor{stringliteral}{"{}graid3:lock"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03149}03149         bioq\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03150}03150         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}}, \textcolor{stringliteral}{"{}graid3:queue"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03151}03151         bioq\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_af141955c69fb78c6e135fa97f685c3ed}{sc\_regular\_delayed}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03152}03152         bioq\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a70eaadd87e4099d053da4ff3a3514ec5}{sc\_inflight}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03153}03153         bioq\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a62a663402e73b66d65791d286a1a09ae}{sc\_sync\_delayed}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03154}03154         TAILQ\_INIT(\&sc-\/>sc\_events);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03155}03155         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}}, \textcolor{stringliteral}{"{}graid3:events"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03156}03156         callout\_init(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a19d603e7447071147b944e92c3386dfc}{sc\_callout}}, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03157}03157         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}} = \mbox{\hyperlink{g__raid3_8h_a9b26b4e6486e2badc69aa86cf4c0542b}{G\_RAID3\_DEVICE\_STATE\_STARTING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03158}03158         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03159}03159         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}} = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03160}03160         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03161}03161         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03162}03162 \textcolor{comment}{         * Synchronization geom.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03163}03163 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03164}03164         \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.sync"{}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03165}03165         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03166}03166         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__raid3_8c_abdf016931111fa8a9b7a39a05605af79}{g\_raid3\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03167}03167         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}} = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03168}03168 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03169}03169         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03170}03170                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}} = uma\_zcreate(\textcolor{stringliteral}{"{}gr3:64k"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03171}03171                     65536, \mbox{\hyperlink{g__raid3_8c_a25d410898637f2fc16382f3cfe7a0e74}{g\_raid3\_uma\_ctor}}, \mbox{\hyperlink{g__raid3_8c_a50c7b0ac770ba0e98df8fa30e9de49fa}{g\_raid3\_uma\_dtor}}, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03172}03172                     UMA\_ALIGN\_PTR, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03173}03173                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_afa8996cdf154e36cf768a8d807be36a4}{sz\_inuse}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03174}03174                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a5954a7fd4813d479ef0274ee2eb30958}{sz\_max}} = \mbox{\hyperlink{g__raid3_8c_afb5c22e5b68045b28ff12c956fbf475b}{g\_raid3\_n64k}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03175}03175                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}} =}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03176}03176                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03177}03177                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}} = uma\_zcreate(\textcolor{stringliteral}{"{}gr3:16k"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03178}03178                     16384, \mbox{\hyperlink{g__raid3_8c_a25d410898637f2fc16382f3cfe7a0e74}{g\_raid3\_uma\_ctor}}, \mbox{\hyperlink{g__raid3_8c_a50c7b0ac770ba0e98df8fa30e9de49fa}{g\_raid3\_uma\_dtor}}, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03179}03179                     UMA\_ALIGN\_PTR, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03180}03180                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_afa8996cdf154e36cf768a8d807be36a4}{sz\_inuse}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03181}03181                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a5954a7fd4813d479ef0274ee2eb30958}{sz\_max}} = \mbox{\hyperlink{g__raid3_8c_a7f2fa2589ae94ba5b88ee74a02800e8e}{g\_raid3\_n16k}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03182}03182                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}} =}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03183}03183                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03184}03184                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}} = uma\_zcreate(\textcolor{stringliteral}{"{}gr3:4k"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03185}03185                     4096, \mbox{\hyperlink{g__raid3_8c_a25d410898637f2fc16382f3cfe7a0e74}{g\_raid3\_uma\_ctor}}, \mbox{\hyperlink{g__raid3_8c_a50c7b0ac770ba0e98df8fa30e9de49fa}{g\_raid3\_uma\_dtor}}, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03186}03186                     UMA\_ALIGN\_PTR, 0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03187}03187                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_afa8996cdf154e36cf768a8d807be36a4}{sz\_inuse}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03188}03188                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a5954a7fd4813d479ef0274ee2eb30958}{sz\_max}} = \mbox{\hyperlink{g__raid3_8c_a364607db2156782ee6aa7b7a176fa420}{g\_raid3\_n4k}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03189}03189                 sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}} =}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03190}03190                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}} = 0;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03191}03191         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03192}03192 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03193}03193         error = kproc\_create(\mbox{\hyperlink{g__raid3_8c_ac5295ecb6a3203300e862f36a0983fd5}{g\_raid3\_worker}}, sc, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03194}03194             \textcolor{stringliteral}{"{}g\_raid3 \%s"{}}, md-\/>\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03195}03195         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03196}03196                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot create kernel thread for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03197}03197                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03198}03198                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03199}03199                         uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03200}03200                         uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03201}03201                         uma\_zdestroy(sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_aadfb183135f45ae2db6c1cc1a15c1708}{sz\_zone}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03202}03202                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03203}03203                 \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03204}03204                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aaa9b9952b012a564bbc52b53156ec56b}{sc\_events\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03205}03205                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03206}03206                 sx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03207}03207                 \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03208}03208                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03209}03209                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03210}03210                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03211}03211         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03212}03212 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03213}03213         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s created (\%u components, id=\%u)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03214}03214             sc-\/>sc\_name, sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}, sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad7f46106047c0e4fa1fe3203a72a6aaf}{sc\_id}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03215}03215 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03216}03216         sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}} = root\_mount\_hold(\textcolor{stringliteral}{"{}GRAID3"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03217}03217         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}root\_mount\_hold \%p"{}}, sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac9739107197eb39149a53222ffe8f0b5}{sc\_rootmount}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03218}03218 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03219}03219         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03220}03220 \textcolor{comment}{         * Run timeout.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03221}03221 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03222}03222         timeout = atomic\_load\_acq\_int(\&\mbox{\hyperlink{g__raid3_8c_a71f602216317b7276e86034f798f669b}{g\_raid3\_timeout}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03223}03223         callout\_reset(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a19d603e7447071147b944e92c3386dfc}{sc\_callout}}, timeout * hz, \mbox{\hyperlink{g__raid3_8c_a8c307327d5d88911abc6a25fb648628e}{g\_raid3\_go}}, sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03224}03224         \textcolor{keywordflow}{return} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03225}03225 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03226}03226 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03227}03227 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03228}\mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{03228}} \mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{g\_raid3\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc, \textcolor{keywordtype}{int} how)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03229}03229 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03230}03230         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03231}03231 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03232}03232         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03233}03233         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03234}03234                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03235}03235         sx\_assert(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}}, SX\_XLOCKED);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03236}03236 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03237}03237         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = sc-\/>\mbox{\hyperlink{structg__raid3__softc_ab1b17bfc5b5abc2fc90c892366f7df2e}{sc\_provider}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03238}03238         \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__raid3_8c_source_l03239}03239                 \textcolor{keywordflow}{switch} (how) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03240}03240                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_a9cdb38eaf9670811d5e532aa8eccee1c}{G\_RAID3\_DESTROY\_SOFT}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03241}03241                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03242}03242                             \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__raid3_8c_source_l03243}03243                             \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__raid3_8c_source_l03244}03244                         \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03245}03245                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_ad298256ea32dcbe2f2c51b7dfe5eccc4}{G\_RAID3\_DESTROY\_DELAYED}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03246}03246                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03247}03247                             \textcolor{stringliteral}{"{}Device \%s will be destroyed on last close."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03248}03248                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03249}03249                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a970fedd2484cf1866e1a9fb36a2f5145}{sc\_syncdisk}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03250}03250                                 \mbox{\hyperlink{g__raid3_8c_afd25a7bcc3ec9a4f3e94768226ebf538}{g\_raid3\_sync\_stop}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03251}03251                         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a7611b8b4647cbe7726eb973cdcdac076}{G\_RAID3\_DEVICE\_FLAG\_DESTROYING}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03252}03252                         \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03253}03253                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid3_8h_aa1ba8eb299604128427b6a4bb03b5fd9}{G\_RAID3\_DESTROY\_HARD}}:}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03254}03254                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s is still open, so it "{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03255}03255                             \textcolor{stringliteral}{"{}can't be definitely removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03256}03256                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03257}03257                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03258}03258         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03259}03259 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03260}03260         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03261}03261         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03262}03262                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03263}03263                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03264}03264         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03265}03265         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac7961881fedc68f241377fd4d9acdf1}{sc\_geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03266}03266         sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03267}03267         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03268}03268 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03269}03269         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a60908818b3d7444fe292a955563af230}{G\_RAID3\_DEVICE\_FLAG\_DESTROY}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03270}03270         sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} |= \mbox{\hyperlink{g__raid3_8h_a497139c8e9f5b8d83953bc8001022f46}{G\_RAID3\_DEVICE\_FLAG\_WAIT}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03271}03271         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Waking up \%p."{}}, \_\_func\_\_, sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03272}03272         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03273}03273         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03274}03274         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03275}03275         wakeup(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a349eb52120de56ede3391a726f7373ef}{sc\_queue}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03276}03276         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0757305f421da299360795ca27713bc0}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03277}03277         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Sleeping \%p."{}}, \_\_func\_\_, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03278}03278         \textcolor{keywordflow}{while} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03279}03279                 tsleep(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}}, PRIBIO, \textcolor{stringliteral}{"{}r3:destroy"{}}, hz / 5);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03280}03280         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(4, \textcolor{stringliteral}{"{}\%s: Woken up \%p."{}}, \_\_func\_\_, \&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aac5860d5fd5ece61b688adfe7b092a1f}{sc\_worker}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03281}03281         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03282}03282         \mbox{\hyperlink{g__raid3_8c_a51fc254533ec029f9faf8f7d196f7067}{g\_raid3\_destroy\_device}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03283}03283         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ac77c06a191f7d17e8fa97b8d79cb7072}{sc\_disks}}, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03284}03284         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sc, M\_RAID3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03285}03285         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03286}03286 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03287}03287 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03288}03288 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03289}\mbox{\hyperlink{g__raid3_8c_a66e8eeabc21694c7b10817774c4912f8}{03289}} \mbox{\hyperlink{g__raid3_8c_a66e8eeabc21694c7b10817774c4912f8}{g\_raid3\_taste\_orphan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03290}03290 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03291}03291 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03292}03292         KASSERT(1 == 0, (\textcolor{stringliteral}{"{}\%s called while tasting \%s."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03293}03293             \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03294}03294 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03295}03295 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03296}03296 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03297}\mbox{\hyperlink{g__raid3_8c_aacda1424b6ee41f3af9cde28dd53f229}{03297}} \mbox{\hyperlink{g__raid3_8c_a5f92c730ef47fb20f65ceedfa2c0fa0f}{g\_raid3\_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__raid3_8c_source_l03298}03298 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03299}03299         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__metadata}{g\_raid3\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03300}03300         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03301}03301         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03302}03302         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03303}03303         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03304}03304 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03305}03305         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03306}03306         \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__raid3_8c_source_l03307}03307         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(2, \textcolor{stringliteral}{"{}Tasting \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03308}03308 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03309}03309         \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}{"{}raid3:taste"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03310}03310         \textcolor{comment}{/* This orphan function should be never called. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03311}03311         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__raid3_8c_a66e8eeabc21694c7b10817774c4912f8}{g\_raid3\_taste\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03312}03312         \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__raid3_8c_source_l03313}03313         \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__raid3_8c_source_l03314}03314         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__raid3_8c_source_l03315}03315         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03316}03316                 error = \mbox{\hyperlink{g__raid3_8c_aa8e10436037e4c49ea411c850f53ea27}{g\_raid3\_read\_metadata}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03317}03317                 \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03318}03318         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03319}03319         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03320}03320         \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03321}03321         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03322}03322                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03323}03323         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03324}03324 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03325}03325         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__raid3__metadata_ac421dfa4e0c0df94e903f34678f539da}{md\_provider}}[0] != \textcolor{charliteral}{'\(\backslash\)0'} \&\&}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03326}03326             !\mbox{\hyperlink{geom_8h_aa938569bc5b975d490103a88a5cfcb02}{g\_compare\_names}}(md.\mbox{\hyperlink{structg__raid3__metadata_ac421dfa4e0c0df94e903f34678f539da}{md\_provider}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}))}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03327}03327                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03328}03328         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__raid3__metadata_a381b7ff0993cad7f7beac9c92ab9578a}{md\_provsize}} != 0 \&\& md.\mbox{\hyperlink{structg__raid3__metadata_a381b7ff0993cad7f7beac9c92ab9578a}{md\_provsize}} != \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03329}03329                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03330}03330         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_a04fb8e0d470bbdee2de52db054113120}{g\_raid3\_debug}} >= 2)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03331}03331                 \mbox{\hyperlink{g__raid3_8h_a99510da5714d0ee65aa6832d46534040}{raid3\_metadata\_dump}}(\&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03332}03332 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03333}03333         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03334}03334 \textcolor{comment}{         * Let's check if device already exists.}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03335}03335 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03336}03336         sc = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03337}03337         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03338}03338                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03339}03339                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03340}03340                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03341}03341                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}} == \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03342}03342                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03343}03343                 \textcolor{keywordflow}{if} (strcmp(md.\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}}, sc-\/>sc\_name) != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03344}03344                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03345}03345                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__raid3__metadata_ad5e1967c9fb4431227df8752beb43b83}{md\_id}} != sc-\/>\mbox{\hyperlink{structg__raid3__softc_ad7f46106047c0e4fa1fe3203a72a6aaf}{sc\_id}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03346}03346                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s already configured."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03347}03347                             sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03348}03348                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03349}03349                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03350}03350                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03351}03351         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03352}03352         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03353}03353                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__raid3_8c_ac59c50e4b795076734cfd33b73f75971}{g\_raid3\_create}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03354}03354                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03355}03355                         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot create device \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03356}03356                             md.\mbox{\hyperlink{structg__raid3__metadata_a0af55078b46a6905d5121e8e02035680}{md\_name}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03357}03357                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03358}03358                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03359}03359                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03360}03360         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03361}03361         \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_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__raid3_8c_source_l03362}03362         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03363}03363         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03364}03364         error = \mbox{\hyperlink{g__raid3_8c_a57067dc9d2716940c7591ba5f98882fb}{g\_raid3\_add\_disk}}(sc, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03365}03365         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03366}03366                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot add disk \%s to \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03367}03367                     \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}}, error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03368}03368                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_af4f9dadf111857efba453a3101b07bea}{g\_raid3\_ndisks}}(sc, \mbox{\hyperlink{g__raid3_8h_a23880652d23a8744a43f641a669670e4}{G\_RAID3\_DISK\_STATE\_NODISK}}) ==}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03369}03369                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03370}03370                         \mbox{\hyperlink{geom_8h_a3671f3c7fc5dbdd70514c2e2ad07feda}{g\_cancel\_event}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03371}03371                         \mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{g\_raid3\_destroy}}(sc, \mbox{\hyperlink{g__raid3_8h_aa1ba8eb299604128427b6a4bb03b5fd9}{G\_RAID3\_DESTROY\_HARD}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03372}03372                         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03373}03373                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03374}03374                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03375}03375                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03376}03376         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03377}03377         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03378}03378         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03379}03379         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03380}03380 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03381}03381 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03382}03382 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03383}\mbox{\hyperlink{g__raid3_8c_a32b506e9c063284032a217272130ecc2}{03383}} \mbox{\hyperlink{g__raid3_8c_acc01b863af9c3e1fe2779dee9c91c231}{g\_raid3\_destroy\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} \_\_unused, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}} \_\_unused,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03384}03384     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03385}03385 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03386}03386         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03387}03387         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03388}03388 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03389}03389         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03390}03390         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03391}03391         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03392}03392         \mbox{\hyperlink{geom_8h_a3671f3c7fc5dbdd70514c2e2ad07feda}{g\_cancel\_event}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03393}03393         error = \mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{g\_raid3\_destroy}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}}, \mbox{\hyperlink{g__raid3_8h_a9cdb38eaf9670811d5e532aa8eccee1c}{G\_RAID3\_DESTROY\_SOFT}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03394}03394         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03395}03395                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03396}03396         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03397}03397         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03398}03398 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03399}03399 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03400}03400 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03401}\mbox{\hyperlink{g__raid3_8c_aa29604f847129f55c596eb743773dd72}{03401}} \mbox{\hyperlink{g__raid3_8c_aa29604f847129f55c596eb743773dd72}{g\_raid3\_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__raid3_8c_source_l03402}03402     \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__raid3_8c_source_l03403}03403 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03404}03404         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03405}03405 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03406}03406         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03407}03407 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03408}03408         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03409}03409         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03410}03410                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03411}03411         \textcolor{comment}{/* Skip synchronization geom. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03412}03412         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03413}03413                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03414}03414         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03415}03415                 \textcolor{comment}{/* Nothing here. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03416}03416         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03417}03417                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__disk}{g\_raid3\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03418}03418 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03419}03419                 \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03420}03420                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03421}03421                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03422}03422                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03423}03423                 sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03424}03424                 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__raid3_8c_source_l03425}03425                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_no == sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03426}03426                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}PARITY"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03427}03427                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03428}03428                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}DATA"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03429}03429                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</Type>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03430}03430                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Number>\%u</Number>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03431}03431                     (u\_int)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_no);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03432}03432                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid3_8h_a0150c5484e167f11ca4a00f1567b66ff}{G\_RAID3\_DISK\_STATE\_SYNCHRONIZING}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03433}03433                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Synchronized>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03434}03434                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03435}03435                                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}0\%"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03436}03436                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03437}03437                                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%u\%\%"{}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03438}03438                                     (u\_int)((\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset * 100) /}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03439}03439                                     (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a695e7742c6f6a2879c64817fd9af6bda}{sc\_mediasize}} / (sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}} -\/ 1))));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03440}03440                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03441}03441                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</Synchronized>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03442}03442                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset > 0) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03443}03443                                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<BytesSynced>\%jd"{}}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03444}03444                                     \textcolor{stringliteral}{"{}</BytesSynced>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03445}03445                                     (intmax\_t)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_offset);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03446}03446                         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03447}03447                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03448}03448                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<SyncID>\%u</SyncID>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03449}03449                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_sync.ds\_syncid);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03450}03450                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<GenID>\%u</GenID>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_genid);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03451}03451                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Flags>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03452}03452                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03453}03453                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}NONE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03454}03454                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03455}03455                         \textcolor{keywordtype}{int} first = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03456}03456 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03457}03457 \textcolor{preprocessor}{\#define ADD\_FLAG(flag, name)    do \{                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03458}03458 \textcolor{preprocessor}{        if ((disk-\/>d\_flags \& (flag)) != 0) \{                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03459}03459 \textcolor{preprocessor}{                if (!first)                                             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03460}03460 \textcolor{preprocessor}{                        sbuf\_cat(sb, "{}, "{}});                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03461}03461                 else                                                    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03462}03462                         first = 0;                                      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03463}03463                 sbuf\_cat(sb, name);                                     \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03464}03464         \}                                                               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03465}03465 \} while (0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03466}03466                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a44e1359eb76e703ef241a3bb6f51bf7c}{G\_RAID3\_DISK\_FLAG\_DIRTY}}, \textcolor{stringliteral}{"{}DIRTY"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03467}03467                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a716568d6e59e37d05e95bda2ce7e6e8c}{G\_RAID3\_DISK\_FLAG\_HARDCODED}}, \textcolor{stringliteral}{"{}HARDCODED"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03468}03468                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a5ab166d3a0034408df43cdba111991c7}{G\_RAID3\_DISK\_FLAG\_SYNCHRONIZING}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03469}03469                             \textcolor{stringliteral}{"{}SYNCHRONIZING"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03470}03470                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a5282abc5a8e372654d24cac5b7d0302b}{G\_RAID3\_DISK\_FLAG\_FORCE\_SYNC}}, \textcolor{stringliteral}{"{}FORCE\_SYNC"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03471}03471                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_ab7e2febcd89666181191db4f2b004935}{G\_RAID3\_DISK\_FLAG\_BROKEN}}, \textcolor{stringliteral}{"{}BROKEN"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03472}03472 \textcolor{preprocessor}{\#undef  ADD\_FLAG}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03473}03473                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03474}03474                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</Flags>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03475}03475                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<State>\%s</State>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03476}03476                     \mbox{\hyperlink{g__raid3_8c_ae67dba97c97ba4f5b305e0f5e5d86ed7}{g\_raid3\_disk\_state2str}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03477}03477                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03478}03478                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03479}03479         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03480}03480                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03481}03481                 sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03482}03482                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__raid3_8c_aaf3d31426f8d614053119916c14972fb}{g\_raid3\_use\_malloc}}) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03483}03483                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03484}03484                             \textcolor{stringliteral}{"{}\%s<Zone4kRequested>\%u</Zone4kRequested>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03485}03485                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03486}03486                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03487}03487                             \textcolor{stringliteral}{"{}\%s<Zone4kFailed>\%u</Zone4kFailed>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03488}03488                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa84158e287a1d0a2b7474ddc4a552f175}{G\_RAID3\_ZONE\_4K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03489}03489                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03490}03490                             \textcolor{stringliteral}{"{}\%s<Zone16kRequested>\%u</Zone16kRequested>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03491}03491                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03492}03492                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03493}03493                             \textcolor{stringliteral}{"{}\%s<Zone16kFailed>\%u</Zone16kFailed>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03494}03494                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aab82a7648b00b6668a1c67dee684b10fc}{G\_RAID3\_ZONE\_16K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03495}03495                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03496}03496                             \textcolor{stringliteral}{"{}\%s<Zone64kRequested>\%u</Zone64kRequested>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03497}03497                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_ab30fe115c9b1d71a3de21170f7accab5}{sz\_requested}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03498}03498                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03499}03499                             \textcolor{stringliteral}{"{}\%s<Zone64kFailed>\%u</Zone64kFailed>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03500}03500                             sc-\/>\mbox{\hyperlink{structg__raid3__softc_a9b2e8af3c15f8454b0812cf9ad83c311}{sc\_zones}}[\mbox{\hyperlink{g__raid3_8h_a0831823dc664aed71495a751dc4c312aa70522ed26ea9c6f3d541349297356edb}{G\_RAID3\_ZONE\_64K}}].\mbox{\hyperlink{structg__raid3__softc_1_1g__raid3__zone_a98d866972e89c46907d54d316aa1a11e}{sz\_failed}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03501}03501                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03502}03502                 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__raid3__softc_ad7f46106047c0e4fa1fe3203a72a6aaf}{sc\_id}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03503}03503                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<SyncID>\%u</SyncID>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, sc-\/>\mbox{\hyperlink{structg__raid3__softc_a0323f2ba66fcb0be4893b7e55c5b8471}{sc\_syncid}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03504}03504                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<GenID>\%u</GenID>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, sc-\/>\mbox{\hyperlink{structg__raid3__softc_a79ba5892e34e1cf4e6df4612fe637b82}{sc\_genid}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03505}03505                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Flags>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03506}03506                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid3__softc_a011a06cea7329cede6169b2437c27d68}{sc\_flags}} == 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03507}03507                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}NONE"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03508}03508                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03509}03509                         \textcolor{keywordtype}{int} first = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03510}03510 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03511}03511 \textcolor{preprocessor}{\#define ADD\_FLAG(flag, name)    do \{                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03512}03512 \textcolor{preprocessor}{        if ((sc-\/>sc\_flags \& (flag)) != 0) \{                             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03513}03513 \textcolor{preprocessor}{                if (!first)                                             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03514}03514 \textcolor{preprocessor}{                        sbuf\_cat(sb, "{}, "{}});                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03515}03515                 else                                                    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03516}03516                         first = 0;                                      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03517}03517                 sbuf\_cat(sb, name);                                     \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03518}03518         \}                                                               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03519}03519 \} while (0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03520}03520                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_acd0b9737417b02e49e34410aca1a4407}{G\_RAID3\_DEVICE\_FLAG\_NOFAILSYNC}}, \textcolor{stringliteral}{"{}NOFAILSYNC"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03521}03521                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a0a94748b2d425a256c3cef0f51ad5176}{G\_RAID3\_DEVICE\_FLAG\_NOAUTOSYNC}}, \textcolor{stringliteral}{"{}NOAUTOSYNC"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03522}03522                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a3fea077718788462e655b1363fe0bcc9}{G\_RAID3\_DEVICE\_FLAG\_ROUND\_ROBIN}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03523}03523                             \textcolor{stringliteral}{"{}ROUND-\/ROBIN"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03524}03524                         \mbox{\hyperlink{g__raid3_8c_aed5d578099fba8a1736aba56bfaf1499}{ADD\_FLAG}}(\mbox{\hyperlink{g__raid3_8h_a4b40ddb04da52a14bd04c8761802a99f}{G\_RAID3\_DEVICE\_FLAG\_VERIFY}}, \textcolor{stringliteral}{"{}VERIFY"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03525}03525 \textcolor{preprocessor}{\#undef  ADD\_FLAG}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03526}03526                 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03527}03527                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</Flags>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03528}03528                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Components>\%u</Components>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03529}03529                     sc-\/>\mbox{\hyperlink{structg__raid3__softc_afd1f0415f8b8a02296dd1d9d0119f742}{sc\_ndisks}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03530}03530                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<State>\%s</State>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03531}03531                     \mbox{\hyperlink{g__raid3_8c_ada82273dfb9bb7987dada26d7a084c32}{g\_raid3\_device\_state2str}}(sc-\/>\mbox{\hyperlink{structg__raid3__softc_ae648e9e740d2c051d05477c28e7d1793}{sc\_state}}));}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03532}03532                 sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03533}03533                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03534}03534         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03535}03535 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03536}03536 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03537}03537 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03538}\mbox{\hyperlink{g__raid3_8c_a502085215dafcc2ed53607ab60fae8a8}{03538}} \mbox{\hyperlink{g__raid3_8c_a502085215dafcc2ed53607ab60fae8a8}{g\_raid3\_shutdown\_post\_sync}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} howto)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03539}03539 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03540}03540         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03541}03541         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, *gp2;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03542}03542         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid3__softc}{g\_raid3\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03543}03543         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03544}03544 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03545}03545         \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}} = arg;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03546}03546         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03547}03547         \mbox{\hyperlink{g__raid3_8c_a042266d8a642d531324027bbb446c614}{g\_raid3\_shutdown}} = 1;}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03548}03548         LIST\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom, gp2) \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03549}03549                 \textcolor{keywordflow}{if} ((sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}}) == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03550}03550                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03551}03551                 \textcolor{comment}{/* Skip synchronization geom. */}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03552}03552                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == sc-\/>\mbox{\hyperlink{structg__raid3__softc_aba469524145c7925edb59ae621c6b096}{sc\_sync}}.\mbox{\hyperlink{structg__raid3__device__sync_a3e51729353d5647522ebf0a68f33ee39}{ds\_geom}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03553}03553                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03554}03554                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03555}03555                 sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03556}03556                 \mbox{\hyperlink{g__raid3_8c_a04b035fceb386b932e93a04447edc72f}{g\_raid3\_idle}}(sc, -\/1);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03557}03557                 \mbox{\hyperlink{geom_8h_a3671f3c7fc5dbdd70514c2e2ad07feda}{g\_cancel\_event}}(sc);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03558}03558                 error = \mbox{\hyperlink{g__raid3_8c_afb1bfaa6ba075dab0bf4312e029e3456}{g\_raid3\_destroy}}(sc, \mbox{\hyperlink{g__raid3_8h_ad298256ea32dcbe2f2c51b7dfe5eccc4}{G\_RAID3\_DESTROY\_DELAYED}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03559}03559                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03560}03560                         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid3__softc_aca20630fe4f35786b58c2aa0affeeffd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03561}03561                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03562}03562         \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03563}03563         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03564}03564 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03565}03565 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03566}03566 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03567}\mbox{\hyperlink{g__raid3_8c_a0cf1f5d9eb2c18575211cdda2688d4ea}{03567}} \mbox{\hyperlink{g__raid3_8c_a0cf1f5d9eb2c18575211cdda2688d4ea}{g\_raid3\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03568}03568 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03569}03569 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03570}03570         \mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{g\_raid3\_post\_sync}} = EVENTHANDLER\_REGISTER(shutdown\_post\_sync,}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03571}03571             \mbox{\hyperlink{g__raid3_8c_a502085215dafcc2ed53607ab60fae8a8}{g\_raid3\_shutdown\_post\_sync}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, SHUTDOWN\_PRI\_FIRST);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03572}03572         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{g\_raid3\_post\_sync}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03573}03573                 \mbox{\hyperlink{g__raid3_8h_a913d92272bb4c849449b1ee6ff9d57d6}{G\_RAID3\_DEBUG}}(0, \textcolor{stringliteral}{"{}Warning! Cannot register shutdown event."{}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03574}03574 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03575}03575 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03576}03576 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03577}\mbox{\hyperlink{g__raid3_8c_a75753c442aaed0aa237ea0140c189f3b}{03577}} \mbox{\hyperlink{g__raid3_8c_a75753c442aaed0aa237ea0140c189f3b}{g\_raid3\_fini}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03578}03578 \{}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03579}03579 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03580}03580         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{g\_raid3\_post\_sync}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03581}03581                 EVENTHANDLER\_DEREGISTER(shutdown\_post\_sync, \mbox{\hyperlink{g__raid3_8c_ab1651af559e0db41c6d89a58f07a71ae}{g\_raid3\_post\_sync}});}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03582}03582 \}}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03583}03583 }
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03584}\mbox{\hyperlink{g__raid3_8c_ab07d581b155aaf0f87626a7699515004}{03584}} \mbox{\hyperlink{g__raid3_8c_ab07d581b155aaf0f87626a7699515004}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{g__raid3_8c_aa70f0fd650131e39e9d62774598be3b1}{g\_raid3\_class}}, g\_raid3);}
\DoxyCodeLine{\Hypertarget{g__raid3_8c_source_l03585}\mbox{\hyperlink{g__raid3_8c_ac99904e1d7458bb49fe6d418fd08594a}{03585}} \mbox{\hyperlink{g__raid3_8c_ac99904e1d7458bb49fe6d418fd08594a}{MODULE\_VERSION}}(geom\_raid3, 0);}

\end{DoxyCode}
