\hypertarget{geom__vinum__volume_8c_source}{}\doxysection{geom\+\_\+vinum\+\_\+volume.\+c}
\label{geom__vinum__volume_8c_source}\index{geom/vinum/geom\_vinum\_volume.c@{geom/vinum/geom\_vinum\_volume.c}}
\mbox{\hyperlink{geom__vinum__volume_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2007 Lukas Ertl}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00030}\mbox{\hyperlink{geom__vinum__volume_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{geom__vinum__volume_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__vinum__var_8h}{geom/vinum/geom\_vinum\_var.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__vinum_8h}{geom/vinum/geom\_vinum.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00042}00042 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00043}\mbox{\hyperlink{geom__vinum_8h_ac3c3b4ba779a99e146f3c46a974f6e3e}{00043}} \mbox{\hyperlink{geom__vinum__volume_8c_a62380e344f73b81e29e9c00b851b6e3c}{gv\_volume\_flush}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__volume}{gv\_volume}} *v)}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00044}00044 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00045}00045         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__softc}{gv\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00046}00046         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00048}00048         KASSERT(v != NULL, (\textcolor{stringliteral}{"{}NULL v"{}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00049}00049         sc = v-\/>\mbox{\hyperlink{structgv__volume_ac506c896287304f39a7beff5a450d63b}{vinumconf}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00050}00050         KASSERT(sc != NULL, (\textcolor{stringliteral}{"{}NULL sc"{}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00052}00052         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = bioq\_takefirst(v-\/>\mbox{\hyperlink{structgv__volume_a3dac8fbcbadf0de1ad609fbe91e4a8f0}{wqueue}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00053}00053         \textcolor{keywordflow}{while} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00054}00054                 \mbox{\hyperlink{geom__vinum__volume_8c_a75f53f49984ee40a922fa9c9c4e4a51b}{gv\_volume\_start}}(sc, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00055}00055                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = bioq\_takefirst(v-\/>\mbox{\hyperlink{structgv__volume_a3dac8fbcbadf0de1ad609fbe91e4a8f0}{wqueue}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00056}00056         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00057}00057 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00059}00059 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00060}\mbox{\hyperlink{geom__vinum_8h_ae7b52722ee90d90e75e0a13c9244e92b}{00060}} \mbox{\hyperlink{geom__vinum__volume_8c_a75f53f49984ee40a922fa9c9c4e4a51b}{gv\_volume\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__softc}{gv\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00061}00061 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00062}00062         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *v;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00063}00063         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *p, *lp;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00064}00064         \textcolor{keywordtype}{int} numwrites;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00066}00066         v = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>private;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00067}00067         \textcolor{keywordflow}{if} (v == NULL || v-\/>\mbox{\hyperlink{structgv__volume_a54dd71f304a3aefc237c7cef1dac9777}{state}} != \mbox{\hyperlink{geom__vinum__var_8h_a8844be9458f8ec729320775c16ccc542}{GV\_VOL\_UP}}) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00068}00068                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00069}00069                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00070}00070         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00072}00072         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00073}00073         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00074}00074                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00075}00075 \textcolor{comment}{                 * Try to find a good plex where we can send the request to,}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00076}00076 \textcolor{comment}{                 * round-\/robin-\/style.  The plex either has to be up, or it's a}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00077}00077 \textcolor{comment}{                 * degraded RAID5 plex. Check if we have delayed requests. Put}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00078}00078 \textcolor{comment}{                 * this request on the delayed queue if so. This makes sure that}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00079}00079 \textcolor{comment}{                 * we don't read old values.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00080}00080 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00081}00081                 \textcolor{keywordflow}{if} (bioq\_first(v-\/>\mbox{\hyperlink{structgv__volume_a3dac8fbcbadf0de1ad609fbe91e4a8f0}{wqueue}}) != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00082}00082                         bioq\_insert\_tail(v-\/>\mbox{\hyperlink{structgv__volume_a3dac8fbcbadf0de1ad609fbe91e4a8f0}{wqueue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00083}00083                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00084}00084                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00085}00085                 lp = v-\/>\mbox{\hyperlink{structgv__volume_a349b7fc1e9087ff860b38ff4075e3345}{last\_read\_plex}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00086}00086                 \textcolor{keywordflow}{if} (lp == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00087}00087                         lp = LIST\_FIRST(\&v-\/>plexes);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00088}00088                 p = LIST\_NEXT(lp, in\_volume);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00089}00089                 \textcolor{keywordflow}{if} (p == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00090}00090                         p = LIST\_FIRST(\&v-\/>plexes);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00091}00091                 \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00092}00092                         \textcolor{keywordflow}{if} (p == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00093}00093                                 p = lp;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00094}00094                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00095}00095                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00096}00096                         \textcolor{keywordflow}{if} ((p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} > \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}}) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00097}00097                             (p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} >= \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}} \&\&}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00098}00098                             p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} == \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00099}00099                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00100}00100                         p = LIST\_NEXT(p, in\_volume);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00101}00101                         \textcolor{keywordflow}{if} (p == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00102}00102                                 p = LIST\_FIRST(\&v-\/>plexes);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00103}00103                 \} \textcolor{keywordflow}{while} (p != lp);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00105}00105                 \textcolor{keywordflow}{if} ((p == NULL) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00106}00106                     (p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} == \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}} \&\& p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} < \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}}) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00107}00107                     (p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} != \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}} \&\& p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} <= \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00108}00108                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00109}00109                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00110}00110                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00111}00111                 v-\/>\mbox{\hyperlink{structgv__volume_a349b7fc1e9087ff860b38ff4075e3345}{last\_read\_plex}} = p;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00113}00113                 \textcolor{comment}{/* Hand it down to the plex logic. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00114}00114                 \mbox{\hyperlink{geom__vinum_8h_ac212bdb50a45c80bd5ed5a01d06d1524}{gv\_plex\_start}}(p, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00115}00115                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00117}00117         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00118}00118         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00119}00119                 \textcolor{comment}{/* Delay write-\/requests if any plex is synchronizing. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00120}00120                 LIST\_FOREACH(p, \&v-\/>plexes, in\_volume) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00121}00121                         \textcolor{keywordflow}{if} (p-\/>\mbox{\hyperlink{structgv__plex_a5c5a39055cb50589d0f9ee76860d6a12}{flags}} \& \mbox{\hyperlink{geom__vinum__var_8h_ae2f57f1186f28adbc12ccf3984be2fc2}{GV\_PLEX\_SYNCING}}) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00122}00122                                 bioq\_insert\_tail(v-\/>\mbox{\hyperlink{structgv__volume_a3dac8fbcbadf0de1ad609fbe91e4a8f0}{wqueue}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00123}00123                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00124}00124                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00125}00125                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00127}00127                 numwrites = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00128}00128                 \textcolor{comment}{/* Give the BIO to each plex of this volume. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00129}00129                 LIST\_FOREACH(p, \&v-\/>plexes, in\_volume) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00130}00130                         \textcolor{keywordflow}{if} (p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} < \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00131}00131                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00132}00132                         \mbox{\hyperlink{geom__vinum_8h_ac212bdb50a45c80bd5ed5a01d06d1524}{gv\_plex\_start}}(p, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00133}00133                         numwrites++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00134}00134                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00135}00135                 \textcolor{keywordflow}{if} (numwrites == 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00136}00136                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00137}00137                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00138}00138         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00139}00139 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00141}00141 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00142}\mbox{\hyperlink{geom__vinum_8h_ae22a238c4c524e754e884c1151c7f617}{00142}} \mbox{\hyperlink{geom__vinum__volume_8c_a64d81f8cfd3484f90278a1f7bef65477}{gv\_bio\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__softc}{gv\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00143}00143 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00144}00144         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *v \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00145}00145         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *p;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00146}00146         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__sd}{gv\_sd}} *s;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00148}00148         s = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00149}00149         KASSERT(s != NULL, (\textcolor{stringliteral}{"{}gv\_bio\_done: NULL s"{}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00150}00150         p = s-\/>\mbox{\hyperlink{structgv__sd_a6894be1eac4716d6eb2bd9e08b9643cf}{plex\_sc}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00151}00151         KASSERT(p != NULL, (\textcolor{stringliteral}{"{}gv\_bio\_done: NULL p"{}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00152}00152         v = p-\/>\mbox{\hyperlink{structgv__plex_a8e2820d6bd8419d81213f77131d6bd5c}{vol\_sc}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00153}00153         KASSERT(v != NULL, (\textcolor{stringliteral}{"{}gv\_bio\_done: NULL v"{}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00155}00155         \textcolor{keywordflow}{switch} (p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}}) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00156}00156         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a49fa4ea4e60154b1e54c70eb1f53cf19}{GV\_PLEX\_CONCAT}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00157}00157         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a02ae949789d43dde7a6e5540aab97beb}{GV\_PLEX\_STRIPED}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00158}00158                 \mbox{\hyperlink{geom__vinum_8h_a18cad16b8360b4d36754f5600161e88b}{gv\_plex\_normal\_done}}(p, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00159}00159                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00160}00160         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00161}00161                 \mbox{\hyperlink{geom__vinum_8h_affa7a16371d86054a5a180ada7598881}{gv\_plex\_raid5\_done}}(p, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00162}00162                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00163}00163         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00165}00165         \mbox{\hyperlink{geom__vinum_8h_a6f92d3f6dc698f442cbb8f28284ec572}{gv\_drive\_done}}(s-\/>\mbox{\hyperlink{structgv__sd_a2b31867e2118053e8a27ce048a84335e}{drive\_sc}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__volume_8c_source_l00166}00166 \}}

\end{DoxyCode}
