\hypertarget{geom__disk_8c_source}{}\doxysection{geom\+\_\+disk.\+c}
\label{geom__disk_8c_source}\index{geom/geom\_disk.c@{geom/geom\_disk.c}}
\mbox{\hyperlink{geom__disk_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002 Poul-\/Henning Kamp}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2002 Networks Associates Technology, Inc.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00006}00006 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00008}00008 \textcolor{comment}{ * This software was developed for the FreeBSD Project by Poul-\/Henning Kamp}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00009}00009 \textcolor{comment}{ * and NAI Labs, the Security Research Division of Network Associates, Inc.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00010}00010 \textcolor{comment}{ * under DARPA/SPAWAR contract N66001-\/01-\/C-\/8035 ("{}CBOSS"{}), as part of the}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00011}00011 \textcolor{comment}{ * DARPA CHATS research program.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00013}00013 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00014}00014 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00015}00015 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00016}00016 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00018}00018 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00019}00019 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00020}00020 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00021}00021 \textcolor{comment}{ * 3. The names of the authors may not be used to endorse or promote}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00022}00022 \textcolor{comment}{ *    products derived from this software without specific prior written}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00023}00023 \textcolor{comment}{ *    permission.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00025}00025 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00026}00026 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00027}00027 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00028}00028 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00029}00029 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00030}00030 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00031}00031 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00032}00032 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00033}00033 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00034}00034 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00035}00035 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00036}00036 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00039}\mbox{\hyperlink{geom__disk_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00039}} \mbox{\hyperlink{geom__disk_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}opt\_geom.h"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/ctype.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/devctl.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/fcntl.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/msan.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/devicestat.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__disk_8h}{geom/geom\_disk.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__int_8h}{geom/geom\_int.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <dev/led/led.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00066}\mbox{\hyperlink{structg__disk__softc}{00066}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00067}\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{00067}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}}         *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00068}\mbox{\hyperlink{structg__disk__softc_a9c85dafe0ec91b6a05e0e904ba0b3307}{00068}}         \textcolor{keyword}{struct }devstat          *\mbox{\hyperlink{structg__disk__softc_a9c85dafe0ec91b6a05e0e904ba0b3307}{d\_devstat}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00069}\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{00069}}         \textcolor{keyword}{struct }sysctl\_ctx\_list  \mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00070}\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{00070}}         \textcolor{keyword}{struct }sysctl\_oid       *\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00071}\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{00071}}         \textcolor{keywordtype}{char}                    \mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}[64];}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00072}\mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{00072}}         uint32\_t                \mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{state}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00073}\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{00073}}         \textcolor{keyword}{struct }mtx               \mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00074}00074 \};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00076}\mbox{\hyperlink{geom__disk_8c_a7b4c0499517051ce0ac04080cc74f17b}{00076}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a68544c65a4d728ce733305aeba2f335b}{g\_access\_t}} \mbox{\hyperlink{geom__disk_8c_a7b4c0499517051ce0ac04080cc74f17b}{g\_disk\_access}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00077}\mbox{\hyperlink{geom__disk_8c_a9df718c41c699d6b0eda6a10e5db786f}{00077}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a2a6559adb145f83df6a58cfbc2be6759}{g\_start\_t}} \mbox{\hyperlink{geom__disk_8c_a9df718c41c699d6b0eda6a10e5db786f}{g\_disk\_start}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00078}\mbox{\hyperlink{geom__disk_8c_a55c6ee55b256850e0612c46b9dabc8cf}{00078}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a4e861d65dc955326d8a286b98c17b65a}{g\_ioctl\_t}} \mbox{\hyperlink{geom__disk_8c_a55c6ee55b256850e0612c46b9dabc8cf}{g\_disk\_ioctl}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00079}\mbox{\hyperlink{geom__disk_8c_a410f9f7174390ef5bed3497f56ca753b}{00079}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_afdb390a9279523d96cb700a712939f76}{g\_dumpconf\_t}} \mbox{\hyperlink{geom__disk_8c_a410f9f7174390ef5bed3497f56ca753b}{g\_disk\_dumpconf}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00080}\mbox{\hyperlink{geom__disk_8c_a63de0d4bb0b09d1e36c4776492f61a6e}{00080}} \textcolor{keyword}{static} \mbox{\hyperlink{geom_8h_a3a6311aa5fd2115a78308461aa54ab29}{g\_provgone\_t}} \mbox{\hyperlink{geom__disk_8c_a63de0d4bb0b09d1e36c4776492f61a6e}{g\_disk\_providergone}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00082}00082 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{geom__disk_8c_a375d9534e1329179e58a61438cc2a090}{g\_disk\_sysctl\_flags}}(SYSCTL\_HANDLER\_ARGS);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00084}\mbox{\hyperlink{geom__disk_8c_ad49619bece69880921d49af8f216efa6}{00084}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{geom__disk_8c_ad49619bece69880921d49af8f216efa6}{g\_disk\_class}} = \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00085}00085         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}} = \mbox{\hyperlink{geom__disk_8h_aac7ca1f61277efbe4ebd68536dba04ba}{G\_DISK\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00086}00086         .version = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00087}00087         .start = \mbox{\hyperlink{geom__disk_8c_a9df718c41c699d6b0eda6a10e5db786f}{g\_disk\_start}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00088}00088         .access = \mbox{\hyperlink{geom__disk_8c_a7b4c0499517051ce0ac04080cc74f17b}{g\_disk\_access}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00089}00089         .ioctl = \mbox{\hyperlink{geom__disk_8c_a55c6ee55b256850e0612c46b9dabc8cf}{g\_disk\_ioctl}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00090}00090         .providergone = \mbox{\hyperlink{geom__disk_8c_a63de0d4bb0b09d1e36c4776492f61a6e}{g\_disk\_providergone}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00091}00091         .dumpconf = \mbox{\hyperlink{geom__disk_8c_a410f9f7174390ef5bed3497f56ca753b}{g\_disk\_dumpconf}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00092}00092 \};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00094}\mbox{\hyperlink{geom__disk_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{00094}} \mbox{\hyperlink{geom__disk_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{SYSCTL\_DECL}}(\_kern\_geom);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00095}\mbox{\hyperlink{geom__disk_8c_a2325c66da4be1907c95812c30b5bf0ff}{00095}} \textcolor{keyword}{static} \mbox{\hyperlink{geom__disk_8c_a2325c66da4be1907c95812c30b5bf0ff}{SYSCTL\_NODE}}(\_kern\_geom, OID\_AUTO, \mbox{\hyperlink{structdisk}{disk}}, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00096}00096     \textcolor{stringliteral}{"{}GEOM\_DISK stuff"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00098}\mbox{\hyperlink{geom__disk_8c_a0aa3384ac49218f124e28c5b89e3c9ef}{00098}} \mbox{\hyperlink{geom__disk_8c_a0aa3384ac49218f124e28c5b89e3c9ef}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{geom__disk_8c_ad49619bece69880921d49af8f216efa6}{g\_disk\_class}}, g\_disk);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00100}00100 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00101}\mbox{\hyperlink{geom__disk_8c_ad2a2f13f8315183072735badb44b0085}{00101}} \mbox{\hyperlink{geom__disk_8c_a7b4c0499517051ce0ac04080cc74f17b}{g\_disk\_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{geom__disk_8c_source_l00102}00102 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00103}00103         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00104}00104         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00105}00105         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00107}00107         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a22c18e8b25a4cc916d2f8a063bca0a56}{G\_T\_ACCESS}}, \textcolor{stringliteral}{"{}g\_disk\_access(\%s, \%d, \%d, \%d)"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00108}00108             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, r, w, e);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00109}00109         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00110}00110         sc = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5516d1ee51e75b228f047f827f46431b}{private}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00111}00111         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}) == NULL || \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00112}00112                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00113}00113 \textcolor{comment}{                 * Allow decreasing access count even if disk is not}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00114}00114 \textcolor{comment}{                 * available anymore.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00115}00115 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00116}00116                 \textcolor{keywordflow}{if} (r <= 0 \&\& w <= 0 \&\& e <= 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00117}00117                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00118}00118                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00119}00119         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00120}00120         r += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00121}00121         w += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00122}00122         e += \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00123}00123         error = 0;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00124}00124         \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{geom__disk_8c_source_l00125}00125                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00126}00126 \textcolor{comment}{                 * It would be better to defer this decision to d\_open if}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00127}00127 \textcolor{comment}{                 * it was able to take flags.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00128}00128 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00129}00129                 \textcolor{keywordflow}{if} (w > 0 \&\& (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_ab74aacd01646e1b0f5522f942f0e0194}{DISKFLAG\_WRITE\_PROTECT}}) != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00130}00130                         error = EROFS;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00131}00131                 \textcolor{keywordflow}{if} (error == 0 \&\& \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a097e2d5635b65a063c7854a4965ce2c2}{d\_open}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00132}00132                         error = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a097e2d5635b65a063c7854a4965ce2c2}{d\_open}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00133}00133                 \textcolor{keywordflow}{if} (bootverbose \&\& error != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00134}00134                         printf(\textcolor{stringliteral}{"{}Opened disk \%s -\/> \%d\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00135}00135                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00136}00136                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00137}00137                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00138}00138                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a02c0994151d37b2cdfced03388062305}{d\_maxsize}} == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00139}00139                         printf(\textcolor{stringliteral}{"{}WARNING: Disk drive \%s\%d has no d\_maxsize\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00140}00140                             \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00141}00141                         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a02c0994151d37b2cdfced03388062305}{d\_maxsize}} = DFLTPHYS;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00142}00142                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00143}00143                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6510a54a4422e9b377e5eead86b72a0b}{d\_delmaxsize}} == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00144}00144                         \textcolor{keywordflow}{if} (bootverbose \&\& \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a62fe54c316be18d7ea9c1d6f98d07c93}{DISKFLAG\_CANDELETE}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00145}00145                                 printf(\textcolor{stringliteral}{"{}WARNING: Disk drive \%s\%d has no "{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00146}00146                                     \textcolor{stringliteral}{"{}d\_delmaxsize\(\backslash\)n"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00147}00147                         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00148}00148                         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6510a54a4422e9b377e5eead86b72a0b}{d\_delmaxsize}} = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a02c0994151d37b2cdfced03388062305}{d\_maxsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00149}00149                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00150}00150                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a91d27a623b472c7dd4b9035126c48bdb}{d\_stripeoffset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00151}00151                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a22d5a082e360f0b742e78a869f6c0e81}{d\_stripesize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00152}00152                 \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} |= \mbox{\hyperlink{geom__disk_8h_af7c55d69ce019639b3b6280c473ad089}{DISKFLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00153}00153                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00154}00154 \textcolor{comment}{                 * Do not invoke resize event when initial size was zero.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00155}00155 \textcolor{comment}{                 * Some disks report its size only after first opening.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00156}00156 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00157}00157                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} == 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00158}00158                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00159}00159                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00160}00160                         \mbox{\hyperlink{geom_8h_a72d479d3ccd8dec427b97c90557f3a4f}{g\_resize\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00161}00161         \} \textcolor{keywordflow}{else} \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{geom__disk_8c_source_l00162}00162                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a177270115250b98043b4487cd6f1aa7e}{d\_close}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00163}00163                         error = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a177270115250b98043b4487cd6f1aa7e}{d\_close}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00164}00164                         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00165}00165                                 printf(\textcolor{stringliteral}{"{}Closed disk \%s -\/> \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00166}00166                                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00167}00167                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00168}00168                 sc-\/>\mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{state}} = \mbox{\hyperlink{geom_8h_ad2718215d050d0e068fa33ea31508455}{G\_STATE\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00169}00169                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}[0] != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00170}00170                         led\_set(sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}, \textcolor{stringliteral}{"{}0"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00171}00171                 \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \&= \string~DISKFLAG\_OPEN;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00172}00172         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00173}00173         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00174}00174 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00176}00176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00177}\mbox{\hyperlink{geom__disk_8c_a8711ab4e09e60350d122d85578c03d20}{00177}} \mbox{\hyperlink{geom__disk_8c_a8711ab4e09e60350d122d85578c03d20}{g\_disk\_kerneldump}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00178}00178 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00179}00179         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}} *gkd;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00180}00180         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00182}00182         gkd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__kerneldump}{g\_kerneldump}}*)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00183}00183         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>geom;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00184}00184         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a7f1804ff1a11f763a1ab5bdbd3e1287c}{G\_T\_TOPOLOGY}}, \textcolor{stringliteral}{"{}g\_disk\_kerneldump(\%s, \%jd, \%jd)"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00185}00185                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}}, (intmax\_t)gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}}, (intmax\_t)gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00186}00186         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ab25019dd6c766d533c5411c3017d73ab}{d\_dump}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00187}00187                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENODEV);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00188}00188                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00189}00189         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00190}00190         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.dumper = dp-\/>\mbox{\hyperlink{structdisk_ab25019dd6c766d533c5411c3017d73ab}{d\_dump}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00191}00191         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.priv = dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00192}00192         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.blocksize = dp-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00193}00193         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.maxiosize = dp-\/>\mbox{\hyperlink{structdisk_a02c0994151d37b2cdfced03388062305}{d\_maxsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00194}00194         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.mediaoffset = gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00195}00195         \textcolor{keywordflow}{if} ((gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}} + gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}}) > dp-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00196}00196                 gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}} = dp-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}} -\/ gkd-\/>\mbox{\hyperlink{structg__kerneldump_aa2f370e534c376b02e72f8c17d514482}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00197}00197         gkd-\/>\mbox{\hyperlink{structg__kerneldump_a840af2cd4eaa4cf322efc478112edca5}{di}}.mediasize = gkd-\/>\mbox{\hyperlink{structg__kerneldump_a5dc5dec9fd5d176d53a0de31cfc6127b}{length}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00198}00198         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, 0);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00199}00199 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00201}00201 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00202}\mbox{\hyperlink{geom__disk_8c_abab4961e63138d3b8b728ab34360140d}{00202}} \mbox{\hyperlink{geom__disk_8c_abab4961e63138d3b8b728ab34360140d}{g\_disk\_setstate}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00203}00203 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00204}00204         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00206}00206         memcpy(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{state}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{state}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00207}00207         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}[0] != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00208}00208                 \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structg__disk__softc_ae77af9e5a3aadd6499f67ea03b7fc46d}{state}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00209}00209                 \textcolor{keywordflow}{case} \mbox{\hyperlink{geom_8h_abb48dc76f4f4949c5eb3ec95d4b86ea1}{G\_STATE\_FAILED}}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00210}00210                         \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}} = \textcolor{stringliteral}{"{}1"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00211}00211                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00212}00212                 \textcolor{keywordflow}{case} \mbox{\hyperlink{geom_8h_a05c3f0c009654bc6a40870d2aed55728}{G\_STATE\_REBUILD}}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00213}00213                         \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}} = \textcolor{stringliteral}{"{}f5"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00214}00214                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00215}00215                 \textcolor{keywordflow}{case} \mbox{\hyperlink{geom_8h_ae32e54332bccb2a49b20ff369d8d2dd4}{G\_STATE\_RESYNC}}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00216}00216                         \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}} = \textcolor{stringliteral}{"{}f1"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00217}00217                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00218}00218                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00219}00219                         \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}} = \textcolor{stringliteral}{"{}0"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00220}00220                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00221}00221                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00222}00222                 led\_set(sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}, \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00223}00223         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00224}00224         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, 0);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00228}\mbox{\hyperlink{geom__disk_8c_a6c03e982168aa7aa5a1d6ac73bc9b718}{00228}} \mbox{\hyperlink{geom__disk_8c_a6c03e982168aa7aa5a1d6ac73bc9b718}{g\_disk\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00230}00230         \textcolor{keyword}{struct }bintime now;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00231}00231         \textcolor{keyword}{struct }bio *bp2;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00232}00232         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00234}00234         \textcolor{comment}{/* See "{}notes"{} for why we need a mutex here */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00235}00235         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_caller1;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00236}00236         bp2 = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_parent;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00237}00237         binuptime(\&now);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00238}00238         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00239}00239         \textcolor{keywordflow}{if} (bp2-\/>bio\_error == 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00240}00240                 bp2-\/>bio\_error = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00241}00241         bp2-\/>bio\_completed += \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/ \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_resid;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00243}00243         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_READ)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00244}00244                 kmsan\_check(bp2-\/>bio\_data, bp2-\/>bio\_completed, \textcolor{stringliteral}{"{}g\_disk\_done"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00246}00246         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00247}00247         \textcolor{keywordflow}{case} BIO\_ZONE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00248}00248                 bcopy(\&\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_zone, \&bp2-\/>bio\_zone, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_zone));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00249}00249                 \textcolor{comment}{/*FALLTHROUGH*/}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00250}00250         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00251}00251         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00252}00252         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00253}00253         \textcolor{keywordflow}{case} BIO\_FLUSH:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00254}00254                 devstat\_end\_transaction\_bio\_bt(sc-\/>\mbox{\hyperlink{structg__disk__softc_a9c85dafe0ec91b6a05e0e904ba0b3307}{d\_devstat}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&now);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00255}00255                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00256}00256         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00257}00257                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00258}00258         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00259}00259         bp2-\/>bio\_inbed++;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00260}00260         \textcolor{keywordflow}{if} (bp2-\/>bio\_children == bp2-\/>bio\_inbed) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00261}00261                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00262}00262                 bp2-\/>bio\_resid = bp2-\/>bio\_bcount -\/ bp2-\/>bio\_completed;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00263}00263                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(bp2, bp2-\/>bio\_error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00264}00264         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00265}00265                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00266}00266         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00267}00267 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00269}00269 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00270}\mbox{\hyperlink{geom__disk_8c_a699acce33ce231b339a489c16adaf83f}{00270}} \mbox{\hyperlink{geom__disk_8c_a55c6ee55b256850e0612c46b9dabc8cf}{g\_disk\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, u\_long \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}}, \textcolor{keywordtype}{void} * \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__if_8m_aab9e30d72b4b6af02ce19b24422ad2ce}{fflag}}, \textcolor{keyword}{struct} thread *\mbox{\hyperlink{g__part__if_8m_aaf840c84d139bb8ad4b3e668c92b3c30}{td}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00271}00271 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00272}00272         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00273}00273         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00275}00275         sc = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5516d1ee51e75b228f047f827f46431b}{private}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00276}00276         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00277}00277         KASSERT(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} != NULL \&\& !\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00278}00278             (\textcolor{stringliteral}{"{}g\_disk\_ioctl(\%lx) on destroyed disk \%s"{}}, \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00280}00280         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a38a0820b745541bc5315068a80001f48}{d\_ioctl}} == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00281}00281                 \textcolor{keywordflow}{return} (ENOIOCTL);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00282}00282         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a38a0820b745541bc5315068a80001f48}{d\_ioctl}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}}, \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \mbox{\hyperlink{g__part__if_8m_aab9e30d72b4b6af02ce19b24422ad2ce}{fflag}}, \mbox{\hyperlink{g__part__if_8m_aaf840c84d139bb8ad4b3e668c92b3c30}{td}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00283}00283 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00285}00285 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00286}\mbox{\hyperlink{geom__disk_8c_a24a828262f5db1e7114628106a6162cd}{00286}} \mbox{\hyperlink{geom__disk_8c_a24a828262f5db1e7114628106a6162cd}{g\_disk\_maxsize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00287}00287 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00288}00288         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_DELETE)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00289}00289                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6510a54a4422e9b377e5eead86b72a0b}{d\_delmaxsize}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00290}00290         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a02c0994151d37b2cdfced03388062305}{d\_maxsize}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00291}00291 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00293}00293 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00294}\mbox{\hyperlink{geom__disk_8c_aa0c90faef06c597ae43159551c735c84}{00294}} \mbox{\hyperlink{geom__disk_8c_aa0c90faef06c597ae43159551c735c84}{g\_disk\_maxsegs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00295}00295 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00296}00296         \textcolor{keywordflow}{return} ((\mbox{\hyperlink{geom__disk_8c_a24a828262f5db1e7114628106a6162cd}{g\_disk\_maxsize}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) / PAGE\_SIZE) + 1);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00297}00297 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00299}00299 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00300}\mbox{\hyperlink{geom__disk_8c_ae2eb6d6910bfa1374fb3710c048e1ed8}{00300}} \mbox{\hyperlink{geom__disk_8c_ae2eb6d6910bfa1374fb3710c048e1ed8}{g\_disk\_advance}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, off\_t off)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00301}00301 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00303}00303         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_offset += off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00304}00304         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/= off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00306}00306         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_VLIST) != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00307}00307                 bus\_dma\_segment\_t *seg, *end;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00309}00309                 seg = (bus\_dma\_segment\_t *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00310}00310                 end = (bus\_dma\_segment\_t *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00311}00311                 off += \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00312}00312                 \textcolor{keywordflow}{while} (off >= seg-\/>ds\_len) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00313}00313                         KASSERT((seg != end),}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00314}00314                             (\textcolor{stringliteral}{"{}vlist request runs off the end"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00315}00315                         off -\/= seg-\/>ds\_len;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00316}00316                         seg++;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00317}00317                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00318}00318                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset = off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00319}00319                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n = end -\/ seg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00320}00320                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = (\textcolor{keywordtype}{void} *)seg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00321}00321         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00322}00322                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma += off / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00323}00323                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset += off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00324}00324                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset \%= PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00325}00325                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n -\/= off / PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00326}00326         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00327}00327                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data += off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00329}00329 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00331}00331 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00332}\mbox{\hyperlink{geom__disk_8c_a0abe7755fbc63f52fef51c905fd400f3}{00332}} \mbox{\hyperlink{geom__disk_8c_a0abe7755fbc63f52fef51c905fd400f3}{g\_disk\_seg\_limit}}(bus\_dma\_segment\_t *seg, off\_t *poffset,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00333}00333     off\_t *plength, \textcolor{keywordtype}{int} *ppages)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00334}00334 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00335}00335         uintptr\_t seg\_page\_base;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00336}00336         uintptr\_t seg\_page\_end;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00337}00337         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00338}00338         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00339}00339         \textcolor{keywordtype}{int} seg\_pages;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00341}00341         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = *poffset;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00342}00342         \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = *plength;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00344}00344         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} > seg-\/>ds\_len -\/ \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00345}00345                 \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = seg-\/>ds\_len -\/ \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00347}00347         seg\_page\_base = trunc\_page(seg-\/>ds\_addr + \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00348}00348         seg\_page\_end  = round\_page(seg-\/>ds\_addr + \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00349}00349         seg\_pages = (seg\_page\_end -\/ seg\_page\_base) >> PAGE\_SHIFT;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00351}00351         \textcolor{keywordflow}{if} (seg\_pages > *ppages) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00352}00352                 seg\_pages = *ppages;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00353}00353                 \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}} = (seg\_page\_base + (seg\_pages << PAGE\_SHIFT)) -\/}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00354}00354                     (seg-\/>ds\_addr + \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00355}00355         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00357}00357         *poffset = 0;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00358}00358         *plength -\/= \mbox{\hyperlink{g__raid__tr__if_8m_ae809d5359ac030c60a30a8f0b2294b82}{length}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00359}00359         *ppages -\/= seg\_pages;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00360}00360 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00362}00362 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00363}\mbox{\hyperlink{geom__disk_8c_a0ef3e4572a6e21f9ff400b2f3f680a35}{00363}} \mbox{\hyperlink{geom__disk_8c_a0ef3e4572a6e21f9ff400b2f3f680a35}{g\_disk\_vlist\_limit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, bus\_dma\_segment\_t **pendseg)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00364}00364 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00365}00365         bus\_dma\_segment\_t *seg, *end \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00366}00366         off\_t residual;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00367}00367         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00368}00368         \textcolor{keywordtype}{int} pages;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00370}00370         seg = (bus\_dma\_segment\_t *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00371}00371         end = (bus\_dma\_segment\_t *)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00372}00372         residual = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00373}00373         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00374}00374         pages = \mbox{\hyperlink{geom__disk_8c_aa0c90faef06c597ae43159551c735c84}{g\_disk\_maxsegs}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00375}00375         \textcolor{keywordflow}{while} (residual != 0 \&\& pages != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00376}00376                 KASSERT((seg != end),}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00377}00377                     (\textcolor{stringliteral}{"{}vlist limit runs off the end"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00378}00378                 \mbox{\hyperlink{geom__disk_8c_a0abe7755fbc63f52fef51c905fd400f3}{g\_disk\_seg\_limit}}(seg, \&\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \&residual, \&pages);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00379}00379                 seg++;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00380}00380         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00381}00381         \textcolor{keywordflow}{if} (pendseg != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00382}00382                 *pendseg = seg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00383}00383         \textcolor{keywordflow}{return} (residual);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00384}00384 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00386}00386 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00387}\mbox{\hyperlink{geom__disk_8c_a2bc6c34b0777cee617db5b95a0e56719}{00387}} \mbox{\hyperlink{geom__disk_8c_a2bc6c34b0777cee617db5b95a0e56719}{g\_disk\_limit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00388}00388 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00389}00389         \textcolor{keywordtype}{bool} limited = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00390}00390         off\_t maxsz;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00392}00392         maxsz = \mbox{\hyperlink{geom__disk_8c_a24a828262f5db1e7114628106a6162cd}{g\_disk\_maxsize}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00394}00394         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00395}00395 \textcolor{comment}{         * XXX: If we have a stripesize we should really use it here.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00396}00396 \textcolor{comment}{         *      Care should be taken in the delete case if this is done}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00397}00397 \textcolor{comment}{         *      as deletes can be very sensitive to size given how they}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00398}00398 \textcolor{comment}{         *      are processed.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00399}00399 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00400}00400         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length > maxsz) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00401}00401                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = maxsz;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00402}00402                 limited = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00403}00403         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00405}00405         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_VLIST) != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00406}00406                 bus\_dma\_segment\_t *firstseg, *endseg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00407}00407                 off\_t residual;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00408}00408 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00409}00409                 firstseg = (bus\_dma\_segment\_t*)\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00410}00410                 residual = \mbox{\hyperlink{geom__disk_8c_a0ef3e4572a6e21f9ff400b2f3f680a35}{g\_disk\_vlist\_limit}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \&endseg);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00411}00411                 \textcolor{keywordflow}{if} (residual != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00412}00412                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n = endseg -\/ firstseg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00413}00413                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length -\/= residual;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00414}00414                         limited = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00415}00415                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00416}00416         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00417}00417                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_n =}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00418}00418                     howmany(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_ma\_offset + \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length, PAGE\_SIZE);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00419}00419         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00421}00421         \textcolor{keywordflow}{return} (limited);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00422}00422 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00424}00424 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00425}\mbox{\hyperlink{geom__disk_8c_a11bb9a47fcbda6dc35cd5cc42a58976d}{00425}} \mbox{\hyperlink{geom__disk_8c_a9df718c41c699d6b0eda6a10e5db786f}{g\_disk\_start}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00426}00426 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00427}00427         \textcolor{keyword}{struct }bio *bp2, *bp3;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00428}00428         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00429}00429         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00430}00430         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00431}00431         off\_t off;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00433}00433         biotrack(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00434}00434 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00435}00435         sc = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>private;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00436}00436         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00437}00437         KASSERT(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} != NULL \&\& !\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00438}00438             (\textcolor{stringliteral}{"{}g\_disk\_start(\%p) on destroyed disk \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>name));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00439}00439         error = EJUSTRETURN;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00440}00440         \textcolor{keywordflow}{switch}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00441}00441         \textcolor{keywordflow}{case} BIO\_DELETE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00442}00442                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a62fe54c316be18d7ea9c1d6f98d07c93}{DISKFLAG\_CANDELETE}})) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00443}00443                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00444}00444                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00445}00445                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00446}00446                 \textcolor{comment}{/* fall-\/through */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00447}00447         \textcolor{keywordflow}{case} BIO\_READ:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00448}00448         \textcolor{keywordflow}{case} BIO\_WRITE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00449}00449                 KASSERT((\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a922ad7cd1ecb8d8ccdc3c800157f27cf}{DISKFLAG\_UNMAPPED\_BIO}}) != 0 ||}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00450}00450                     (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_flags \& BIO\_UNMAPPED) == 0,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00451}00451                     (\textcolor{stringliteral}{"{}unmapped bio not supported by disk \%s"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00452}00452 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00453}00453                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00454}00454                         kmsan\_check\_bio(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}g\_disk\_start"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00456}00456                 off = 0;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00457}00457                 bp3 = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00458}00458                 bp2 = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00459}00459                 \textcolor{keywordflow}{if} (bp2 == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00460}00460                         error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00461}00461                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00462}00462                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00463}00463                 \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00464}00464                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__disk_8c_a2bc6c34b0777cee617db5b95a0e56719}{g\_disk\_limit}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, bp2)) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00465}00465                                 off += bp2-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00467}00467                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00468}00468 \textcolor{comment}{                                 * To avoid a race, we need to grab the next bio}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00469}00469 \textcolor{comment}{                                 * before we schedule this one.  See "{}notes"{}.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00470}00470 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00471}00471                                 bp3 = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00472}00472                                 \textcolor{keywordflow}{if} (bp3 == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00473}00473                                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00474}00474                         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00475}00475                         bp2-\/>bio\_done = \mbox{\hyperlink{geom__disk_8c_a6c03e982168aa7aa5a1d6ac73bc9b718}{g\_disk\_done}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00476}00476                         bp2-\/>bio\_caller1 = sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00477}00477                         bp2-\/>bio\_pblkno = bp2-\/>bio\_offset / \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00478}00478                         bp2-\/>bio\_bcount = bp2-\/>bio\_length;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00479}00479                         bp2-\/>bio\_disk = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00480}00480                         devstat\_start\_transaction\_bio(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}}, bp2);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00481}00481                         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_abae5d2fcd60abfd35cc6afea2829ea6b}{d\_strategy}}(bp2);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00483}00483                         \textcolor{keywordflow}{if} (bp3 == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00484}00484                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00486}00486                         bp2 = bp3;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00487}00487                         bp3 = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00488}00488                         \mbox{\hyperlink{geom__disk_8c_ae2eb6d6910bfa1374fb3710c048e1ed8}{g\_disk\_advance}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}, bp2, off);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00489}00489                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00490}00490                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00491}00491         \textcolor{keywordflow}{case} BIO\_GETATTR:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00492}00492                 \textcolor{comment}{/* Give the driver a chance to override */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00493}00493                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00494}00494                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_disk == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00495}00495                                 \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_disk = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00496}00496                         error = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00497}00497                         \textcolor{keywordflow}{if} (error != -\/1)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00498}00498                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00499}00499                         error = EJUSTRETURN;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00500}00500                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00501}00501                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a1101b455c1a4dd4d75b17628d8196ddd}{g\_handleattr\_int}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::candelete"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00502}00502                     (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a62fe54c316be18d7ea9c1d6f98d07c93}{DISKFLAG\_CANDELETE}}) != 0))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00503}00503                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00504}00504                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a1101b455c1a4dd4d75b17628d8196ddd}{g\_handleattr\_int}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::fwsectors"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00505}00505                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a326e40c02e86725ec887e8449b900941}{d\_fwsectors}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00506}00506                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00507}00507                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a1101b455c1a4dd4d75b17628d8196ddd}{g\_handleattr\_int}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::fwheads"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7d357068f18e96d8928763c9f6aa7345}{d\_fwheads}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00508}00508                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00509}00509                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a735846145a44f7d3a1903e791bc8ccf8}{g\_handleattr\_str}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::ident"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ac94287484409abaf8a85bdf0f7546ef3}{d\_ident}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00510}00510                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00511}00511                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a735846145a44f7d3a1903e791bc8ccf8}{g\_handleattr\_str}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::descr"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_acf19b70a9e6d40d8146ba445025147a0}{d\_descr}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00512}00512                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00513}00513                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_ab23d4ad00bf5c10051a02ec7ab7f1ea5}{g\_handleattr\_uint16\_t}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::hba\_vendor"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00514}00514                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a69e068f28dfd461fa61f3569c8c6de2e}{d\_hba\_vendor}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00515}00515                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00516}00516                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_ab23d4ad00bf5c10051a02ec7ab7f1ea5}{g\_handleattr\_uint16\_t}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::hba\_device"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00517}00517                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a102bec152aa960816b342c284061f1be}{d\_hba\_device}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00518}00518                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00519}00519                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_ab23d4ad00bf5c10051a02ec7ab7f1ea5}{g\_handleattr\_uint16\_t}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::hba\_subvendor"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00520}00520                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a89d461205d9fa3af912dfbf445ad177e}{d\_hba\_subvendor}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00521}00521                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00522}00522                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_ab23d4ad00bf5c10051a02ec7ab7f1ea5}{g\_handleattr\_uint16\_t}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::hba\_subdevice"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00523}00523                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a30070d412307d544ebe88b3a0db3793c}{d\_hba\_subdevice}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00524}00524                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00525}00525                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute, \textcolor{stringliteral}{"{}GEOM::kerneldump"{}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00526}00526                         \mbox{\hyperlink{geom__disk_8c_a8711ab4e09e60350d122d85578c03d20}{g\_disk\_kerneldump}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00527}00527                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute, \textcolor{stringliteral}{"{}GEOM::setstate"{}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00528}00528                         \mbox{\hyperlink{geom__disk_8c_abab4961e63138d3b8b728ab34360140d}{g\_disk\_setstate}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, sc);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00529}00529                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_ab23d4ad00bf5c10051a02ec7ab7f1ea5}{g\_handleattr\_uint16\_t}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::rotation\_rate"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00530}00530                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00531}00531                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00532}00532                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a735846145a44f7d3a1903e791bc8ccf8}{g\_handleattr\_str}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{stringliteral}{"{}GEOM::attachment"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00533}00533                     \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a99364c15a58b9447d8af5fc005e072e0}{d\_attachment}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00534}00534                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00535}00535                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00536}00536                         error = ENOIOCTL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00537}00537                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00538}00538         \textcolor{keywordflow}{case} BIO\_FLUSH:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00539}00539                 \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a38d9a04b6d890b00e0ecf00497314c0c}{G\_T\_BIO}}, \textcolor{stringliteral}{"{}g\_disk\_flushcache(\%s)"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00540}00540                     \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>name);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00541}00541                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a931aca0fa26093b47d51e36e5853cf9c}{DISKFLAG\_CANFLUSHCACHE}})) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00542}00542                         error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00543}00543                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00544}00544                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00545}00545                 \textcolor{comment}{/*FALLTHROUGH*/}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00546}00546         \textcolor{keywordflow}{case} BIO\_ZONE:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00547}00547                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_ZONE) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00548}00548                         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a54b95020a27c8be42ad53dbe76a1b968}{DISKFLAG\_CANZONE}})) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00549}00549                                 error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00550}00550                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00551}00551                         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00552}00552                         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a38d9a04b6d890b00e0ecf00497314c0c}{G\_T\_BIO}}, \textcolor{stringliteral}{"{}g\_disk\_zone(\%s)"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00553}00553                             \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to-\/>name);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00554}00554                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00555}00555                 bp2 = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00556}00556                 \textcolor{keywordflow}{if} (bp2 == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00557}00557                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00558}00558                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00559}00559                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00560}00560                 bp2-\/>bio\_done = \mbox{\hyperlink{geom__disk_8c_a6c03e982168aa7aa5a1d6ac73bc9b718}{g\_disk\_done}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00561}00561                 bp2-\/>bio\_caller1 = sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00562}00562                 bp2-\/>bio\_disk = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00563}00563                 devstat\_start\_transaction\_bio(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}}, bp2);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00564}00564                 \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_abae5d2fcd60abfd35cc6afea2829ea6b}{d\_strategy}}(bp2);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00565}00565                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00566}00566         \textcolor{keywordflow}{case} BIO\_SPEEDUP:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00567}00567                 bp2 = \mbox{\hyperlink{geom_8h_a4ef26e4ec68e35e8f892692c524a3d4f}{g\_clone\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00568}00568                 \textcolor{keywordflow}{if} (bp2 == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00569}00569                         \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, ENOMEM);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00570}00570                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00571}00571                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00572}00572                 bp2-\/>bio\_done = \mbox{\hyperlink{geom__disk_8c_a6c03e982168aa7aa5a1d6ac73bc9b718}{g\_disk\_done}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00573}00573                 bp2-\/>bio\_caller1 = sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00574}00574                 bp2-\/>bio\_disk = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00575}00575                 \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_abae5d2fcd60abfd35cc6afea2829ea6b}{d\_strategy}}(bp2);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00576}00576                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00577}00577         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00578}00578                 error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00579}00579                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00580}00580         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00581}00581         \textcolor{keywordflow}{if} (error != EJUSTRETURN)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00582}00582                 \mbox{\hyperlink{geom_8h_a0975be2dcd40a26a56a1a9bfc80433e1}{g\_io\_deliver}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00583}00583         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00584}00584 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00585}00585 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00586}00586 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00587}\mbox{\hyperlink{geom__disk_8c_a3d404eb008875445ab9e744c21b6ebd9}{00587}} \mbox{\hyperlink{geom__disk_8c_a410f9f7174390ef5bed3497f56ca753b}{g\_disk\_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}}, \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{geom__disk_8c_source_l00588}00588 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00589}00589         \textcolor{keyword}{struct }bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00590}00590         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00591}00591         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00592}00592         \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00593}00593         \textcolor{keywordtype}{int} res = 0;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00595}00595         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00596}00596         \textcolor{keywordflow}{if} (sc == NULL || (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}) == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00597}00597                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00598}00598         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00599}00599                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} hd \%u"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7d357068f18e96d8928763c9f6aa7345}{d\_fwheads}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00600}00600                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} sc \%u"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a326e40c02e86725ec887e8449b900941}{d\_fwsectors}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00601}00601                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00602}00602         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00603}00603         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00604}00604                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<fwheads>\%u</fwheads>\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00605}00605                     \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a7d357068f18e96d8928763c9f6aa7345}{d\_fwheads}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00606}00606                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<fwsectors>\%u</fwsectors>\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00607}00607                     \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a326e40c02e86725ec887e8449b900941}{d\_fwsectors}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00609}00609                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00610}00610 \textcolor{comment}{                 * "{}rotationrate"{} is a little complicated, because the value}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00611}00611 \textcolor{comment}{                 * returned by the drive might not be the RPM; 0 and 1 are}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00612}00612 \textcolor{comment}{                 * special cases, and there's also a valid range.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00613}00613 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00614}00614                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<rotationrate>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00615}00615                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}} == \mbox{\hyperlink{geom__disk_8h_a0c664e19e0a934300f893e4935309faa}{DISK\_RR\_UNKNOWN}}) \textcolor{comment}{/* Old drives */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00616}00616                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}unknown"{}});      \textcolor{comment}{/* don't report RPM. */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00617}00617                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}} == \mbox{\hyperlink{geom__disk_8h_a01287074811891ad8aac98a661f6143f}{DISK\_RR\_NON\_ROTATING}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00618}00618                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}0"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00619}00619                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}} >= \mbox{\hyperlink{geom__disk_8h_ab841ff3373bbf19d1d00af0d91a96d1c}{DISK\_RR\_MIN}}) \&\&}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00620}00620                     (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}} <= \mbox{\hyperlink{geom__disk_8h_ab907c8f1b890ed9bbda7f226fefc0d4e}{DISK\_RR\_MAX}}))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00621}00621                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%u"{}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a56f77fdff5d684d7cbf13d7addfe461e}{d\_rotation\_rate}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00622}00622                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00623}00623                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}invalid"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00624}00624                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</rotationrate>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00625}00625                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00626}00626                         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(DISK\_IDENT\_SIZE, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00627}00627                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} = \mbox{\hyperlink{geom_8h_ae13a6895af777c09cf19545f48517fe4}{g\_alloc\_bio}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00628}00628                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_disk = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00629}00629                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute = \textcolor{stringliteral}{"{}GEOM::ident"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00630}00630                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = DISK\_IDENT\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00631}00631                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00632}00632                         res = \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00633}00633                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ident>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00634}00634                         \mbox{\hyperlink{geom__dump_8c_a087aac75cef29cc10f95a4f72b9001f1}{g\_conf\_cat\_escaped}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, res == 0 ? \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} : \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ac94287484409abaf8a85bdf0f7546ef3}{d\_ident}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00635}00635                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</ident>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00636}00636                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute = \textcolor{stringliteral}{"{}GEOM::lunid"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00637}00637                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = DISK\_IDENT\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00638}00638                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00639}00639                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00640}00640                                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<lunid>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00641}00641                                 \mbox{\hyperlink{geom__dump_8c_a087aac75cef29cc10f95a4f72b9001f1}{g\_conf\_cat\_escaped}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00642}00642                                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</lunid>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00643}00643                         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00644}00644                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_attribute = \textcolor{stringliteral}{"{}GEOM::lunname"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00645}00645                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_length = DISK\_IDENT\_SIZE;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00646}00646                         \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_data = \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00647}00647                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_a6015602edec4c888d6e9fe1782c57c9d}{d\_getattr}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00648}00648                                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<lunname>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00649}00649                                 \mbox{\hyperlink{geom__dump_8c_a087aac75cef29cc10f95a4f72b9001f1}{g\_conf\_cat\_escaped}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00650}00650                                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</lunname>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00651}00651                         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00652}00652                         \mbox{\hyperlink{geom_8h_ae3cbea7d4bf48f25bb609df3d3f0bb28}{g\_destroy\_bio}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00653}00653                         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00654}00654                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00655}00655                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<ident>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00656}00656                         \mbox{\hyperlink{geom__dump_8c_a087aac75cef29cc10f95a4f72b9001f1}{g\_conf\_cat\_escaped}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ac94287484409abaf8a85bdf0f7546ef3}{d\_ident}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00657}00657                         sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</ident>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00658}00658                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00659}00659                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<descr>"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00660}00660                 \mbox{\hyperlink{geom__dump_8c_a087aac75cef29cc10f95a4f72b9001f1}{g\_conf\_cat\_escaped}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_acf19b70a9e6d40d8146ba445025147a0}{d\_descr}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00661}00661                 sbuf\_cat(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}</descr>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00662}00662         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00663}00663 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00665}00665 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00666}\mbox{\hyperlink{geom__disk_8c_a802bd8282850a532974b5ea3be44178b}{00666}} \mbox{\hyperlink{geom__disk_8c_a802bd8282850a532974b5ea3be44178b}{g\_disk\_resize}}(\textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00667}00667 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00668}00668         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00669}00669         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00670}00670         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00671}00671 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00672}00672         \textcolor{keywordflow}{if} (flag == \mbox{\hyperlink{geom_8h_afd5164d1355b481a911bb285baf4bc82}{EV\_CANCEL}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00673}00673                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00674}00674         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00676}00676         dp = ptr;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00677}00677         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00678}00678 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00679}00679         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}} || \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00680}00680                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00682}00682         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider, provider) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00683}00683                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != 0 \&\&}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00684}00684                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != dp-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00685}00685                         \mbox{\hyperlink{geom_8h_a164882713025c4e0cc58b1ac8501bcf0}{g\_wither\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00686}00686                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00687}00687                         \mbox{\hyperlink{geom_8h_a72d479d3ccd8dec427b97c90557f3a4f}{g\_resize\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, dp-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00688}00688         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00689}00689 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00690}00690 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00691}00691 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00692}\mbox{\hyperlink{geom__disk_8c_afb7841b62589ced32b9e4b9412acfc6b}{00692}} \mbox{\hyperlink{geom__disk_8c_afb7841b62589ced32b9e4b9412acfc6b}{g\_disk\_create}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00693}00693 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00694}00694         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00695}00695         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00696}00696         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00697}00697         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00698}00698         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk__alias}{disk\_alias}} *dap;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00699}00699         \textcolor{keywordtype}{char} tmpstr[80];}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00701}00701         \textcolor{keywordflow}{if} (flag == \mbox{\hyperlink{geom_8h_afd5164d1355b481a911bb285baf4bc82}{EV\_CANCEL}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00702}00702                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00703}00703         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00704}00704         dp = arg;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00706}00706         mtx\_pool\_lock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00707}00707         dp-\/>\mbox{\hyperlink{structdisk_a30231aabb9c12026dfe3995dc71bb147}{d\_init\_level}} = \mbox{\hyperlink{geom__disk_8h_a5c0f4343262e183731c03f1a4d92893dada4f08f03399881f86ca99fa7d8f887f}{DISK\_INIT\_START}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00709}00709         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00710}00710 \textcolor{comment}{         * If the disk has already gone away, we can just stop here and}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00711}00711 \textcolor{comment}{         * call the user's callback to tell him we've cleaned things up.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00712}00712 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00713}00713         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ac6a5e52f2592869b6d6e2b888d2bafa4}{d\_goneflag}} != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00714}00714                 mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00715}00715                 \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ab1edb09c7bc39c745c6b0eb923381447}{d\_gone}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00716}00716                         dp-\/>\mbox{\hyperlink{structdisk_ab1edb09c7bc39c745c6b0eb923381447}{d\_gone}}(dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00717}00717                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00718}00718         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00719}00719         mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00720}00720 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00721}00721         sc = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(*sc), M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00722}00722         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}}, \textcolor{stringliteral}{"{}g\_disk\_done"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00723}00723         sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00724}00724         sc-\/>\mbox{\hyperlink{structg__disk__softc_a9c85dafe0ec91b6a05e0e904ba0b3307}{d\_devstat}} = dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00725}00725         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom_8h_a4000befe2ff4b405b8333ccc5b0fdb41}{g\_new\_geomf}}(\&\mbox{\hyperlink{geom__disk_8c_ad49619bece69880921d49af8f216efa6}{g\_disk\_class}}, \textcolor{stringliteral}{"{}\%s\%d"{}}, dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00726}00726         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00727}00727         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \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{geom__disk_8c_source_l00728}00728         LIST\_FOREACH(dap, \&dp-\/>d\_aliases, da\_next)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00729}00729                 \mbox{\hyperlink{geom_8h_a14208f360ed869858f7e5878e8940470}{g\_provider\_add\_alias}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{stringliteral}{"{}\%s\%d"{}}, dap-\/>\mbox{\hyperlink{structdisk__alias_abf9ec2acd0bba202f6726dc628664de0}{da\_alias}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00730}00730         devstat\_remove\_entry(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5748aca46ccb3c74434a4b605338e1d2}{stat}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00731}00731         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5748aca46ccb3c74434a4b605338e1d2}{stat}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00732}00732         dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}}-\/>id = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00733}00733         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} = dp-\/>\mbox{\hyperlink{structdisk_a725c17426290532b76529411ce3bea21}{d\_mediasize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00734}00734         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = dp-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00735}00735         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ac6baefca9562013cb451aee0a665e378}{stripeoffset}} = dp-\/>\mbox{\hyperlink{structdisk_a91d27a623b472c7dd4b9035126c48bdb}{d\_stripeoffset}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00736}00736         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}} = dp-\/>\mbox{\hyperlink{structdisk_a22d5a082e360f0b742e78a869f6c0e81}{d\_stripesize}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00737}00737         \textcolor{keywordflow}{if} ((dp-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a922ad7cd1ecb8d8ccdc3c800157f27cf}{DISKFLAG\_UNMAPPED\_BIO}}) != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00738}00738                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= \mbox{\hyperlink{geom_8h_a82547ff81813e6e37dd57c36e530c7e2}{G\_PF\_ACCEPT\_UNMAPPED}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00739}00739         \textcolor{keywordflow}{if} ((dp-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a4feef9e7d7455a059503c6b40776d883}{DISKFLAG\_DIRECT\_COMPLETION}}) != 0)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00740}00740                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= \mbox{\hyperlink{geom_8h_a486656f757680c7ff0c7ca06b643eb2d}{G\_PF\_DIRECT\_SEND}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00741}00741         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} |= \mbox{\hyperlink{geom_8h_a36e660dabad70e0fd2439be3ddca8d47}{G\_PF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00742}00742         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00743}00743                 printf(\textcolor{stringliteral}{"{}GEOM: new disk \%s\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00744}00744         sysctl\_ctx\_init(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00745}00745         snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}GEOM disk \%s"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00746}00746         sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}} = SYSCTL\_ADD\_NODE(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00747}00747                 SYSCTL\_STATIC\_CHILDREN(\_kern\_geom\_disk), OID\_AUTO, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00748}00748                 CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0, tmpstr);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00749}00749         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00750}00750                 SYSCTL\_ADD\_STRING(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00751}00751                     SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}}), OID\_AUTO, \textcolor{stringliteral}{"{}led"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00752}00752                     CTLFLAG\_RWTUN, sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}),}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00753}00753                     \textcolor{stringliteral}{"{}LED name"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00754}00754                 SYSCTL\_ADD\_PROC(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00755}00755                     SYSCTL\_CHILDREN(sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}}), OID\_AUTO, \textcolor{stringliteral}{"{}flags"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00756}00756                     CTLTYPE\_STRING | CTLFLAG\_RD | CTLFLAG\_MPSAFE, dp, 0,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00757}00757                     \mbox{\hyperlink{geom__disk_8c_a375d9534e1329179e58a61438cc2a090}{g\_disk\_sysctl\_flags}}, \textcolor{stringliteral}{"{}A"{}}, \textcolor{stringliteral}{"{}Report disk flags"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00758}00758         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00759}00759         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5516d1ee51e75b228f047f827f46431b}{private}} = sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00760}00760         dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}} = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00761}00761         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, 0);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00763}00763         mtx\_pool\_lock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00764}00764         dp-\/>\mbox{\hyperlink{structdisk_a30231aabb9c12026dfe3995dc71bb147}{d\_init\_level}} = \mbox{\hyperlink{geom__disk_8h_a5c0f4343262e183731c03f1a4d92893da707c9a9c1b87838a3120cc6fcca51c99}{DISK\_INIT\_DONE}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00765}00765 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00766}00766         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00767}00767 \textcolor{comment}{         * If the disk has gone away at this stage, start the withering}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00768}00768 \textcolor{comment}{         * process for it.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00769}00769 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00770}00770         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ac6a5e52f2592869b6d6e2b888d2bafa4}{d\_goneflag}} != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00771}00771                 mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00772}00772                 \mbox{\hyperlink{geom_8h_a164882713025c4e0cc58b1ac8501bcf0}{g\_wither\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00773}00773                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00774}00774         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00775}00775         mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00777}00777 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00778}00778 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00779}00779 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00780}00780 \textcolor{comment}{ * We get this callback after all of the consumers have gone away, and just}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00781}00781 \textcolor{comment}{ * before the provider is freed.  If the disk driver provided a d\_gone}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00782}00782 \textcolor{comment}{ * callback, let them know that it is okay to free resources -\/-\/ they won't}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00783}00783 \textcolor{comment}{ * be getting any more accesses from GEOM.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00784}00784 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00785}00785 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00786}\mbox{\hyperlink{geom__disk_8c_a31392b1c035b42a17e3188f07ac7139a}{00786}} \mbox{\hyperlink{geom__disk_8c_a63de0d4bb0b09d1e36c4776492f61a6e}{g\_disk\_providergone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00787}00787 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00788}00788         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00789}00789         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00791}00791         sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *)\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5516d1ee51e75b228f047f827f46431b}{private}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00792}00792         \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00793}00793         if (\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} != NULL \&\& \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ab1edb09c7bc39c745c6b0eb923381447}{d\_gone}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00794}00794                 \mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}}-\/>\mbox{\hyperlink{structdisk_ab1edb09c7bc39c745c6b0eb923381447}{d\_gone}}(\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00795}00795         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00796}00796                 sysctl\_ctx\_free(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_aa00e0d8a6d7abaf5da38fabb87a0fd0b}{sysctl\_ctx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00797}00797                 sc-\/>\mbox{\hyperlink{structg__disk__softc_abfe53c808bc9741d7486cd5628de5b25}{sysctl\_tree}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00798}00798         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00799}00799         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}[0] != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00800}00800                 led\_set(sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}, \textcolor{stringliteral}{"{}0"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00801}00801                 sc-\/>\mbox{\hyperlink{structg__disk__softc_a16a054824305f4e196d17cb6f89b5613}{led}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00802}00802         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00803}00803         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a5516d1ee51e75b228f047f827f46431b}{private}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00804}00804         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00805}00805         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__disk__softc_a245f0fa7721a6ecece80faf70d0ccb3c}{done\_mtx}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00806}00806         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00807}00807 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00808}00808 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00809}00809 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00810}\mbox{\hyperlink{geom__disk_8c_ae7b1b706b01f3808b3123cccf15fb921}{00810}} \mbox{\hyperlink{geom__disk_8c_ae7b1b706b01f3808b3123cccf15fb921}{g\_disk\_destroy}}(\textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00811}00811 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00812}00812         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00813}00813         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00814}00814         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__disk__softc}{g\_disk\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00815}00815         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk__alias}{disk\_alias}} *dap, *daptmp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00817}00817         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00818}00818         dp = ptr;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00819}00819         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00820}00820         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00821}00821                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00822}00822                 \textcolor{keywordflow}{if} (sc != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00823}00823                         sc-\/>\mbox{\hyperlink{structg__disk__softc_aae00be8913b0088da5592fd4e0431884}{dp}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00824}00824                 dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00825}00825                 \mbox{\hyperlink{geom_8h_a87a0eb5de79ed5e49fcfec012f213c9b}{g\_wither\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00826}00826         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00827}00827         LIST\_FOREACH\_SAFE(dap, \&dp-\/>d\_aliases, da\_next, daptmp)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00828}00828                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(dap);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00830}00830         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00831}00831 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00833}00833 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00834}00834 \textcolor{comment}{ * We only allow printable characters in disk ident,}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00835}00835 \textcolor{comment}{ * the rest is converted to 'x<HH>'.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00836}00836 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00837}00837 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00838}\mbox{\hyperlink{geom__disk_8c_af0e57a842238098f2be9f7d40d0cd1f7}{00838}} \mbox{\hyperlink{geom__disk_8c_af0e57a842238098f2be9f7d40d0cd1f7}{g\_disk\_ident\_adjust}}(\textcolor{keywordtype}{char} *ident, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00839}00839 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00840}00840         \textcolor{keywordtype}{char} *p, tmp[4], newid[DISK\_IDENT\_SIZE];}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00841}00841 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00842}00842         newid[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00843}00843         \textcolor{keywordflow}{for} (p = ident; *p != \textcolor{charliteral}{'\(\backslash\)0'}; p++) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00844}00844                 \textcolor{keywordflow}{if} (isprint(*p)) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00845}00845                         tmp[0] = *p;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00846}00846                         tmp[1] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00847}00847                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00848}00848                         snprintf(tmp, \textcolor{keyword}{sizeof}(tmp), \textcolor{stringliteral}{"{}x\%02hhx"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00849}00849                             *(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *)p);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00850}00850                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00851}00851                 \textcolor{keywordflow}{if} (strlcat(newid, tmp, \textcolor{keyword}{sizeof}(newid)) >= \textcolor{keyword}{sizeof}(newid))}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00852}00852                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00853}00853         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00854}00854         bzero(ident, size);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00855}00855         strlcpy(ident, newid, size);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00856}00856 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00857}00857 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00858}00858 \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00859}\mbox{\hyperlink{geom__disk_8c_a1ee884a8c6d6bb6fccd45cb26a076035}{00859}} \mbox{\hyperlink{geom__disk_8c_a1ee884a8c6d6bb6fccd45cb26a076035}{disk\_alloc}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00860}00860 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00861}00861         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00863}00863         dp = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}}), M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00864}00864         LIST\_INIT(\&dp-\/>d\_aliases);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00865}00865         \textcolor{keywordflow}{return} (dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00866}00866 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00868}00868 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00869}\mbox{\hyperlink{geom__disk_8c_a43c5fd241994e95f5679c76e3acd2358}{00869}} \mbox{\hyperlink{geom__disk_8c_a43c5fd241994e95f5679c76e3acd2358}{disk\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keywordtype}{int} version)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00870}00870 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00871}00871 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00872}00872         \textcolor{keywordflow}{if} (version != \mbox{\hyperlink{geom__disk_8h_a0bde5ddc265fe46675329b8054e6f7e9}{DISK\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00873}00873                 printf(\textcolor{stringliteral}{"{}WARNING: Attempt to add disk \%s\%d \%s"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00874}00874                     dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00875}00875                     \textcolor{stringliteral}{"{} using incompatible ABI version of disk(9)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00876}00876                 printf(\textcolor{stringliteral}{"{}WARNING: Ignoring disk \%s\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00877}00877                     dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00878}00878                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00879}00879         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00880}00880         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}} \& \mbox{\hyperlink{geom__disk_8h_a407386f543340cb4f4df74a40ac2d66d}{DISKFLAG\_RESERVED}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00881}00881                 printf(\textcolor{stringliteral}{"{}WARNING: Attempt to add non-\/MPSAFE disk \%s\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00882}00882                     dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00883}00883                 printf(\textcolor{stringliteral}{"{}WARNING: Ignoring disk \%s\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00884}00884                     dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00885}00885                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00886}00886         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00887}00887         KASSERT(dp-\/>\mbox{\hyperlink{structdisk_abae5d2fcd60abfd35cc6afea2829ea6b}{d\_strategy}} != NULL, (\textcolor{stringliteral}{"{}disk\_create need d\_strategy"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00888}00888         KASSERT(dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}} != NULL, (\textcolor{stringliteral}{"{}disk\_create need d\_name"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00889}00889         KASSERT(*dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}} != 0, (\textcolor{stringliteral}{"{}disk\_create need d\_name"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00890}00890         KASSERT(strlen(dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}) < SPECNAMELEN -\/ 4, (\textcolor{stringliteral}{"{}disk name too long"{}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00891}00891         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}} == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00892}00892                 dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}} = devstat\_new\_entry(dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}}, dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00893}00893                     dp-\/>\mbox{\hyperlink{structdisk_ab6b60ce07a0f95aaf802901ee1f218f5}{d\_sectorsize}}, DEVSTAT\_ALL\_SUPPORTED,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00894}00894                     DEVSTAT\_TYPE\_DIRECT, DEVSTAT\_PRIORITY\_MAX);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00895}00895         dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}} = NULL;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00896}00896         dp-\/>\mbox{\hyperlink{structdisk_a0ac08f796286881ea3f6397b7b854bec}{d\_event}} = \mbox{\hyperlink{geom_8h_a2786a5bd64de1c7797827afe5784a292}{g\_alloc\_event}}(M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00898}00898         dp-\/>\mbox{\hyperlink{structdisk_a30231aabb9c12026dfe3995dc71bb147}{d\_init\_level}} = \mbox{\hyperlink{geom__disk_8h_a5c0f4343262e183731c03f1a4d92893da7202ea3536c46b35d6db1ab2c1911433}{DISK\_INIT\_NONE}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00900}00900         \mbox{\hyperlink{geom__disk_8c_af0e57a842238098f2be9f7d40d0cd1f7}{g\_disk\_ident\_adjust}}(dp-\/>\mbox{\hyperlink{structdisk_ac94287484409abaf8a85bdf0f7546ef3}{d\_ident}}, \textcolor{keyword}{sizeof}(dp-\/>\mbox{\hyperlink{structdisk_ac94287484409abaf8a85bdf0f7546ef3}{d\_ident}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00901}00901         \mbox{\hyperlink{geom_8h_a196998b2923eb556355a617daaef1879}{g\_post\_event}}(\mbox{\hyperlink{geom__disk_8c_afb7841b62589ced32b9e4b9412acfc6b}{g\_disk\_create}}, dp, M\_WAITOK, dp, NULL);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00902}00902 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00903}00903 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00904}00904 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00905}\mbox{\hyperlink{geom__disk_8c_ac87f2ba3b041278c356093776deb8ef6}{00905}} \mbox{\hyperlink{geom__disk_8c_ac87f2ba3b041278c356093776deb8ef6}{disk\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00906}00906 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00908}00908         KASSERT(dp-\/>\mbox{\hyperlink{structdisk_a0ac08f796286881ea3f6397b7b854bec}{d\_event}} != NULL,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00909}00909             (\textcolor{stringliteral}{"{}Disk destroy for \%p with event NULL"{}}, dp));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00910}00910         \mbox{\hyperlink{geom__disk_8c_acb6ebd65cec7084c93b3e71b7e9ad6e0}{disk\_gone}}(dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00911}00911         dp-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}} = 1;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00912}00912         \mbox{\hyperlink{geom_8h_a3671f3c7fc5dbdd70514c2e2ad07feda}{g\_cancel\_event}}(dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00913}00913         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00914}00914                 devstat\_remove\_entry(dp-\/>\mbox{\hyperlink{structdisk_ae1b0a410d622ab43c980bb931dfb93e0}{d\_devstat}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00915}00915         \mbox{\hyperlink{geom_8h_a8094697ec8a17fd596f0436f1fd1fd62}{g\_post\_event\_ep}}(\mbox{\hyperlink{geom__disk_8c_ae7b1b706b01f3808b3123cccf15fb921}{g\_disk\_destroy}}, dp, dp-\/>\mbox{\hyperlink{structdisk_a0ac08f796286881ea3f6397b7b854bec}{d\_event}}, NULL);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00916}00916 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00917}00917 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00918}00918 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00919}\mbox{\hyperlink{geom__disk_8c_a7e176c98fdfd3ff55a8115ba965c7786}{00919}} \mbox{\hyperlink{geom__disk_8c_a7e176c98fdfd3ff55a8115ba965c7786}{disk\_add\_alias}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00920}00920 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00921}00921         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk__alias}{disk\_alias}} *dap;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00922}00922 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00923}00923         dap = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdisk__alias}{disk\_alias}} *)\mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00924}00924                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk__alias}{disk\_alias}}) + strlen(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) + 1, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00925}00925         strcpy((\textcolor{keywordtype}{char} *)(dap + 1), \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00926}00926         dap-\/>\mbox{\hyperlink{structdisk__alias_abf9ec2acd0bba202f6726dc628664de0}{da\_alias}} = (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *)(dap + 1);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00927}00927         LIST\_INSERT\_HEAD(\&dp-\/>d\_aliases, dap, da\_next);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00928}00928 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00929}00929 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00930}00930 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00931}\mbox{\hyperlink{geom__disk_8c_acb6ebd65cec7084c93b3e71b7e9ad6e0}{00931}} \mbox{\hyperlink{geom__disk_8c_acb6ebd65cec7084c93b3e71b7e9ad6e0}{disk\_gone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00932}00932 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00933}00933         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00934}00934         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00935}00935 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00936}00936         mtx\_pool\_lock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00937}00937 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00938}00938         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00939}00939 \textcolor{comment}{         * Second wither call makes no sense, plus we can not access the list}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00940}00940 \textcolor{comment}{         * of providers without topology lock after calling wither once.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00941}00941 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00942}00942         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_ac6a5e52f2592869b6d6e2b888d2bafa4}{d\_goneflag}} != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00943}00943                 mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00944}00944                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00945}00945         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00947}00947         dp-\/>\mbox{\hyperlink{structdisk_ac6a5e52f2592869b6d6e2b888d2bafa4}{d\_goneflag}} = 1;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00948}00948 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00949}00949         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00950}00950 \textcolor{comment}{         * If we're still in the process of creating this disk (the}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00951}00951 \textcolor{comment}{         * g\_disk\_create() function is still queued, or is in}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00952}00952 \textcolor{comment}{         * progress), the init level will not yet be DISK\_INIT\_DONE.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00953}00953 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00954}00954 \textcolor{comment}{         * If that is the case, g\_disk\_create() will see d\_goneflag}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00955}00955 \textcolor{comment}{         * and take care of cleaning things up.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00956}00956 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00957}00957 \textcolor{comment}{         * If the disk has already been created, we default to}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00958}00958 \textcolor{comment}{         * withering the provider as usual below.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00959}00959 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00960}00960 \textcolor{comment}{         * If the caller has not set a d\_gone() callback, he will}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00961}00961 \textcolor{comment}{         * not be any worse off by returning here, because the geom}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00962}00962 \textcolor{comment}{         * has not been fully setup in any case.}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00963}00963 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00964}00964         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_a30231aabb9c12026dfe3995dc71bb147}{d\_init\_level}} < \mbox{\hyperlink{geom__disk_8h_a5c0f4343262e183731c03f1a4d92893da707c9a9c1b87838a3120cc6fcca51c99}{DISK\_INIT\_DONE}}) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00965}00965                 mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00966}00966                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00967}00967         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00968}00968         mtx\_pool\_unlock(mtxpool\_sleep, dp);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00969}00969 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00970}00970         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00971}00971         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00972}00972         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00973}00973                 KASSERT(LIST\_NEXT(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, provider) == NULL,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00974}00974                     (\textcolor{stringliteral}{"{}geom \%p has more than one provider"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00975}00975                 \mbox{\hyperlink{geom_8h_a164882713025c4e0cc58b1ac8501bcf0}{g\_wither\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00976}00976         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00977}00977 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00978}00978 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00979}00979 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00980}\mbox{\hyperlink{geom__disk_8c_a48793361dc8b6fb3b32afc1481b547ed}{00980}} \mbox{\hyperlink{geom__disk_8c_a48793361dc8b6fb3b32afc1481b547ed}{disk\_attr\_changed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *attr, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00981}00981 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00982}00982         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00983}00983         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00984}00984         \textcolor{keywordtype}{char} devnamebuf[128];}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00985}00985 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00986}00986         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00987}00987         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00988}00988                 LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider, provider)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00989}00989                         (void)\mbox{\hyperlink{geom_8h_a1f372937bd8491ddbfe2ec80a7b69610}{g\_attr\_changed}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, attr, flag);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00990}00990         snprintf(devnamebuf, \textcolor{keyword}{sizeof}(devnamebuf), \textcolor{stringliteral}{"{}devname=\%s\%d"{}}, dp-\/>\mbox{\hyperlink{structdisk_a72ebb3eb591e2022e6989e2189d2a4b0}{d\_name}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00991}00991             dp-\/>\mbox{\hyperlink{structdisk_aaaf92f6d11debfe4e6275e98d2dc9ba1}{d\_unit}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00992}00992         devctl\_notify(\textcolor{stringliteral}{"{}GEOM"{}}, \textcolor{stringliteral}{"{}disk"{}}, attr, devnamebuf);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00993}00993 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00995}00995 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00996}\mbox{\hyperlink{geom__disk_8c_ad6191f8081a0778a7b4d5c1ec9445749}{00996}} \mbox{\hyperlink{geom__disk_8c_ad6191f8081a0778a7b4d5c1ec9445749}{disk\_media\_changed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00997}00997 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00998}00998         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l00999}00999         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01001}01001         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01002}01002         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01003}01003                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01004}01004                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01005}01005                         KASSERT(LIST\_NEXT(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, provider) == NULL,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01006}01006                             (\textcolor{stringliteral}{"{}geom \%p has more than one provider"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01007}01007                         \mbox{\hyperlink{geom_8h_a5f0e8b927a159f0129cd1bae6efe3c77}{g\_media\_changed}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, flag);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01008}01008                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01009}01009         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01010}01010 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01012}01012 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01013}\mbox{\hyperlink{geom__disk_8c_aaf9e2760cfe9a96796a252aee30cc4f1}{01013}} \mbox{\hyperlink{geom__disk_8c_aaf9e2760cfe9a96796a252aee30cc4f1}{disk\_media\_gone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01014}01014 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01015}01015         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01016}01016         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01017}01017 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01018}01018         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01019}01019         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01020}01020                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01021}01021                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01022}01022                         KASSERT(LIST\_NEXT(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, provider) == NULL,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01023}01023                             (\textcolor{stringliteral}{"{}geom \%p has more than one provider"{}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01024}01024                         \mbox{\hyperlink{geom_8h_af4b7408deae8a68a18b073444d5b4929}{g\_media\_gone}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, flag);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01025}01025                 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01026}01026         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01027}01027 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01028}01028 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01029}01029 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01030}\mbox{\hyperlink{geom__disk_8c_a0a36aed4bdf703f893d7f0ca6ce9f2ec}{01030}} \mbox{\hyperlink{geom__disk_8c_a0a36aed4bdf703f893d7f0ca6ce9f2ec}{disk\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdisk}{disk}} *dp, \textcolor{keywordtype}{int} flag)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01031}01031 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01032}01032 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01033}01033         \textcolor{keywordflow}{if} (dp-\/>\mbox{\hyperlink{structdisk_a7377edd9bb08266a1516db84e7ec800b}{d\_destroyed}} || dp-\/>\mbox{\hyperlink{structdisk_a7912aaad4254b4190e979431e68e4122}{d\_geom}} == NULL)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01034}01034                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01036}01036         \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom_8h_a196998b2923eb556355a617daaef1879}{g\_post\_event}}(\mbox{\hyperlink{geom__disk_8c_a802bd8282850a532974b5ea3be44178b}{g\_disk\_resize}}, dp, flag, NULL));}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01037}01037 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01038}01038 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01039}01039 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01040}\mbox{\hyperlink{geom__disk_8c_aeb0cf5771354d0da38a31fe932f0ed29}{01040}} \mbox{\hyperlink{geom__disk_8c_aeb0cf5771354d0da38a31fe932f0ed29}{g\_kern\_disks}}(\textcolor{keywordtype}{void} *p, \textcolor{keywordtype}{int} flag \_\_unused)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01041}01041 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01042}01042         \textcolor{keyword}{struct }sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01043}01043         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01044}01044         \textcolor{keywordtype}{char} *sp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01046}01046         \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}} = p;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01047}01047         sp = \textcolor{stringliteral}{"{}"{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01048}01048         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01049}01049         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{geom__disk_8c_ad49619bece69880921d49af8f216efa6}{g\_disk\_class}}.geom, geom) \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01050}01050                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s\%s"{}}, sp, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_af64450500f1fea18f639b191a5017107}{name}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01051}01051                 sp = \textcolor{stringliteral}{"{} "{}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01052}01052         \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01053}01053         sbuf\_finish(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01054}01054 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01056}01056 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01057}\mbox{\hyperlink{geom__disk_8c_a375d9534e1329179e58a61438cc2a090}{01057}} \mbox{\hyperlink{geom__disk_8c_a375d9534e1329179e58a61438cc2a090}{g\_disk\_sysctl\_flags}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01058}01058 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01059}01059         \textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *dp;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01060}01060         \textcolor{keyword}{struct }sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01061}01061         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01062}01062 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01063}01063         \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}} = sbuf\_new\_auto();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01064}01064         dp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdisk}{disk}} *)arg1;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01065}01065         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%b"{}}, dp-\/>\mbox{\hyperlink{structdisk_a047cc933120f77168c337ca109105f55}{d\_flags}},}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01066}01066                 \textcolor{stringliteral}{"{}\(\backslash\)20"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01067}01067                 \textcolor{stringliteral}{"{}\(\backslash\)2OPEN"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01068}01068                 \textcolor{stringliteral}{"{}\(\backslash\)3CANDELETE"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01069}01069                 \textcolor{stringliteral}{"{}\(\backslash\)4CANFLUSHCACHE"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01070}01070                 \textcolor{stringliteral}{"{}\(\backslash\)5UNMAPPEDBIO"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01071}01071                 \textcolor{stringliteral}{"{}\(\backslash\)6DIRECTCOMPLETION"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01072}01072                 \textcolor{stringliteral}{"{}\(\backslash\)10CANZONE"{}}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01073}01073                 \textcolor{stringliteral}{"{}\(\backslash\)11WRITEPROTECT"{}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01074}01074 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01075}01075         sbuf\_finish(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01076}01076         error = SYSCTL\_OUT(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, sbuf\_data(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}), sbuf\_len(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}) + 1);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01077}01077         sbuf\_delete(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01078}01078         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01079}01079 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01081}01081 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01082}\mbox{\hyperlink{geom__disk_8c_ac8e65188af85fcd123860fa40ab9e995}{01082}} \mbox{\hyperlink{geom__disk_8c_ac8e65188af85fcd123860fa40ab9e995}{sysctl\_disks}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01083}01083 \{}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01084}01084         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01085}01085         \textcolor{keyword}{struct }sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}};}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01086}01086 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01087}01087         \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}} = sbuf\_new\_auto();}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01088}01088         \mbox{\hyperlink{geom_8h_a098098146ac4f2ca5efa831ee5f248ae}{g\_waitfor\_event}}(\mbox{\hyperlink{geom__disk_8c_aeb0cf5771354d0da38a31fe932f0ed29}{g\_kern\_disks}}, \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, M\_WAITOK, NULL);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01089}01089         error = SYSCTL\_OUT(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, sbuf\_data(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}), sbuf\_len(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}) + 1);}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01090}01090         sbuf\_delete(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01091}01091         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01092}01092 \}}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01093}01093 }
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01094}\mbox{\hyperlink{geom__disk_8c_a9b7e9a6f8609318687ad6076213171e9}{01094}} \mbox{\hyperlink{geom__disk_8c_a9b7e9a6f8609318687ad6076213171e9}{SYSCTL\_PROC}}(\_kern, OID\_AUTO, disks,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01095}01095     CTLTYPE\_STRING | CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, 0,}
\DoxyCodeLine{\Hypertarget{geom__disk_8c_source_l01096}01096     \mbox{\hyperlink{geom__disk_8c_ac8e65188af85fcd123860fa40ab9e995}{sysctl\_disks}}, \textcolor{stringliteral}{"{}A"{}}, \textcolor{stringliteral}{"{}names of available disks"{}});}

\end{DoxyCode}
