\hypertarget{g__union_8c_source}{}\doxysection{g\+\_\+union.\+c}
\label{g__union_8c_source}\index{geom/union/g\_union.c@{geom/union/g\_union.c}}
\mbox{\hyperlink{g__union_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2022 Marshall Kirk McKusick <mckusick@mckusick.com>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00006}00006 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00007}00007 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00008}00008 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00009}00009 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00011}00011 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00013}00013 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00014}00014 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00015}00015 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00016}00016 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00017}00017 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00018}00018 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00019}00019 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00020}00020 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00021}00021 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00022}00022 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00023}00023 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00024}00024 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00025}00025 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00028}00028 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/buf.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/ctype.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/reboot.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/rwlock.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__union_8h}{geom/union/g\_union.h}}>}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00045}\mbox{\hyperlink{g__union_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{00045}} \mbox{\hyperlink{g__union_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{SYSCTL\_DECL}}(\_kern\_geom);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00046}\mbox{\hyperlink{g__union_8c_afab2cb298afff13a966450e12ab512b4}{00046}} \textcolor{keyword}{static} \mbox{\hyperlink{g__union_8c_afab2cb298afff13a966450e12ab512b4}{SYSCTL\_NODE}}(\_kern\_geom, OID\_AUTO, \textcolor{keyword}{union}, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00047}00047     \textcolor{stringliteral}{"{}GEOM\_UNION stuff"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00048}\mbox{\hyperlink{g__union_8c_ae9de182857ad3222fd79180f6eced6dd}{00048}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{g__union_8c_ae9de182857ad3222fd79180f6eced6dd}{g\_union\_debug}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00049}\mbox{\hyperlink{g__union_8c_acc2dc5bdf304147e28e1c274af16d686}{00049}} \mbox{\hyperlink{g__union_8c_acc2dc5bdf304147e28e1c274af16d686}{SYSCTL\_UINT}}(\_kern\_geom\_union, OID\_AUTO, debug, CTLFLAG\_RW, \&\mbox{\hyperlink{g__union_8c_ae9de182857ad3222fd79180f6eced6dd}{g\_union\_debug}}, 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00050}00050     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00052}00052 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a536c9e4a14966ccfaf1be54ebdfc64e2}{g\_union\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00053}00053     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00054}\mbox{\hyperlink{g__union_8c_aa377a0e5c3b580d703ce628531cc9326}{00054}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a68544c65a4d728ce733305aeba2f335b}{g\_access\_t}} \mbox{\hyperlink{g__union_8c_aa377a0e5c3b580d703ce628531cc9326}{g\_union\_access}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00055}\mbox{\hyperlink{g__union_8c_a8fce8d23fea4df7fd2007cca46e38a5e}{00055}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a2a6559adb145f83df6a58cfbc2be6759}{g\_start\_t}} \mbox{\hyperlink{g__union_8c_a8fce8d23fea4df7fd2007cca46e38a5e}{g\_union\_start}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00056}\mbox{\hyperlink{g__union_8c_af4a8e56a695cbd94c157e901e4047531}{00056}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_afdb390a9279523d96cb700a712939f76}{g\_dumpconf\_t}} \mbox{\hyperlink{g__union_8c_af4a8e56a695cbd94c157e901e4047531}{g\_union\_dumpconf}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00057}\mbox{\hyperlink{g__union_8c_a6fe6cdb893b964250422f235f3c748b1}{00057}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_aa5c4a4aeb29f435dd74719b92e830c89}{g\_orphan\_t}} \mbox{\hyperlink{g__union_8c_a6fe6cdb893b964250422f235f3c748b1}{g\_union\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00058}00058 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__union_8c_a799855a1e8d3a1562eb9b8e08e0a289e}{g\_union\_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__union_8c_source_l00059}00059     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00060}\mbox{\hyperlink{g__union_8c_a0f829870991b9292b3c288e9938fcda3}{00060}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a3a6311aa5fd2115a78308461aa54ab29}{g\_provgone\_t}} \mbox{\hyperlink{g__union_8c_a0f829870991b9292b3c288e9938fcda3}{g\_union\_providergone}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00061}\mbox{\hyperlink{g__union_8c_a6c0871ed8bfacc20a4a879a3d9b0266b}{00061}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a3c5b058637985c6eb4ef8d442e69e173}{g\_resize\_t}} \mbox{\hyperlink{g__union_8c_a6c0871ed8bfacc20a4a879a3d9b0266b}{g\_union\_resize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00063}\mbox{\hyperlink{g__union_8c_a87e9683a8b5393c9c3a5b013e31e5ed3}{00063}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{g__union_8c_a87e9683a8b5393c9c3a5b013e31e5ed3}{g\_union\_class}} = \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00064}00064         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}} = \mbox{\hyperlink{g__union_8h_ac7b12b9f78ed91db553e258c53212885}{G\_UNION\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00065}00065         .version = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00066}00066         .ctlreq = \mbox{\hyperlink{g__union_8c_a536c9e4a14966ccfaf1be54ebdfc64e2}{g\_union\_config}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00067}00067         .access = \mbox{\hyperlink{g__union_8c_aa377a0e5c3b580d703ce628531cc9326}{g\_union\_access}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00068}00068         .start = \mbox{\hyperlink{g__union_8c_a8fce8d23fea4df7fd2007cca46e38a5e}{g\_union\_start}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00069}00069         .dumpconf = \mbox{\hyperlink{g__union_8c_af4a8e56a695cbd94c157e901e4047531}{g\_union\_dumpconf}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00070}00070         .orphan = \mbox{\hyperlink{g__union_8c_a6fe6cdb893b964250422f235f3c748b1}{g\_union\_orphan}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00071}00071         .destroy\_geom = \mbox{\hyperlink{g__union_8c_a799855a1e8d3a1562eb9b8e08e0a289e}{g\_union\_destroy\_geom}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00072}00072         .providergone = \mbox{\hyperlink{g__union_8c_a0f829870991b9292b3c288e9938fcda3}{g\_union\_providergone}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00073}00073         .resize = \mbox{\hyperlink{g__union_8c_a6c0871ed8bfacc20a4a879a3d9b0266b}{g\_union\_resize}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00074}00074 \};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00076}00076 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a7dc7c8f2d587f2426d946b384aa890cf}{g\_union\_ctl\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00077}00077 \textcolor{keyword}{static} intmax\_t \mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{g\_union\_fetcharg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00078}00078 \textcolor{keyword}{static} \textcolor{keywordtype}{bool} \mbox{\hyperlink{g__union_8c_a53011b73efbf23e0184c2fc78a93dcc3}{g\_union\_verify\_nprefix}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00079}00079 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_af59542f0d6a2259e2053cff75aeb50d2}{g\_union\_ctl\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00080}00080 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__union_8c_a29a1a27b175fae83bdd25c2b9c6fd951}{g\_union\_find\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00081}00081 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a3167f91e1b820deafe94634a08065d9d}{g\_union\_ctl\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00082}00082 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_aae6a92d2737664de2487d912752afd02}{g\_union\_ctl\_revert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00083}00083 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a99930196a85b3c9219cfbd8c0decc5e2}{g\_union\_revert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00084}00084 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a2159eb5982e4c1862e56a60a02887526}{g\_union\_doio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__wip}{g\_union\_wip}} *wip);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00085}00085 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a732bf609b8a3d37cac833d2a73e0f4e8}{g\_union\_ctl\_commit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_ae651995fb7e35c527ac0d258c9350c04}{g\_union\_setmap}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00087}00087 \textcolor{keyword}{static} \textcolor{keywordtype}{bool} \mbox{\hyperlink{g__union_8c_a27246307752117fa96cce56db4772db2}{g\_union\_getmap}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00088}00088         off\_t *len2read);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00089}00089 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_ae1ee2af20da17fde7729bb926b8ba90d}{g\_union\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00090}00090 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__union_8c_a5656e7cf33fe7d8fb4f974fa32bfdc3b}{g\_union\_kerneldump}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00091}00091 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__union_8c_a75d45270812403dcede4e0f7f5df25c0}{g\_union\_dumper}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{void} *, vm\_offset\_t, off\_t, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00092}00092 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \textcolor{keywordtype}{bool} force);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00094}00094 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00095}00095 \textcolor{comment}{ * Operate on union-\/specific configuration commands.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00096}00096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00097}00097 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00098}\mbox{\hyperlink{g__union_8c_a536c9e4a14966ccfaf1be54ebdfc64e2}{00098}} \mbox{\hyperlink{g__union_8c_a536c9e4a14966ccfaf1be54ebdfc64e2}{g\_union\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00099}00099 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00100}00100         uint32\_t *version, *verbose;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00102}00102         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00104}00104         version = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}version"{}}, \textcolor{keyword}{sizeof}(*version));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00105}00105         \textcolor{keywordflow}{if} (version == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00106}00106                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}version"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00107}00107                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00108}00108         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00109}00109         \textcolor{keywordflow}{if} (*version != \mbox{\hyperlink{g__union_8h_aff96addc01a410d9604098c6ce53518d}{G\_UNION\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00110}00110                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Userland and kernel parts are out of sync."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00111}00111                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00112}00112         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00113}00113         verbose = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}verbose"{}}, \textcolor{keyword}{sizeof}(*verbose));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00114}00114         \textcolor{keywordflow}{if} (verbose == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00115}00115                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}verbose"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00116}00116                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00117}00117         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00118}00118         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}create"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00119}00119                 \mbox{\hyperlink{g__union_8c_a7dc7c8f2d587f2426d946b384aa890cf}{g\_union\_ctl\_create}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, *verbose);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00120}00120                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00121}00121         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}destroy"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00122}00122                 \mbox{\hyperlink{g__union_8c_af59542f0d6a2259e2053cff75aeb50d2}{g\_union\_ctl\_destroy}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, *verbose);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00123}00123                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00124}00124         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}reset"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00125}00125                 \mbox{\hyperlink{g__union_8c_a3167f91e1b820deafe94634a08065d9d}{g\_union\_ctl\_reset}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, *verbose);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00126}00126                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00127}00127         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}revert"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00128}00128                 \mbox{\hyperlink{g__union_8c_aae6a92d2737664de2487d912752afd02}{g\_union\_ctl\_revert}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, *verbose);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00129}00129                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00130}00130         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}commit"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00131}00131                 \mbox{\hyperlink{g__union_8c_a732bf609b8a3d37cac833d2a73e0f4e8}{g\_union\_ctl\_commit}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, *verbose);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00132}00132                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00133}00133         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00135}00135         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown verb."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00136}00136 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00138}00138 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00139}00139 \textcolor{comment}{ * Create a union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00140}00140 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00141}00141 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00142}\mbox{\hyperlink{g__union_8c_a7dc7c8f2d587f2426d946b384aa890cf}{00142}} \mbox{\hyperlink{g__union_8c_a7dc7c8f2d587f2426d946b384aa890cf}{g\_union\_ctl\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool} verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00143}00143 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00144}00144         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *upperpp, *lowerpp, *newpp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00145}00145         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *uppercp, *lowercp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00146}00146         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00147}00147         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom__alias}{g\_geom\_alias}} *gap;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00148}00148         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00149}00149         intmax\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, secsize, size, needed;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00150}00150         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gunionname;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00151}00151         \textcolor{keywordtype}{int} *nargs, error, i, n;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00152}00152         \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[64];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00154}00154         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00156}00156         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00157}00157         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00158}00158                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00159}00159                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00160}00160         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00161}00161         \textcolor{keywordflow}{if} (*nargs < 2) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00162}00162                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00163}00163                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00164}00164         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00165}00165         \textcolor{keywordflow}{if} (*nargs > 2) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00166}00166                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Extra device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00167}00167                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00168}00168         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00170}00170         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = \mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{g\_union\_fetcharg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}offset"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00171}00171         size = \mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{g\_union\_fetcharg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}size"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00172}00172         secsize = \mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{g\_union\_fetcharg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}secsize"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00173}00173         gunionname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}gunionname"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00175}00175         upperpp = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00176}00176         lowerpp = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg1"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00177}00177         \textcolor{keywordflow}{if} (upperpp == NULL || lowerpp == NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00178}00178                 \textcolor{comment}{/* error message provided by gctl\_get\_provider() */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00179}00179                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00180}00180         \textcolor{comment}{/* Create the union */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00181}00181         \textcolor{keywordflow}{if} (secsize == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00182}00182                 secsize = lowerpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00183}00183         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((secsize \% lowerpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00184}00184                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Sector size \%jd is not a multiple of lower "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00185}00185                     \textcolor{stringliteral}{"{}provider \%s's \%jd sector size."{}}, (intmax\_t)secsize,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00186}00186                     lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, (intmax\_t)lowerpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00187}00187                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00188}00188         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00189}00189         \textcolor{keywordflow}{if} (secsize > maxphys) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00190}00190                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Too big secsize \%jd for lower provider \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00191}00191                     (intmax\_t)secsize, lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00192}00192                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00193}00193         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00194}00194         \textcolor{keywordflow}{if} (secsize \% upperpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00195}00195                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Sector size \%jd is not a multiple of upper "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00196}00196                     \textcolor{stringliteral}{"{}provider \%s's \%jd sector size."{}}, (intmax\_t)secsize,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00197}00197                     upperpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, (intmax\_t)upperpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00198}00198                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00199}00199         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00200}00200         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} \% secsize) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00201}00201                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Offset \%jd is not a multiple of lower "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00202}00202                     \textcolor{stringliteral}{"{}provider \%s's \%jd sector size."{}}, (intmax\_t)\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00203}00203                     lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, (intmax\_t)lowerpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00204}00204                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00205}00205         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00206}00206         \textcolor{keywordflow}{if} (size == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00207}00207                 size = lowerpp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00208}00208         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00209}00209                 size -\/= \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00210}00210         \textcolor{keywordflow}{if} ((size \% secsize) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00211}00211                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size \%jd is not a multiple of sector size "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00212}00212                     \textcolor{stringliteral}{"{}\%jd."{}}, (intmax\_t)size, (intmax\_t)secsize);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00213}00213                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00214}00214         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00215}00215         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + size < lowerpp-\/>mediasize) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00216}00216                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size \%jd is too small for lower provider \%s, "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00217}00217                     \textcolor{stringliteral}{"{}needs \%jd."{}}, (intmax\_t)(\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + size), lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00218}00218                     lowerpp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00219}00219                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00220}00220         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00221}00221         \textcolor{keywordflow}{if} (size > upperpp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00222}00222                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Upper provider \%s size (\%jd) is too small, "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00223}00223                     \textcolor{stringliteral}{"{}needs \%jd."{}}, upperpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, (intmax\_t)upperpp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00224}00224                     (intmax\_t)size);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00225}00225                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00226}00226         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00227}00227         \textcolor{keywordflow}{if} (gunionname != NULL \&\& !\mbox{\hyperlink{g__union_8c_a53011b73efbf23e0184c2fc78a93dcc3}{g\_union\_verify\_nprefix}}(gunionname)) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00228}00228                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Gunion name \%s must be alphanumeric."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00229}00229                     gunionname);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00230}00230                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00231}00231         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00232}00232         \textcolor{keywordflow}{if} (gunionname != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00233}00233                 n = snprintf(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}), \textcolor{stringliteral}{"{}\%s\%s"{}}, gunionname,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00234}00234                     \mbox{\hyperlink{g__union_8h_a8acfe3f4ef6fca6c90511e3208074b19}{G\_UNION\_SUFFIX}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00235}00235         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00236}00236                 n = snprintf(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}), \textcolor{stringliteral}{"{}\%s-\/\%s\%s"{}}, upperpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00237}00237                     lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__union_8h_a8acfe3f4ef6fca6c90511e3208074b19}{G\_UNION\_SUFFIX}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00238}00238         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00239}00239         \textcolor{keywordflow}{if} (n <= 0 || n >= \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00240}00240                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid provider name."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00241}00241                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00242}00242         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00243}00243         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00244}00244                 \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00245}00245                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s already exists."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00246}00246                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00247}00247                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00248}00248         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00249}00249         \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"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00250}00250         sc = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(*sc), M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00251}00251         rw\_init(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a40a15a5850b5e9634d6322a4727cae41}{sc\_rwlock}}, \textcolor{stringliteral}{"{}gunion"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00252}00252         TAILQ\_INIT(\&sc-\/>\mbox{\hyperlink{structg__union__softc_adedcb8e24c8f1093b3535bf78ee7732a}{sc\_wiplist}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00253}00253         sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}} = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00254}00254         sc-\/>\mbox{\hyperlink{structg__union__softc_a867419f99cf82ac97d6e27bf86e808dc}{sc\_size}} = size;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00255}00255         sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}} = secsize;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00256}00256         sc-\/>\mbox{\hyperlink{structg__union__softc_aa69c9822e1975dd1a9c1d748928d6441}{sc\_reads}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00257}00257         sc-\/>\mbox{\hyperlink{structg__union__softc_a708904e247e0960a2624b7e31fab212f}{sc\_writes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00258}00258         sc-\/>\mbox{\hyperlink{structg__union__softc_a9a900326e10578e17a88ca5169d63fb6}{sc\_deletes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00259}00259         sc-\/>\mbox{\hyperlink{structg__union__softc_ac4f9304d2590765e0e9cb927ab958c31}{sc\_getattrs}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00260}00260         sc-\/>\mbox{\hyperlink{structg__union__softc_a614e2f62d62755b32c055eacddb5c1e0}{sc\_flushes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00261}00261         sc-\/>\mbox{\hyperlink{structg__union__softc_a098c20a4fc875c650d8370348b23b2e6}{sc\_speedups}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00262}00262         sc-\/>\mbox{\hyperlink{structg__union__softc_aa868cbb5df50a5a0faf7ff9898fa6e52}{sc\_cmd0s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00263}00263         sc-\/>\mbox{\hyperlink{structg__union__softc_ac6242926fa627456a27283bc10baecfe}{sc\_cmd1s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00264}00264         sc-\/>\mbox{\hyperlink{structg__union__softc_ace02475248315cea5372f51f87afa389}{sc\_cmd2s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00265}00265         sc-\/>\mbox{\hyperlink{structg__union__softc_a51d8f432ba251f55ee1dcdebe4e04a86}{sc\_readbytes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00266}00266         sc-\/>\mbox{\hyperlink{structg__union__softc_a8a4977fc8d542045e74c58a7844f4b31}{sc\_wrotebytes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00267}00267         sc-\/>\mbox{\hyperlink{structg__union__softc_acc3998341f14614d505906fcd9c6b25c}{sc\_writemap\_memory}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00268}00268         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00270}00270         newpp = \mbox{\hyperlink{geom_8h_a79a5fe6e79cbc1a257454a3554fa11ef}{g\_new\_providerf}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00271}00271         newpp-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= \mbox{\hyperlink{geom_8h_a486656f757680c7ff0c7ca06b643eb2d}{G\_PF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a36e660dabad70e0fd2439be3ddca8d47}{G\_PF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00272}00272         newpp-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} = size;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00273}00273         newpp-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = secsize;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00274}00274         LIST\_FOREACH(gap, \&upperpp-\/>aliases, ga\_next)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00275}00275                 \mbox{\hyperlink{geom_8h_a14208f360ed869858f7e5878e8940470}{g\_provider\_add\_alias}}(newpp, \textcolor{stringliteral}{"{}\%s\%s"{}}, gap-\/>\mbox{\hyperlink{structg__geom__alias_ae11849a176b7dadc248ec9231ba2a992}{ga\_alias}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00276}00276                     \mbox{\hyperlink{g__union_8h_a8acfe3f4ef6fca6c90511e3208074b19}{G\_UNION\_SUFFIX}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00277}00277         LIST\_FOREACH(gap, \&lowerpp-\/>aliases, ga\_next)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00278}00278                 \mbox{\hyperlink{geom_8h_a14208f360ed869858f7e5878e8940470}{g\_provider\_add\_alias}}(newpp, \textcolor{stringliteral}{"{}\%s\%s"{}}, gap-\/>\mbox{\hyperlink{structg__geom__alias_ae11849a176b7dadc248ec9231ba2a992}{ga\_alias}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00279}00279                     \mbox{\hyperlink{g__union_8h_a8acfe3f4ef6fca6c90511e3208074b19}{G\_UNION\_SUFFIX}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00280}00280         lowercp = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00281}00281         lowercp-\/>\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__union_8c_source_l00282}00282         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(lowercp, lowerpp)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00283}00283                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: cannot attach to provider \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00284}00284                     error, lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00285}00285                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00286}00286         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00287}00287         \textcolor{comment}{/* request read and exclusive access for lower */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00288}00288         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(lowercp, 1, 0, 1)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00289}00289                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: cannot obtain exclusive access to "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00290}00290                     \textcolor{stringliteral}{"{}\%s.\(\backslash\)n\(\backslash\)tMust be unmounted or mounted read-\/only."{}}, error,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00291}00291                     lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00292}00292                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00293}00293         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00294}00294         uppercp = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00295}00295         uppercp-\/>\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__union_8c_source_l00296}00296         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(uppercp, upperpp)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00297}00297                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: cannot attach to provider \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00298}00298                     error, upperpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00299}00299                 \textcolor{keywordflow}{goto} fail3;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00300}00300         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00301}00301         \textcolor{comment}{/* request read, write, and exclusive access for upper */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00302}00302         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(uppercp, 1, 1, 1)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00303}00303                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: cannot obtain write access to \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00304}00304                     error, upperpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00305}00305                 \textcolor{keywordflow}{goto} fail4;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00306}00306         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00307}00307         sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}} = uppercp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00308}00308         sc-\/>\mbox{\hyperlink{structg__union__softc_a33d9026325bde6187127bce1b0a8ba08}{sc\_lowercp}} = lowercp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00310}00310         newpp-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= (upperpp-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} \& \mbox{\hyperlink{geom_8h_a82547ff81813e6e37dd57c36e530c7e2}{G\_PF\_ACCEPT\_UNMAPPED}}) \&}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00311}00311             (lowerpp-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} \& \mbox{\hyperlink{geom_8h_a82547ff81813e6e37dd57c36e530c7e2}{G\_PF\_ACCEPT\_UNMAPPED}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00312}00312         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(newpp, 0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00313}00313         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00314}00314 \textcolor{comment}{         * Allocate the map that tracks the sectors that have been written}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00315}00315 \textcolor{comment}{         * to the top layer. We use a 2-\/level hierarchy as that lets us}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00316}00316 \textcolor{comment}{         * map up to 1 petabyte using allocations of less than 33 Mb}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00317}00317 \textcolor{comment}{         * when using 4K byte sectors (or 268 Mb with 512 byte sectors).}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00318}00318 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00319}00319 \textcolor{comment}{         * We totally populate the leaf nodes rather than allocating them}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00320}00320 \textcolor{comment}{         * as they are first used because their usage occurs in the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00321}00321 \textcolor{comment}{         * g\_union\_start() routine that may be running in the g\_down}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00322}00322 \textcolor{comment}{         * thread which cannot sleep.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00323}00323 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00324}00324         sc-\/>\mbox{\hyperlink{structg__union__softc_a69eee1ed8424e2021f2a45a9c60247ea}{sc\_map\_size}} = roundup(size / secsize, \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00325}00325         needed = sc-\/>\mbox{\hyperlink{structg__union__softc_a69eee1ed8424e2021f2a45a9c60247ea}{sc\_map\_size}} / \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00326}00326         \textcolor{keywordflow}{for} (sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} = 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00327}00327              sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} * sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} < needed;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00328}00328              sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}++)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00329}00329                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00330}00330         sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}} = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} * \textcolor{keyword}{sizeof}(uint64\_t *),}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00331}00331             M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00332}00332         sc-\/>\mbox{\hyperlink{structg__union__softc_a1771e7190c67bdfc7d2c2487b100a6a5}{sc\_leaf\_size}} = sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00333}00333         sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}} = sc-\/>\mbox{\hyperlink{structg__union__softc_a1771e7190c67bdfc7d2c2487b100a6a5}{sc\_leaf\_size}} * \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00334}00334         sc-\/>\mbox{\hyperlink{structg__union__softc_a7b77b0861cf943a2b3f32386df0049d4}{sc\_leafused}} = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(roundup(sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}, \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}),}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00335}00335             M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00336}00336         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}; i++)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00337}00337                 sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}}[i] =}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00338}00338                     \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(sc-\/>\mbox{\hyperlink{structg__union__softc_a1771e7190c67bdfc7d2c2487b100a6a5}{sc\_leaf\_size}} * \textcolor{keyword}{sizeof}(uint64\_t),}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00339}00339                     M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00340}00340         sc-\/>\mbox{\hyperlink{structg__union__softc_acc3998341f14614d505906fcd9c6b25c}{sc\_writemap\_memory}} =}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00341}00341             (sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} + sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}} * sc-\/>\mbox{\hyperlink{structg__union__softc_a1771e7190c67bdfc7d2c2487b100a6a5}{sc\_leaf\_size}}) *}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00342}00342             \textcolor{keyword}{sizeof}(uint64\_t) + roundup(sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}, \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00343}00343         \textcolor{keywordflow}{if} (verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00344}00344                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s created with memory map size \%jd."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00345}00345                     \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, (intmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_acc3998341f14614d505906fcd9c6b25c}{sc\_writemap\_memory}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00346}00346         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s created with memory map size \%jd."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00347}00347             \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, (intmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_acc3998341f14614d505906fcd9c6b25c}{sc\_writemap\_memory}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00348}00348         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00350}00350 fail4:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00351}00351         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(uppercp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00352}00352 fail3:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00353}00353         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(uppercp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00354}00354         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(lowercp, -\/1, 0, -\/1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00355}00355 fail2:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00356}00356         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(lowercp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00357}00357 fail1:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00358}00358         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(lowercp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00359}00359         \mbox{\hyperlink{geom_8h_ab84a7760092168f95cb24fe16c926004}{g\_destroy\_provider}}(newpp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00360}00360         \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00361}00361 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00363}00363 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00364}00364 \textcolor{comment}{ * Fetch named option and verify that it is positive.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00365}00365 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00366}00366 \textcolor{keyword}{static} intmax\_t}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00367}\mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{00367}} \mbox{\hyperlink{g__union_8c_a578c677c1d0b30daf0fd063044b04956}{g\_union\_fetcharg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00368}00368 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00369}00369         intmax\_t *val;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00371}00371         val = \mbox{\hyperlink{geom_8h_ab1b74fb84c5157c09be416bc8b8d9d64}{gctl\_get\_paraml\_opt}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(*val));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00372}00372         \textcolor{keywordflow}{if} (val == NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00373}00373                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00374}00374         \textcolor{keywordflow}{if} (*val >= 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00375}00375                 \textcolor{keywordflow}{return} (*val);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00376}00376         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid '\%s': negative value, using default."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00377}00377         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00378}00378 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00379}00379 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00380}00380 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00381}00381 \textcolor{comment}{ * Verify that a name is alphanumeric.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00382}00382 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00383}00383 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00384}\mbox{\hyperlink{g__union_8c_a53011b73efbf23e0184c2fc78a93dcc3}{00384}} \mbox{\hyperlink{g__union_8c_a53011b73efbf23e0184c2fc78a93dcc3}{g\_union\_verify\_nprefix}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00385}00385 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00386}00386         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00388}00388         \textcolor{keywordflow}{for} (i = 0; i < strlen(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}); i++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00389}00389                 \textcolor{keywordflow}{if} (isalpha(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[i]) == 0 \&\& isdigit(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[i]) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00390}00390                         \textcolor{keywordflow}{return} (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00391}00391                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00392}00392         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00393}00393         \textcolor{keywordflow}{return} (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00394}00394 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00396}00396 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00397}00397 \textcolor{comment}{ * Destroy a union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00398}00398 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00399}00399 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00400}\mbox{\hyperlink{g__union_8c_af59542f0d6a2259e2053cff75aeb50d2}{00400}} \mbox{\hyperlink{g__union_8c_af59542f0d6a2259e2053cff75aeb50d2}{g\_union\_ctl\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool} verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00401}00401 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00402}00402         \textcolor{keywordtype}{int} *nargs, *force, error, i;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00403}00403         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00404}00404         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00405}00405         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00407}00407         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00408}00408 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00409}00409         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00410}00410         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00411}00411                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00412}00412                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00413}00413         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00414}00414         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00415}00415                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00416}00416                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00417}00417         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00418}00418         force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00419}00419         \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00420}00420                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'force' argument."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00421}00421                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00422}00422         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00424}00424         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00425}00425                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00426}00426                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00427}00427                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00428}00428                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00429}00429                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00430}00430                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00431}00431                 \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}})) == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00432}00432                         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00433}00433                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__union_8c_a29a1a27b175fae83bdd25c2b9c6fd951}{g\_union\_find\_geom}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00434}00434                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00435}00435                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00436}00436                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00437}00437                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00438}00438                 error = \mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(verbose ? \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} : NULL, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, *force);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00439}00439                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00440}00440                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: cannot destroy device \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00441}00441                             error, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00442}00442         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00443}00443         \mbox{\hyperlink{geom_8h_a46a56ee1a935196396edd9a0e302e716}{gctl\_post\_messages}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00444}00444 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00446}00446 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00447}00447 \textcolor{comment}{ * Find a union geom.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00448}00448 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00449}00449 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00450}\mbox{\hyperlink{g__union_8c_a29a1a27b175fae83bdd25c2b9c6fd951}{00450}} \mbox{\hyperlink{g__union_8c_a29a1a27b175fae83bdd25c2b9c6fd951}{g\_union\_find\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00451}00451 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00452}00452         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00454}00454         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00455}00455                 \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00456}00456                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00457}00457         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00458}00458         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00459}00459 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00460}00460 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00461}00461 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00462}00462 \textcolor{comment}{ * Zero out all the statistics associated with a union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00463}00463 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00464}00464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00465}\mbox{\hyperlink{g__union_8c_a3167f91e1b820deafe94634a08065d9d}{00465}} \mbox{\hyperlink{g__union_8c_a3167f91e1b820deafe94634a08065d9d}{g\_union\_ctl\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool} verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00466}00466 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00467}00467         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00468}00468         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00469}00469         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00470}00470         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00471}00471         \textcolor{keywordtype}{int} i, *nargs;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00473}00473         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00475}00475         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00476}00476         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00477}00477                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00478}00478                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00479}00479         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00480}00480         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00481}00481                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00482}00482                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00483}00483         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00484}00484 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00485}00485         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00486}00486                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00487}00487                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00488}00488                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00489}00489                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00490}00490                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00491}00491                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00492}00492                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00493}00493                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a502c2ffb3c41ad9d30d9875c678f5404}{class}} != \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00494}00494                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00495}00495                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00496}00496                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00497}00497                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00498}00498                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00499}00499                 sc-\/>\mbox{\hyperlink{structg__union__softc_aa69c9822e1975dd1a9c1d748928d6441}{sc\_reads}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00500}00500                 sc-\/>\mbox{\hyperlink{structg__union__softc_a708904e247e0960a2624b7e31fab212f}{sc\_writes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00501}00501                 sc-\/>\mbox{\hyperlink{structg__union__softc_a9a900326e10578e17a88ca5169d63fb6}{sc\_deletes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00502}00502                 sc-\/>\mbox{\hyperlink{structg__union__softc_ac4f9304d2590765e0e9cb927ab958c31}{sc\_getattrs}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00503}00503                 sc-\/>\mbox{\hyperlink{structg__union__softc_a614e2f62d62755b32c055eacddb5c1e0}{sc\_flushes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00504}00504                 sc-\/>\mbox{\hyperlink{structg__union__softc_a098c20a4fc875c650d8370348b23b2e6}{sc\_speedups}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00505}00505                 sc-\/>\mbox{\hyperlink{structg__union__softc_aa868cbb5df50a5a0faf7ff9898fa6e52}{sc\_cmd0s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00506}00506                 sc-\/>\mbox{\hyperlink{structg__union__softc_ac6242926fa627456a27283bc10baecfe}{sc\_cmd1s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00507}00507                 sc-\/>\mbox{\hyperlink{structg__union__softc_ace02475248315cea5372f51f87afa389}{sc\_cmd2s}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00508}00508                 sc-\/>\mbox{\hyperlink{structg__union__softc_a51d8f432ba251f55ee1dcdebe4e04a86}{sc\_readbytes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00509}00509                 sc-\/>\mbox{\hyperlink{structg__union__softc_a8a4977fc8d542045e74c58a7844f4b31}{sc\_wrotebytes}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00510}00510                 \textcolor{keywordflow}{if} (verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00511}00511                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s has been reset."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00512}00512                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s has been reset."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00513}00513         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00514}00514         \mbox{\hyperlink{geom_8h_a46a56ee1a935196396edd9a0e302e716}{gctl\_post\_messages}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00515}00515 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00517}00517 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00518}00518 \textcolor{comment}{ * Revert all write requests made to the top layer of the union.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00519}00519 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00520}00520 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00521}\mbox{\hyperlink{g__union_8c_aae6a92d2737664de2487d912752afd02}{00521}} \mbox{\hyperlink{g__union_8c_aae6a92d2737664de2487d912752afd02}{g\_union\_ctl\_revert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool} verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00522}00522 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00523}00523         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00524}00524         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00525}00525         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00526}00526         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00527}00527         \textcolor{keywordtype}{int} i, *nargs;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00529}00529         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00531}00531         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00532}00532         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00533}00533                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00534}00534                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00535}00535         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00536}00536         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00537}00537                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00538}00538                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00539}00539         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00541}00541         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00542}00542                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00543}00543                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00544}00544                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00545}00545                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00546}00546                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00547}00547                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00548}00548                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00549}00549                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a502c2ffb3c41ad9d30d9875c678f5404}{class}} != \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00550}00550                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00551}00551                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00552}00552                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00553}00553                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00554}00554                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__union_8h_a7bf15cf1b393255e7a62df03b354083d}{g\_union\_get\_writelock}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00555}00555                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Revert already in progress for "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00556}00556                             \textcolor{stringliteral}{"{}provider \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00557}00557                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00558}00558                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00559}00559                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00560}00560 \textcolor{comment}{                 * No mount or other use of union is allowed.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00561}00561 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00562}00562                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} > 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} > 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} > 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00563}00563                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unable to get exclusive access for "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00564}00564                             \textcolor{stringliteral}{"{}reverting of \%s;\(\backslash\)n\(\backslash\)t\%s cannot be mounted or "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00565}00565                             \textcolor{stringliteral}{"{}otherwise open during a revert."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00566}00566                              \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00567}00567                         \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00568}00568                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00569}00569                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00570}00570                 \mbox{\hyperlink{g__union_8c_a99930196a85b3c9219cfbd8c0decc5e2}{g\_union\_revert}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00571}00571                 \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00572}00572                 \textcolor{keywordflow}{if} (verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00573}00573                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s has been reverted."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00574}00574                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s has been reverted."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00575}00575         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00576}00576         \mbox{\hyperlink{geom_8h_a46a56ee1a935196396edd9a0e302e716}{gctl\_post\_messages}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00577}00577 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00579}00579 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00580}00580 \textcolor{comment}{ * Revert union writes by zero'ing out the writemap.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00581}00581 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00582}00582 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00583}\mbox{\hyperlink{g__union_8c_a99930196a85b3c9219cfbd8c0decc5e2}{00583}} \mbox{\hyperlink{g__union_8c_a99930196a85b3c9219cfbd8c0decc5e2}{g\_union\_revert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00584}00584 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00585}00585         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00586}00586 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00587}00587         \mbox{\hyperlink{g__union_8h_a6eb0d4fae34d6eacc2ce59c18bd96b7c}{G\_WLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00588}00588         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}; i++)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00589}00589                 memset(sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}}[i], 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00590}00590                     sc-\/>\mbox{\hyperlink{structg__union__softc_a1771e7190c67bdfc7d2c2487b100a6a5}{sc\_leaf\_size}} * \textcolor{keyword}{sizeof}(uint64\_t));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00591}00591         memset(sc-\/>\mbox{\hyperlink{structg__union__softc_a7b77b0861cf943a2b3f32386df0049d4}{sc\_leafused}}, 0, roundup(sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}, \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00592}00592         \mbox{\hyperlink{g__union_8h_a39b482408d3c45e322c26a5cc138e2b4}{G\_WUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00593}00593 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00595}00595 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00596}00596 \textcolor{comment}{ * Commit all the writes made in the top layer to the lower layer.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00597}00597 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00598}00598 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00599}\mbox{\hyperlink{g__union_8c_a732bf609b8a3d37cac833d2a73e0f4e8}{00599}} \mbox{\hyperlink{g__union_8c_a732bf609b8a3d37cac833d2a73e0f4e8}{g\_union\_ctl\_commit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keywordtype}{bool} verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00600}00600 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00601}00601         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00602}00602         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, *lowerpp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00603}00603         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *lowercp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00604}00604         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00605}00605         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00606}00606         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00607}00607         off\_t len2rd, len2wt, savelen;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00608}00608         \textcolor{keywordtype}{int} i, error, error1, *nargs, *force, *reboot;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00610}00610         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00611}00611 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00612}00612         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00613}00613         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00614}00614                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00615}00615                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00616}00616         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00617}00617         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00618}00618                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00619}00619                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00620}00620         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00621}00621         force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00622}00622         \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00623}00623                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'force' argument."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00624}00624                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00625}00625         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00626}00626         reboot = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}reboot"{}}, \textcolor{keyword}{sizeof}(*reboot));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00627}00627         \textcolor{keywordflow}{if} (reboot == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00628}00628                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'reboot' argument."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00629}00629                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00630}00630         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00631}00631 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00632}00632         \textcolor{comment}{/* Get a bio buffer to do our I/O */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00633}00633         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = \mbox{\hyperlink{geom_8h_ae13a6895af777c09cf19545f48517fe4}{g\_alloc\_bio}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00634}00634         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(MAXBSIZE, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00635}00635         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_done = biodone;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00636}00636         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00637}00637                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00638}00638                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00639}00639                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00640}00640                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, param);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00641}00641                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00642}00642                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00643}00643                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00644}00644                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a502c2ffb3c41ad9d30d9875c678f5404}{class}} != \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00645}00645                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00646}00646                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00647}00647                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00648}00648                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00649}00649                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__union_8h_a7bf15cf1b393255e7a62df03b354083d}{g\_union\_get\_writelock}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00650}00650                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Commit already in progress for "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00651}00651                             \textcolor{stringliteral}{"{}provider \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00652}00652                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00653}00653                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00654}00654         }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00655}00655                 \textcolor{comment}{/* upgrade to write access for lower */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00656}00656                 lowercp = sc-\/>\mbox{\hyperlink{structg__union__softc_a33d9026325bde6187127bce1b0a8ba08}{sc\_lowercp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00657}00657                 lowerpp = lowercp-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00658}00658                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00659}00659 \textcolor{comment}{                 * No mount or other use of union is allowed, unless the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00660}00660 \textcolor{comment}{                 * -\/f flag is given which allows read-\/only mount or usage.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00661}00661 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00662}00662                 \textcolor{keywordflow}{if} ((*force == \textcolor{keyword}{false} \&\& \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 ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00663}00663                      \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} > 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00664}00664                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unable to get exclusive access for "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00665}00665                             \textcolor{stringliteral}{"{}writing of \%s.\(\backslash\)n\(\backslash\)tNote that \%s cannot be mounted "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00666}00666                             \textcolor{stringliteral}{"{}or otherwise\(\backslash\)n\(\backslash\)topen during a commit unless the "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00667}00667                             \textcolor{stringliteral}{"{}-\/f flag is used."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00668}00668                         \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00669}00669                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00670}00670                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00671}00671                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00672}00672 \textcolor{comment}{                 * No mount or other use of lower media is allowed, unless the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00673}00673 \textcolor{comment}{                 * -\/f flag is given which allows read-\/only mount or usage.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00674}00674 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00675}00675                 \textcolor{keywordflow}{if} ((*force == \textcolor{keyword}{false} \&\& lowerpp-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} > lowercp-\/>\mbox{\hyperlink{structg__consumer_a40c3b377327dc07731eaf19340004033}{acr}}) ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00676}00676                      lowerpp-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} > lowercp-\/>\mbox{\hyperlink{structg__consumer_a28f563df0299e7e1ab9a1121b6e483eb}{acw}} ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00677}00677                      lowerpp-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} > lowercp-\/>\mbox{\hyperlink{structg__consumer_ace7a7f6859bd4cf00ff910bda08bb05a}{ace}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00678}00678                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}provider \%s is unable to get "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00679}00679                             \textcolor{stringliteral}{"{}exclusive access to \%s\(\backslash\)n\(\backslash\)tfor writing. Note that "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00680}00680                             \textcolor{stringliteral}{"{}\%s cannot be mounted or otherwise open\(\backslash\)n\(\backslash\)tduring "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00681}00681                             \textcolor{stringliteral}{"{}a commit unless the -\/f flag is used."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00682}00682                             lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00683}00683                         \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00684}00684                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00685}00685                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00686}00686                 \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(lowercp, 0, 1, 0)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00687}00687                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Error \%d: provider \%s is unable to "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00688}00688                             \textcolor{stringliteral}{"{}access \%s for writing."{}}, error, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00689}00689                             lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00690}00690                         \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00691}00691                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00692}00692                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00693}00693                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00694}00694                 \textcolor{comment}{/* Loop over write map copying across written blocks */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00695}00695                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00696}00696                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = sc-\/>\mbox{\hyperlink{structg__union__softc_a69eee1ed8424e2021f2a45a9c60247ea}{sc\_map\_size}} * sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00697}00697                 \mbox{\hyperlink{g__union_8h_a073609c18f5f280c8fbc3f0d2fe21de9}{G\_RLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00698}00698                 error = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00699}00699                 \textcolor{keywordflow}{while} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length > 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00700}00700                         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__union_8c_a27246307752117fa96cce56db4772db2}{g\_union\_getmap}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sc, \&len2rd)) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00701}00701                                 \textcolor{comment}{/* not written, so skip */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00702}00702                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset += len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00703}00703                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/= len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00704}00704                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00705}00705                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00706}00706                         \mbox{\hyperlink{g__union_8h_ac32aed2a4ff0ca7c7dc539f3a217da4d}{G\_RUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00707}00707                         \textcolor{comment}{/* need to read then write len2rd sectors */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00708}00708                         \textcolor{keywordflow}{for} ( ; len2rd > 0; len2rd -\/= len2wt) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00709}00709                                 \textcolor{comment}{/* limit ourselves to MAXBSIZE size I/Os */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00710}00710                                 len2wt = len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00711}00711                                 \textcolor{keywordflow}{if} (len2wt > MAXBSIZE)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00712}00712                                         len2wt = MAXBSIZE;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00713}00713                                 savelen = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00714}00714                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = len2wt;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00715}00715                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd = BIO\_READ;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00716}00716                                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00717}00717                                 \textcolor{keywordflow}{if} ((error = biowait(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}rdunion"{}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00718}00718                                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Commit read error \%d "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00719}00719                                             \textcolor{stringliteral}{"{}in provider \%s, commit aborted."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00720}00720                                             error, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00721}00721                                         \textcolor{keywordflow}{goto} cleanup;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00722}00722                                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00723}00723                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \&= \string~BIO\_DONE;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00724}00724                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd = BIO\_WRITE;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00725}00725                                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, lowercp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00726}00726                                 \textcolor{keywordflow}{if} ((error = biowait(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}wtunion"{}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00727}00727                                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Commit write error \%d "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00728}00728                                             \textcolor{stringliteral}{"{}in provider \%s, commit aborted."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00729}00729                                             error, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00730}00730                                         \textcolor{keywordflow}{goto} cleanup;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00731}00731                                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00732}00732                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \&= \string~BIO\_DONE;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00733}00733                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset += len2wt;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00734}00734                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = savelen -\/ len2wt;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00735}00735                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00736}00736                         \mbox{\hyperlink{g__union_8h_a073609c18f5f280c8fbc3f0d2fe21de9}{G\_RLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00737}00737                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00738}00738                 \mbox{\hyperlink{g__union_8h_ac32aed2a4ff0ca7c7dc539f3a217da4d}{G\_RUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00739}00739                 \textcolor{comment}{/* clear the write map */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00740}00740                 \mbox{\hyperlink{g__union_8c_a99930196a85b3c9219cfbd8c0decc5e2}{g\_union\_revert}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00741}00741 cleanup:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00742}00742                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00743}00743                 \textcolor{comment}{/* return lower to previous access */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00744}00744                 \textcolor{keywordflow}{if} ((error1 = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(lowercp, 0, -\/1, 0)) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00745}00745                         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(2, \textcolor{stringliteral}{"{}Error \%d: device \%s could not reset "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00746}00746                             \textcolor{stringliteral}{"{}access to \%s (r=0 w=-\/1 e=0)."{}}, error1, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00747}00747                             lowerpp-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00748}00748                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00749}00749                 \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00750}00750                 \textcolor{keywordflow}{if} (error == 0 \&\& verbose)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00751}00751                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s has been committed."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00752}00752                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00753}00753                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s has been committed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00754}00754         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00755}00755         \mbox{\hyperlink{geom_8h_a46a56ee1a935196396edd9a0e302e716}{gctl\_post\_messages}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00756}00756         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00757}00757         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00758}00758         \textcolor{keywordflow}{if} (*reboot)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00759}00759                 kern\_reboot(RB\_AUTOBOOT);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00760}00760 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00761}00761 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00762}00762 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00763}00763 \textcolor{comment}{ * Generally allow access unless a commit is in progress.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00764}00764 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00765}00765 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00766}\mbox{\hyperlink{g__union_8c_a412384975f3f843ef06ae92fe629ce2a}{00766}} \mbox{\hyperlink{g__union_8c_aa377a0e5c3b580d703ce628531cc9326}{g\_union\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} r, \textcolor{keywordtype}{int} w, \textcolor{keywordtype}{int} e)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00767}00767 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00768}00768         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00769}00769 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00770}00770         sc = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00771}00771         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00772}00772                 \textcolor{keywordflow}{if} (r <= 0 \&\& w <= 0 \&\& e <= 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00773}00773                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00774}00774                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00775}00775         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00776}00776         r += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00777}00777         w += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00778}00778         e += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00779}00779         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__union_8h_a7bf15cf1b393255e7a62df03b354083d}{g\_union\_get\_writelock}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00780}00780                 \textcolor{keywordflow}{if} ((\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}}) > 0 \&\& (r + w + e) == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00781}00781                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00782}00782                 \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00783}00783         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00784}00784         \mbox{\hyperlink{g__union_8h_a5cc3ea347981279a3a5d0ed19875b0c3}{g\_union\_rel\_writelock}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00785}00785         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00786}00786 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00787}00787 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00788}00788 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00789}00789 \textcolor{comment}{ * Initiate an I/O operation on the union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00790}00790 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00791}00791 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00792}\mbox{\hyperlink{g__union_8c_ac7699818fa34369f88284a7c53aee805}{00792}} \mbox{\hyperlink{g__union_8c_a8fce8d23fea4df7fd2007cca46e38a5e}{g\_union\_start}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00793}00793 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00794}00794         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00795}00795         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__wip}{g\_union\_wip}} *wip;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00796}00796         \textcolor{keyword}{struct }bio *cbp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00797}00797 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00798}00798         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom-\/>softc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00799}00799         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_READ || \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_WRITE) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00800}00800                 wip = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(*wip), M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00801}00801                 \textcolor{keywordflow}{if} (wip == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00802}00802                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00803}00803                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00804}00804                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00805}00805                 TAILQ\_INIT(\&wip-\/>\mbox{\hyperlink{structg__union__wip_ad5e6e1dbd69a6efae6568b603a40ebb7}{wip\_waiting}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00806}00806                 wip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00807}00807                 wip-\/>\mbox{\hyperlink{structg__union__wip_aeeccdbba92bee0e0651d34dad1872efd}{wip\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00808}00808                 wip-\/>\mbox{\hyperlink{structg__union__wip_a693ebac8cf17e05d4ec51cffcbd07292}{wip\_start}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset + sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00809}00809                 wip-\/>\mbox{\hyperlink{structg__union__wip_aa673c547aa12ae237172d364a89d7bba}{wip\_end}} = wip-\/>\mbox{\hyperlink{structg__union__wip_a693ebac8cf17e05d4ec51cffcbd07292}{wip\_start}} + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00810}00810                 wip-\/>\mbox{\hyperlink{structg__union__wip_a62ab3a5bd182cf5d937cc09a216b4ac6}{wip\_numios}} = 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00811}00811                 wip-\/>\mbox{\hyperlink{structg__union__wip_a865c978f53203c1db9c55b71d6e5583a}{wip\_error}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00812}00812                 \mbox{\hyperlink{g__union_8c_a2159eb5982e4c1862e56a60a02887526}{g\_union\_doio}}(wip);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00813}00813                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00814}00814         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00815}00815 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00816}00816         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00817}00817 \textcolor{comment}{         * All commands other than read and write are passed through to}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00818}00818 \textcolor{comment}{         * the upper-\/level device since it is writable and thus able to}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00819}00819 \textcolor{comment}{         * respond to delete, flush, and speedup requests.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00820}00820 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00821}00821         cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00822}00822         \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00823}00823                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00824}00824                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00825}00825         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00826}00826         cbp-\/>bio\_offset = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset + sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00827}00827         cbp-\/>bio\_done = \mbox{\hyperlink{geom_8h_a3b40808daecd7db79de16471ac14397a}{g\_std\_done}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00828}00828 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00829}00829         \textcolor{keywordflow}{switch} (cbp-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00830}00830         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00831}00831                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Delete request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00832}00832                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a9a900326e10578e17a88ca5169d63fb6}{sc\_deletes}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00833}00833                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00834}00834         \textcolor{keywordflow}{case} BIO\_GETATTR:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00835}00835                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Getattr request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00836}00836                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_ac4f9304d2590765e0e9cb927ab958c31}{sc\_getattrs}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00837}00837                 \textcolor{keywordflow}{if} (strcmp(cbp-\/>bio\_attribute, \textcolor{stringliteral}{"{}GEOM::kerneldump"{}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00838}00838                         \textcolor{comment}{/* forward the GETATTR to the lower-\/level device */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00839}00839                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00840}00840                 \mbox{\hyperlink{g__union_8c_a5656e7cf33fe7d8fb4f974fa32bfdc3b}{g\_union\_kerneldump}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00841}00841                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00842}00842         \textcolor{keywordflow}{case} BIO\_FLUSH:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00843}00843                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Flush request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00844}00844                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a614e2f62d62755b32c055eacddb5c1e0}{sc\_flushes}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00845}00845                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00846}00846         \textcolor{keywordflow}{case} BIO\_SPEEDUP:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00847}00847                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Speedup request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00848}00848                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a098c20a4fc875c650d8370348b23b2e6}{sc\_speedups}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00849}00849                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00850}00850         \textcolor{keywordflow}{case} BIO\_CMD0:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00851}00851                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Cmd0 request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00852}00852                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_aa868cbb5df50a5a0faf7ff9898fa6e52}{sc\_cmd0s}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00853}00853                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00854}00854         \textcolor{keywordflow}{case} BIO\_CMD1:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00855}00855                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Cmd1 request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00856}00856                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_ac6242926fa627456a27283bc10baecfe}{sc\_cmd1s}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00857}00857                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00858}00858         \textcolor{keywordflow}{case} BIO\_CMD2:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00859}00859                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Cmd2 request received."{}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00860}00860                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_ace02475248315cea5372f51f87afa389}{sc\_cmd2s}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00861}00861                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00862}00862         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00863}00863                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Unknown (\%d) request received."{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00864}00864                     cbp-\/>bio\_cmd);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00865}00865                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00866}00866         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00867}00867         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00868}00868 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00869}00869 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00870}00870 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00871}00871 \textcolor{comment}{ * Initiate a read or write operation on the union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00872}00872 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00873}00873 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00874}\mbox{\hyperlink{g__union_8c_a2159eb5982e4c1862e56a60a02887526}{00874}} \mbox{\hyperlink{g__union_8c_a2159eb5982e4c1862e56a60a02887526}{g\_union\_doio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__wip}{g\_union\_wip}} *wip)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00875}00875 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00876}00876         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00877}00877         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, *firstcp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00878}00878         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__wip}{g\_union\_wip}} *activewip;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00879}00879         \textcolor{keyword}{struct }bio *cbp, *firstbp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00880}00880         off\_t rdlen, len2rd, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00881}00881         \textcolor{keywordtype}{int} iocnt, needstoblock;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00882}00882         \textcolor{keywordtype}{char} *level;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00884}00884         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00885}00885 \textcolor{comment}{         * To maintain consistency, we cannot allow concurrent reads}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00886}00886 \textcolor{comment}{         * or writes to the same block.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00887}00887 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00888}00888 \textcolor{comment}{         * A work-\/in-\/progress (wip) structure is allocated for each}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00889}00889 \textcolor{comment}{         * read or write request. All active requests are kept on the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00890}00890 \textcolor{comment}{         * softc sc\_wiplist. As each request arrives, it is checked to}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00891}00891 \textcolor{comment}{         * see if it overlaps any of the active entries. If it does not}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00892}00892 \textcolor{comment}{         * overlap, then it is added to the active list and initiated.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00893}00893 \textcolor{comment}{         * If it does overlap an active entry, it is added to the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00894}00894 \textcolor{comment}{         * wip\_waiting list for the active entry that it overlaps.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00895}00895 \textcolor{comment}{         * When an active entry completes, it restarts all the requests}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00896}00896 \textcolor{comment}{         * on its wip\_waiting list.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00897}00897 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00898}00898         sc = wip-\/>\mbox{\hyperlink{structg__union__wip_aeeccdbba92bee0e0651d34dad1872efd}{wip\_sc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00899}00899         \mbox{\hyperlink{g__union_8h_a6eb0d4fae34d6eacc2ce59c18bd96b7c}{G\_WLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00900}00900         TAILQ\_FOREACH(activewip, \&sc-\/>\mbox{\hyperlink{structg__union__softc_adedcb8e24c8f1093b3535bf78ee7732a}{sc\_wiplist}}, wip\_next) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00901}00901                 \textcolor{keywordflow}{if} (wip-\/>\mbox{\hyperlink{structg__union__wip_aa673c547aa12ae237172d364a89d7bba}{wip\_end}} < activewip-\/>\mbox{\hyperlink{structg__union__wip_a693ebac8cf17e05d4ec51cffcbd07292}{wip\_start}} ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00902}00902                     wip-\/>\mbox{\hyperlink{structg__union__wip_a693ebac8cf17e05d4ec51cffcbd07292}{wip\_start}} > activewip-\/>\mbox{\hyperlink{structg__union__wip_aa673c547aa12ae237172d364a89d7bba}{wip\_end}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00903}00903                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00904}00904                 needstoblock = 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00905}00905                 \textcolor{keywordflow}{if} (wip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00906}00906                         \textcolor{keywordflow}{if} (activewip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00907}00907                                 sc-\/>\mbox{\hyperlink{structg__union__softc_abc3da7e8cb31d6795b6627889b5a2211}{sc\_writeblockwrite}} += 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00908}00908                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00909}00909                                 sc-\/>\mbox{\hyperlink{structg__union__softc_a11cd9f61909d6ee341ef0efe9206fbbc}{sc\_readblockwrite}} += 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00910}00910                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00911}00911                         \textcolor{keywordflow}{if} (activewip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00912}00912                                 sc-\/>\mbox{\hyperlink{structg__union__softc_a17dc4fcadf2aaa514e2ec8a4ea243b96}{sc\_writeblockread}} += 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00913}00913                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00914}00914                                 sc-\/>\mbox{\hyperlink{structg__union__softc_ae7451a688338e911f5068e1c9a6c61d4}{sc\_readcurrentread}} += 1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00915}00915                                 needstoblock = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00916}00916                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00917}00917                 \textcolor{comment}{/* Put request on a waiting list if necessary */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00918}00918                 \textcolor{keywordflow}{if} (needstoblock) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00919}00919                         TAILQ\_INSERT\_TAIL(\&activewip-\/>\mbox{\hyperlink{structg__union__wip_ad5e6e1dbd69a6efae6568b603a40ebb7}{wip\_waiting}}, wip,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00920}00920                             wip\_next);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00921}00921                         \mbox{\hyperlink{g__union_8h_a39b482408d3c45e322c26a5cc138e2b4}{G\_WUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00922}00922                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00923}00923                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00924}00924         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00925}00925         \textcolor{comment}{/* Put request on the active list */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00926}00926         TAILQ\_INSERT\_TAIL(\&sc-\/>\mbox{\hyperlink{structg__union__softc_adedcb8e24c8f1093b3535bf78ee7732a}{sc\_wiplist}}, wip, wip\_next);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00927}00927 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00928}00928         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00929}00929 \textcolor{comment}{         * Process I/O requests that have been cleared to go.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00930}00930 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00931}00931         cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(wip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00932}00932         \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00933}00933                 TAILQ\_REMOVE(\&sc-\/>\mbox{\hyperlink{structg__union__softc_adedcb8e24c8f1093b3535bf78ee7732a}{sc\_wiplist}}, wip, wip\_next);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00934}00934                 \mbox{\hyperlink{g__union_8h_a39b482408d3c45e322c26a5cc138e2b4}{G\_WUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00935}00935                 KASSERT(TAILQ\_FIRST(\&wip-\/>\mbox{\hyperlink{structg__union__wip_ad5e6e1dbd69a6efae6568b603a40ebb7}{wip\_waiting}}) == NULL,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00936}00936                     (\textcolor{stringliteral}{"{}g\_union\_doio: non-\/empty work-\/in-\/progress waiting queue"{}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00937}00937                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(wip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00938}00938                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(wip);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00939}00939                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00940}00940         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00941}00941         \mbox{\hyperlink{g__union_8h_a39b482408d3c45e322c26a5cc138e2b4}{G\_WUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00942}00942         cbp-\/>bio\_caller1 = wip;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00943}00943         cbp-\/>bio\_done = \mbox{\hyperlink{g__union_8c_ae1ee2af20da17fde7729bb926b8ba90d}{g\_union\_done}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00944}00944         cbp-\/>bio\_offset = wip-\/>\mbox{\hyperlink{structg__union__wip_a693ebac8cf17e05d4ec51cffcbd07292}{wip\_start}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00945}00945 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00946}00946         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00947}00947 \textcolor{comment}{         * Writes are always done to the top level. The blocks that}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00948}00948 \textcolor{comment}{         * are written are recorded in the bitmap when the I/O completes.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00949}00949 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00950}00950         \textcolor{keywordflow}{if} (cbp-\/>bio\_cmd == BIO\_WRITE) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00951}00951                 \mbox{\hyperlink{g__union_8h_a39025574adf33d281cf28c529a55a3a8}{G\_UNION\_LOGREQ}}(cbp, \textcolor{stringliteral}{"{}Sending \%jd byte write request to upper "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00952}00952                     \textcolor{stringliteral}{"{}level."{}}, cbp-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00953}00953                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a708904e247e0960a2624b7e31fab212f}{sc\_writes}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00954}00954                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a8a4977fc8d542045e74c58a7844f4b31}{sc\_wrotebytes}}, cbp-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00955}00955                 \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00956}00956                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00957}00957         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00958}00958         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00959}00959 \textcolor{comment}{         * The usual read case is that we either read the top layer}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00960}00960 \textcolor{comment}{         * if the block has been previously written or the bottom layer}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00961}00961 \textcolor{comment}{         * if it has not been written. However, it is possible that}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00962}00962 \textcolor{comment}{         * only part of the block has been written, For example we may}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00963}00963 \textcolor{comment}{         * have written a UFS/FFS file fragment comprising several}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00964}00964 \textcolor{comment}{         * sectors out of an 8-\/sector block.  Here, if the entire}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00965}00965 \textcolor{comment}{         * 8-\/sector block is read for example by a snapshot needing}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00966}00966 \textcolor{comment}{         * to copy the full block, then we need to read the written}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00967}00967 \textcolor{comment}{         * sectors from the upper level and the unwritten sectors from}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00968}00968 \textcolor{comment}{         * the lower level. We do this by alternately reading from the}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00969}00969 \textcolor{comment}{         * top and bottom layers until we complete the read. We}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00970}00970 \textcolor{comment}{         * simplify for the common case to just do the I/O and return.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00971}00971 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00972}00972         atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_aa69c9822e1975dd1a9c1d748928d6441}{sc\_reads}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00973}00973         atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a51d8f432ba251f55ee1dcdebe4e04a86}{sc\_readbytes}}, cbp-\/>bio\_length);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00974}00974         rdlen = cbp-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00975}00975         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00976}00976         \textcolor{keywordflow}{for} (iocnt = 0; ; iocnt++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00977}00977                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__union_8c_a27246307752117fa96cce56db4772db2}{g\_union\_getmap}}(cbp, sc, \&len2rd)) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00978}00978                         \textcolor{comment}{/* read top */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00979}00979                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00980}00980                         level = \textcolor{stringliteral}{"{}upper"{}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00981}00981                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00982}00982                         \textcolor{comment}{/* read bottom */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00983}00983                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = sc-\/>\mbox{\hyperlink{structg__union__softc_a33d9026325bde6187127bce1b0a8ba08}{sc\_lowercp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00984}00984                         level = \textcolor{stringliteral}{"{}lower"{}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00985}00985                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00986}00986                 \textcolor{comment}{/* Check if only a single read is required */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00987}00987                 \textcolor{keywordflow}{if} (iocnt == 0 \&\& rdlen == len2rd) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00988}00988                         \mbox{\hyperlink{g__union_8h_ae4c9389b1f83c0569f612179fc455384}{G\_UNION\_LOGREQLVL}}((\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} == sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}}) ?}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00989}00989                             3 : 4, cbp, \textcolor{stringliteral}{"{}Sending \%jd byte read "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00990}00990                             \textcolor{stringliteral}{"{}request to \%s level."{}}, len2rd, level);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00991}00991                         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00992}00992                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00993}00993                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00994}00994                 cbp-\/>bio\_length = len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00995}00995                 \textcolor{keywordflow}{if} ((cbp-\/>bio\_flags \& BIO\_UNMAPPED) != 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00996}00996                         cbp-\/>bio\_ma\_offset += \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00997}00997                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00998}00998                         cbp-\/>bio\_data += \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l00999}00999                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01000}01000                 rdlen -\/= len2rd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01001}01001                 \mbox{\hyperlink{g__union_8h_ae4c9389b1f83c0569f612179fc455384}{G\_UNION\_LOGREQLVL}}(3, cbp, \textcolor{stringliteral}{"{}Sending \%jd byte read "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01002}01002                     \textcolor{stringliteral}{"{}request to \%s level."{}}, len2rd, level);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01003}01003                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01004}01004 \textcolor{comment}{                 * To avoid prematurely notifying our consumer}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01005}01005 \textcolor{comment}{                 * that their I/O has completed, we have to delay}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01006}01006 \textcolor{comment}{                 * issuing our first I/O request until we have}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01007}01007 \textcolor{comment}{                 * issued all the additional I/O requests.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01008}01008 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01009}01009                 \textcolor{keywordflow}{if} (iocnt > 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01010}01010                         atomic\_add\_long(\&wip-\/>\mbox{\hyperlink{structg__union__wip_a62ab3a5bd182cf5d937cc09a216b4ac6}{wip\_numios}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01011}01011                         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(cbp, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01012}01012                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01013}01013                         firstbp = cbp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01014}01014                         firstcp = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01015}01015                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01016}01016                 \textcolor{keywordflow}{if} (rdlen == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01017}01017                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01018}01018                 \textcolor{comment}{/* set up for next read */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01019}01019                 cbp = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(wip-\/>\mbox{\hyperlink{structg__union__wip_a7db603e8937e22c1e00bd7b086e89ea6}{wip\_bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01020}01020                 \textcolor{keywordflow}{if} (cbp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01021}01021                         wip-\/>\mbox{\hyperlink{structg__union__wip_a865c978f53203c1db9c55b71d6e5583a}{wip\_error}} = ENOMEM;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01022}01022                         atomic\_add\_long(\&wip-\/>\mbox{\hyperlink{structg__union__wip_a62ab3a5bd182cf5d937cc09a216b4ac6}{wip\_numios}}, -\/1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01023}01023                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01024}01024                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01025}01025                 cbp-\/>bio\_caller1 = wip;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01026}01026                 cbp-\/>bio\_done = \mbox{\hyperlink{g__union_8c_ae1ee2af20da17fde7729bb926b8ba90d}{g\_union\_done}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01027}01027                 cbp-\/>bio\_offset += \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01028}01028                 cbp-\/>bio\_length = rdlen;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01029}01029                 atomic\_add\_long(\&sc-\/>\mbox{\hyperlink{structg__union__softc_aa69c9822e1975dd1a9c1d748928d6441}{sc\_reads}}, 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01030}01030         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01031}01031         \textcolor{comment}{/* We have issued all our I/O, so start the first one */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01032}01032         \mbox{\hyperlink{geom_8h_aa433c0ba9e8cad7c7da1f9e17b46eb7a}{g\_io\_request}}(firstbp, firstcp);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01033}01033         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01034}01034 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01036}01036 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01037}01037 \textcolor{comment}{ * Used when completing a union I/O operation.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01038}01038 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01039}01039 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01040}\mbox{\hyperlink{g__union_8c_ae1ee2af20da17fde7729bb926b8ba90d}{01040}} \mbox{\hyperlink{g__union_8c_ae1ee2af20da17fde7729bb926b8ba90d}{g\_union\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01041}01041 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01042}01042         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__wip}{g\_union\_wip}} *wip, *waitingwip;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01043}01043         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01045}01045         wip = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01046}01046         \textcolor{keywordflow}{if} (wip-\/>\mbox{\hyperlink{structg__union__wip_a865c978f53203c1db9c55b71d6e5583a}{wip\_error}} != 0 \&\& \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01047}01047                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = wip-\/>\mbox{\hyperlink{structg__union__wip_a865c978f53203c1db9c55b71d6e5583a}{wip\_error}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01048}01048         wip-\/>\mbox{\hyperlink{structg__union__wip_a865c978f53203c1db9c55b71d6e5583a}{wip\_error}} = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01049}01049         \textcolor{keywordflow}{if} (atomic\_fetchadd\_long(\&wip-\/>\mbox{\hyperlink{structg__union__wip_a62ab3a5bd182cf5d937cc09a216b4ac6}{wip\_numios}}, -\/1) == 1) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01050}01050                 sc = wip-\/>\mbox{\hyperlink{structg__union__wip_aeeccdbba92bee0e0651d34dad1872efd}{wip\_sc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01051}01051                 \mbox{\hyperlink{g__union_8h_a6eb0d4fae34d6eacc2ce59c18bd96b7c}{G\_WLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01052}01052                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01053}01053                         \mbox{\hyperlink{g__union_8c_ae651995fb7e35c527ac0d258c9350c04}{g\_union\_setmap}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01054}01054                 TAILQ\_REMOVE(\&sc-\/>\mbox{\hyperlink{structg__union__softc_adedcb8e24c8f1093b3535bf78ee7732a}{sc\_wiplist}}, wip, wip\_next);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01055}01055                 \mbox{\hyperlink{g__union_8h_a39b482408d3c45e322c26a5cc138e2b4}{G\_WUNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01056}01056                 \textcolor{keywordflow}{while} ((waitingwip = TAILQ\_FIRST(\&wip-\/>\mbox{\hyperlink{structg__union__wip_ad5e6e1dbd69a6efae6568b603a40ebb7}{wip\_waiting}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01057}01057                         TAILQ\_REMOVE(\&wip-\/>\mbox{\hyperlink{structg__union__wip_ad5e6e1dbd69a6efae6568b603a40ebb7}{wip\_waiting}}, waitingwip, wip\_next);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01058}01058                         \mbox{\hyperlink{g__union_8c_a2159eb5982e4c1862e56a60a02887526}{g\_union\_doio}}(waitingwip);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01059}01059                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01060}01060                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(wip);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01061}01061         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01062}01062         \mbox{\hyperlink{geom_8h_a3b40808daecd7db79de16471ac14397a}{g\_std\_done}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01063}01063 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01065}01065 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01066}01066 \textcolor{comment}{ * Record blocks that have been written in the map.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01067}01067 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01068}01068 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01069}\mbox{\hyperlink{g__union_8c_ae651995fb7e35c527ac0d258c9350c04}{01069}} \mbox{\hyperlink{g__union_8c_ae651995fb7e35c527ac0d258c9350c04}{g\_union\_setmap}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01070}01070 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01071}01071         \textcolor{keywordtype}{size\_t} root\_idx;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01072}01072         uint64\_t **leaf;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01073}01073         uint64\_t *wordp;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01074}01074         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, numsec;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01076}01076         \mbox{\hyperlink{g__union_8h_a15d5edb457b87163020e1a28df3e34c3}{G\_WLOCKOWNED}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01077}01077         KASSERT(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset \% sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}} == 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01078}01078             (\textcolor{stringliteral}{"{}g\_union\_setmap: offset not on sector boundry"{}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01079}01079         KASSERT(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length \% sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}} == 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01080}01080             (\textcolor{stringliteral}{"{}g\_union\_setmap: length not a multiple of sectors"{}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01081}01081         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset / sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01082}01082         numsec = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length / sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01083}01083         KASSERT(\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + numsec <= sc-\/>\mbox{\hyperlink{structg__union__softc_a69eee1ed8424e2021f2a45a9c60247ea}{sc\_map\_size}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01084}01084             (\textcolor{stringliteral}{"{}g\_union\_setmap: block \%jd is out of range"{}}, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + numsec));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01085}01085         \textcolor{keywordflow}{for} ( ; numsec > 0; numsec-\/-\/, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01086}01086                 root\_idx = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} / sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01087}01087                 leaf = \&sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}}[root\_idx];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01088}01088                 wordp = \&(*leaf)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01089}01089                     [(\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}}) / \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01090}01090                 *wordp |= 1ULL << (\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01091}01091                 sc-\/>\mbox{\hyperlink{structg__union__softc_a7b77b0861cf943a2b3f32386df0049d4}{sc\_leafused}}[root\_idx / \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}] |=}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01092}01092                     1ULL << (root\_idx \% \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01093}01093         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01094}01094 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01095}01095 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01096}01096 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01097}01097 \textcolor{comment}{ * Check map to determine whether blocks have been written.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01098}01098 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01099}01099 \textcolor{comment}{ * Return true if they have been written so should be read from the top}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01100}01100 \textcolor{comment}{ * layer. Return false if they have not been written so should be read}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01101}01101 \textcolor{comment}{ * from the bottom layer. Return in len2read the bytes to be read. See}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01102}01102 \textcolor{comment}{ * the comment above the BIO\_READ implementation in g\_union\_start() for}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01103}01103 \textcolor{comment}{ * an explantion of why len2read may be shorter than the buffer length.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01104}01104 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01105}01105 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01106}\mbox{\hyperlink{g__union_8c_a27246307752117fa96cce56db4772db2}{01106}} \mbox{\hyperlink{g__union_8c_a27246307752117fa96cce56db4772db2}{g\_union\_getmap}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc, off\_t *len2read)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01107}01107 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01108}01108         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, numsec, leafresid, bitloc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01109}01109         \textcolor{keywordtype}{bool} first, maptype, retval;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01110}01110         uint64\_t *leaf, word;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01111}01111         \textcolor{keywordtype}{size\_t} root\_idx;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01112}01112 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01113}01113         KASSERT(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset \% sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}} == 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01114}01114             (\textcolor{stringliteral}{"{}g\_union\_getmap: offset not on sector boundry"{}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01115}01115         KASSERT(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length \% sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}} == 0,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01116}01116             (\textcolor{stringliteral}{"{}g\_union\_getmap: length not a multiple of sectors"{}}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01117}01117         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset / sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01118}01118         numsec = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length / sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01119}01119         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(4, \textcolor{stringliteral}{"{}g\_union\_getmap: check \%jd sectors starting at \%jd\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01120}01120             numsec, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01121}01121         KASSERT(\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + numsec <= sc-\/>\mbox{\hyperlink{structg__union__softc_a69eee1ed8424e2021f2a45a9c60247ea}{sc\_map\_size}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01122}01122             (\textcolor{stringliteral}{"{}g\_union\_getmap: block \%jd is out of range"{}}, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + numsec));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01123}01123                 root\_idx = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} / sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01124}01124         first = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01125}01125         maptype = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01126}01126         \textcolor{keywordflow}{while} (numsec > 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01127}01127                 \textcolor{comment}{/* Check first if the leaf records any written sectors */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01128}01128                 root\_idx = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} / sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01129}01129                 leafresid = sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}} -\/}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01130}01130                     (\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01131}01131                 \textcolor{keywordflow}{if} (((sc-\/>\mbox{\hyperlink{structg__union__softc_a7b77b0861cf943a2b3f32386df0049d4}{sc\_leafused}}[root\_idx / \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}]) \&}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01132}01132                     (1ULL << (root\_idx \% \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}))) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01133}01133                         \textcolor{keywordflow}{if} (first) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01134}01134                                 maptype = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01135}01135                                 first = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01136}01136                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01137}01137                         \textcolor{keywordflow}{if} (maptype)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01138}01138                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01139}01139                         numsec -\/= leafresid;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01140}01140                         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} += leafresid;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01141}01141                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01142}01142                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01143}01143                 \textcolor{comment}{/* Check up to a word boundry, then check word by word */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01144}01144                 leaf = sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}}[root\_idx];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01145}01145                 word = leaf[(\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% sc-\/>\mbox{\hyperlink{structg__union__softc_a5bb7adf735608ec1dfb09508d3651a39}{sc\_bits\_per\_leaf}}) / \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}];}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01146}01146                 bitloc = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01147}01147                 \textcolor{keywordflow}{if} (bitloc == 0 \&\& (word == 0 || word == \string~0)) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01148}01148                         \textcolor{keywordflow}{if} (first) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01149}01149                                 \textcolor{keywordflow}{if} (word == 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01150}01150                                         maptype = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01151}01151                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01152}01152                                         maptype = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01153}01153                                 first = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01154}01154                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01155}01155                         \textcolor{keywordflow}{if} ((word == 0 \&\& maptype) ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01156}01156                             (word == \string~0 \&\& !maptype))}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01157}01157                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01158}01158                         numsec -\/= \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01159}01159                         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} += \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01160}01160                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01161}01161                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01162}01162                 \textcolor{keywordflow}{for} ( ; bitloc < \mbox{\hyperlink{g__union_8h_abfe642c84b5974b81a83766652af5e06}{BITS\_PER\_ENTRY}}; bitloc ++) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01163}01163                         retval = (word \& (1ULL << bitloc)) != 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01164}01164                         \textcolor{keywordflow}{if} (first) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01165}01165                                 maptype = retval;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01166}01166                                 first = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01167}01167                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01168}01168                         \textcolor{keywordflow}{if} (maptype == retval) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01169}01169                                 numsec-\/-\/;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01170}01170                                 \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}++;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01171}01171                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01172}01172                         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01173}01173                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01174}01174                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01175}01175         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01176}01176 out:}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01177}01177         \textcolor{keywordflow}{if} (numsec < 0) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01178}01178                 \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} += numsec;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01179}01179                 numsec = 0;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01180}01180         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01181}01181         *len2read = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/ (numsec * sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01182}01182         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(maptype ? 3 : 4,}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01183}01183             \textcolor{stringliteral}{"{}g\_union\_getmap: return maptype \%swritten for \%jd "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01184}01184             \textcolor{stringliteral}{"{}sectors ending at \%jd\(\backslash\)n"{}}, maptype ? \textcolor{stringliteral}{"{}"{}} : \textcolor{stringliteral}{"{}NOT "{}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01185}01185             *len2read / sc-\/>\mbox{\hyperlink{structg__union__softc_a595d4b8e9e1fbb917555c1db5f46e8bd}{sc\_sectorsize}}, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01186}01186         \textcolor{keywordflow}{return} (maptype);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01187}01187 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01188}01188 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01189}01189 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01190}01190 \textcolor{comment}{ * Fill in details for a BIO\_GETATTR request.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01191}01191 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01192}01192 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01193}\mbox{\hyperlink{g__union_8c_a5656e7cf33fe7d8fb4f974fa32bfdc3b}{01193}} \mbox{\hyperlink{g__union_8c_a5656e7cf33fe7d8fb4f974fa32bfdc3b}{g\_union\_kerneldump}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01194}01194 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01195}01195         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}} *gkd;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01196}01196         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01197}01197         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01198}01198 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01199}01199         gkd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}} *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01200}01200         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01201}01201         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a7f1804ff1a11f763a1ab5bdbd3e1287c}{G\_T\_TOPOLOGY}}, \textcolor{stringliteral}{"{}\%s(\%s, \%jd, \%jd)"{}}, \_\_func\_\_, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01202}01202             (intmax\_t)gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}}, (intmax\_t)gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01203}01203 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01204}01204         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01206}01206         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.dumper = \mbox{\hyperlink{g__union_8c_a75d45270812403dcede4e0f7f5df25c0}{g\_union\_dumper}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01207}01207         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.priv = sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01208}01208         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.blocksize = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01209}01209         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.maxiosize = DFLTPHYS;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01210}01210         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.mediaoffset = sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}} + gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01211}01211         \textcolor{keywordflow}{if} (gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}} > sc-\/>\mbox{\hyperlink{structg__union__softc_a867419f99cf82ac97d6e27bf86e808dc}{sc\_size}}) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01212}01212                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENODEV);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01213}01213                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01214}01214         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01215}01215         \textcolor{keywordflow}{if} (gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}} + gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}} > sc-\/>\mbox{\hyperlink{structg__union__softc_a867419f99cf82ac97d6e27bf86e808dc}{sc\_size}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01216}01216                 gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}} = sc-\/>\mbox{\hyperlink{structg__union__softc_a867419f99cf82ac97d6e27bf86e808dc}{sc\_size}} -\/ gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01217}01217         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.mediasize = gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01218}01218         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, 0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01219}01219 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01220}01220 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01221}01221 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01222}01222 \textcolor{comment}{ * Handler for g\_union\_kerneldump().}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01223}01223 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01224}01224 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01225}\mbox{\hyperlink{g__union_8c_a75d45270812403dcede4e0f7f5df25c0}{01225}} \mbox{\hyperlink{g__union_8c_a75d45270812403dcede4e0f7f5df25c0}{g\_union\_dumper}}(\textcolor{keywordtype}{void} *priv, \textcolor{keywordtype}{void} *\textcolor{keyword}{virtual}, vm\_offset\_t \mbox{\hyperlink{g__raid__tr__if_8m_a27729ff5ed96d4c7c45950d01a07c654}{physical}}, off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01226}01226     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01227}01227 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01228}01228 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01229}01229         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01230}01230 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01231}01231 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01232}01232 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01233}01233 \textcolor{comment}{ * List union statistics.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01234}01234 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01235}01235 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01236}\mbox{\hyperlink{g__union_8c_a42587be5dfaac18984f4285ea5beaab5}{01236}} \mbox{\hyperlink{g__union_8c_af4a8e56a695cbd94c157e901e4047531}{g\_union\_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__union_8c_source_l01237}01237     \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__union_8c_source_l01238}01238 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01239}01239         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01240}01240 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01241}01241         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL || \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL || \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01242}01242                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01243}01243         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01244}01244         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Reads>\%ju</Reads>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01245}01245             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_aa69c9822e1975dd1a9c1d748928d6441}{sc\_reads}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01246}01246         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Writes>\%ju</Writes>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01247}01247             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a708904e247e0960a2624b7e31fab212f}{sc\_writes}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01248}01248         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Deletes>\%ju</Deletes>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01249}01249             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a9a900326e10578e17a88ca5169d63fb6}{sc\_deletes}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01250}01250         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Getattrs>\%ju</Getattrs>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01251}01251             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_ac4f9304d2590765e0e9cb927ab958c31}{sc\_getattrs}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01252}01252         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Flushes>\%ju</Flushes>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01253}01253             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a614e2f62d62755b32c055eacddb5c1e0}{sc\_flushes}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01254}01254         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Speedups>\%ju</Speedups>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01255}01255             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a098c20a4fc875c650d8370348b23b2e6}{sc\_speedups}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01256}01256         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Cmd0s>\%ju</Cmd0s>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01257}01257             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_aa868cbb5df50a5a0faf7ff9898fa6e52}{sc\_cmd0s}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01258}01258         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Cmd1s>\%ju</Cmd1s>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01259}01259             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_ac6242926fa627456a27283bc10baecfe}{sc\_cmd1s}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01260}01260         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Cmd2s>\%ju</Cmd2s>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01261}01261             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_ace02475248315cea5372f51f87afa389}{sc\_cmd2s}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01262}01262         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ReadCurrentRead>\%ju</ReadCurrentRead>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01263}01263             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_ae7451a688338e911f5068e1c9a6c61d4}{sc\_readcurrentread}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01264}01264         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ReadBlockWrite>\%ju</ReadBlockWrite>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01265}01265             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a11cd9f61909d6ee341ef0efe9206fbbc}{sc\_readblockwrite}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01266}01266         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<WriteBlockRead>\%ju</WriteBlockRead>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01267}01267             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a17dc4fcadf2aaa514e2ec8a4ea243b96}{sc\_writeblockread}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01268}01268         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<WriteBlockWrite>\%ju</WriteBlockWrite>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01269}01269             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_abc3da7e8cb31d6795b6627889b5a2211}{sc\_writeblockwrite}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01270}01270         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ReadBytes>\%ju</ReadBytes>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01271}01271             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a51d8f432ba251f55ee1dcdebe4e04a86}{sc\_readbytes}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01272}01272         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<WroteBytes>\%ju</WroteBytes>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01273}01273             (uintmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a8a4977fc8d542045e74c58a7844f4b31}{sc\_wrotebytes}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01274}01274         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<Offset>\%jd</Offset>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01275}01275             (intmax\_t)sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01276}01276 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01277}01277 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01278}01278 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01279}01279 \textcolor{comment}{ * Clean up an orphaned geom.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01280}01280 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01281}01281 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01282}\mbox{\hyperlink{g__union_8c_a60809a224006e8ff231778aad040bc3c}{01282}} \mbox{\hyperlink{g__union_8c_a6fe6cdb893b964250422f235f3c748b1}{g\_union\_orphan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01283}01283 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01284}01284 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01285}01285         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01286}01286         \mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(NULL, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01287}01287 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01288}01288 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01289}01289 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01290}01290 \textcolor{comment}{ * Clean up a union geom.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01291}01291 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01292}01292 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01293}\mbox{\hyperlink{g__union_8c_a799855a1e8d3a1562eb9b8e08e0a289e}{01293}} \mbox{\hyperlink{g__union_8c_a799855a1e8d3a1562eb9b8e08e0a289e}{g\_union\_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__union_8c_source_l01294}01294     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01295}01295 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01296}01296 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01297}01297         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(NULL, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \textcolor{keyword}{false}));}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01298}01298 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01299}01299 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01300}01300 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01301}01301 \textcolor{comment}{ * Clean up a union device.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01302}01302 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01303}01303 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01304}\mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{01304}} \mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \textcolor{keywordtype}{bool} force)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01305}01305 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01306}01306         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01307}01307         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01308}01308         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01309}01309 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01310}01310         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01311}01311         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01312}01312         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01313}01313                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01314}01314         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01315}01315         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__union__softc_a8aeb771b9771aeaf335d2a0b36afc262}{sc\_flags}} \& \mbox{\hyperlink{g__union_8h_a3ac829b71d1ce335676208ff657258bd}{DOING\_COMMIT}}) != 0 ||}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01316}01316             (\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__union_8c_source_l01317}01317                 \textcolor{keywordflow}{if} (force) \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01318}01318                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01319}01319                                 \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s is still in use, "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01320}01320                                     \textcolor{stringliteral}{"{}so is being forcibly removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01321}01321                         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s is still in use, so "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01322}01322                             \textcolor{stringliteral}{"{}is being forcibly removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01323}01323                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01324}01324                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01325}01325                                 \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s is still open "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01326}01326                                     \textcolor{stringliteral}{"{}(r=\%d w=\%d e=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01327}01327                                     \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__union_8c_source_l01328}01328                         \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s is still open "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01329}01329                             \textcolor{stringliteral}{"{}(r=\%d w=\%d e=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}},}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01330}01330                             \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__union_8c_source_l01331}01331                         \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01332}01332                 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01333}01333         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01334}01334                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01335}01335                         \mbox{\hyperlink{geom_8h_a84f060ab407919f4dadb670766f4ca9d}{gctl\_msg}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01336}01336                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(1, \textcolor{stringliteral}{"{}Device \%s removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01337}01337         \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01338}01338         \textcolor{comment}{/* Close consumers */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01339}01339         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(sc-\/>\mbox{\hyperlink{structg__union__softc_a33d9026325bde6187127bce1b0a8ba08}{sc\_lowercp}}, -\/1, 0, -\/1)) != 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01340}01340                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(2, \textcolor{stringliteral}{"{}Error \%d: device \%s could not reset access "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01341}01341                     \textcolor{stringliteral}{"{}to \%s."{}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>\mbox{\hyperlink{structg__union__softc_a33d9026325bde6187127bce1b0a8ba08}{sc\_lowercp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01342}01342         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}}, -\/1, -\/1, -\/1)) != 0)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01343}01343                 \mbox{\hyperlink{g__union_8h_ab32a612fa46ce75a7d9245bd973fe09d}{G\_UNION\_DEBUG}}(2, \textcolor{stringliteral}{"{}Error \%d: device \%s could not reset access "{}}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01344}01344                     \textcolor{stringliteral}{"{}to \%s."{}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, sc-\/>\mbox{\hyperlink{structg__union__softc_a2316b11ed80cdb8b28121d8578724bcc}{sc\_uppercp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01345}01345 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01346}01346         \mbox{\hyperlink{geom_8h_a87a0eb5de79ed5e49fcfec012f213c9b}{g\_wither\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01347}01347 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01348}01348         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01349}01349 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01350}01350 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01351}01351 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01352}01352 \textcolor{comment}{ * Clean up a union provider.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01353}01353 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01354}01354 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01355}\mbox{\hyperlink{g__union_8c_a7e92291ab7d3f367e0ab71a78adb8647}{01355}} \mbox{\hyperlink{g__union_8c_a0f829870991b9292b3c288e9938fcda3}{g\_union\_providergone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01356}01356 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01357}01357         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01358}01358         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01359}01359         \textcolor{keywordtype}{size\_t} i;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01360}01360 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01361}01361         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01362}01362         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01363}01363         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01364}01364         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structg__union__softc_afb6ffb3ea1c74134fa0852c0f3f940cd}{sc\_root\_size}}; i++)}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01365}01365                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}}[i]);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01366}01366         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sc-\/>\mbox{\hyperlink{structg__union__softc_afa4b7338ffcafd9aee798e37f88c5342}{sc\_writemap\_root}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01367}01367         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sc-\/>\mbox{\hyperlink{structg__union__softc_a7b77b0861cf943a2b3f32386df0049d4}{sc\_leafused}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01368}01368         rw\_destroy(\&sc-\/>\mbox{\hyperlink{structg__union__softc_a40a15a5850b5e9634d6322a4727cae41}{sc\_rwlock}});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01369}01369         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01370}01370 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01371}01371 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01372}01372 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01373}01373 \textcolor{comment}{ * Respond to a resized provider.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01374}01374 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01375}01375 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01376}\mbox{\hyperlink{g__union_8c_a08e0cfb1eed4fe189993dd570105cce7}{01376}} \mbox{\hyperlink{g__union_8c_a6c0871ed8bfacc20a4a879a3d9b0266b}{g\_union\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01377}01377 \{}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01378}01378         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__union__softc}{g\_union\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01379}01379         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01380}01380 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01381}01381         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01383}01383         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01384}01384         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01385}01385 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01386}01386         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01387}01387 \textcolor{comment}{         * If size has gotten bigger, ignore it and just keep using}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01388}01388 \textcolor{comment}{         * the space we already had. Otherwise we are done.}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01389}01389 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01390}01390         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__union__softc_a867419f99cf82ac97d6e27bf86e808dc}{sc\_size}} < \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ sc-\/>\mbox{\hyperlink{structg__union__softc_a51cf5341744c68784e74cfea1f061333}{sc\_offset}})}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01391}01391                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01392}01392         \mbox{\hyperlink{g__union_8c_a8aa3d1f15f3374144df2bbf8e18970ef}{g\_union\_destroy}}(NULL, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01393}01393 \}}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01394}01394 }
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01395}\mbox{\hyperlink{g__union_8c_a977b2c7a4f67f68185c835215229b51d}{01395}} \mbox{\hyperlink{g__union_8c_a977b2c7a4f67f68185c835215229b51d}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{g__union_8c_a87e9683a8b5393c9c3a5b013e31e5ed3}{g\_union\_class}}, g\_union);}
\DoxyCodeLine{\Hypertarget{g__union_8c_source_l01396}\mbox{\hyperlink{g__union_8c_a20d649f334b5834ee426c839b2ab2210}{01396}} \mbox{\hyperlink{g__union_8c_a20d649f334b5834ee426c839b2ab2210}{MODULE\_VERSION}}(geom\_union, 0);}

\end{DoxyCode}
