\hypertarget{md__intel_8c_source}{}\doxysection{md\+\_\+intel.\+c}
\label{md__intel_8c_source}\index{geom/raid/md\_intel.c@{geom/raid/md\_intel.c}}
\mbox{\hyperlink{md__intel_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2000 -\/ 2008 Søren Schmidt <sos@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00006}00006 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00008}00008 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00009}00009 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00010}00010 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00011}00011 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00018}00018 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00019}00019 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00020}00020 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00021}00021 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00022}00022 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00023}00023 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00024}00024 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00025}00025 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00026}00026 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00027}00027 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00031}\mbox{\hyperlink{md__intel_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00031}} \mbox{\hyperlink{md__intel_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/kobj.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/limits.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/disk.h>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00047}00047 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{g__raid_8h}{geom/raid/g\_raid.h}}"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00048}00048 \textcolor{preprocessor}{\#include "{}g\_raid\_md\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00050}\mbox{\hyperlink{md__intel_8c_a8ca1e8b4d9cb81866d1536accfdfa9f2}{00050}} \textcolor{keyword}{static} \mbox{\hyperlink{md__intel_8c_a8ca1e8b4d9cb81866d1536accfdfa9f2}{MALLOC\_DEFINE}}(M\_MD\_INTEL, \textcolor{stringliteral}{"{}md\_intel\_data"{}}, \textcolor{stringliteral}{"{}GEOM\_RAID Intel metadata"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00052}\mbox{\hyperlink{structintel__raid__map}{00052}} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00053}\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{00053}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00054}\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{00054}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00055}\mbox{\hyperlink{structintel__raid__map_a5451456911abea635d9c81411ea8640e}{00055}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_a5451456911abea635d9c81411ea8640e}{stripe\_count}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00056}\mbox{\hyperlink{structintel__raid__map_ae130bfc14fe735079259238aaab3e119}{00056}}         uint16\_t        \mbox{\hyperlink{structintel__raid__map_ae130bfc14fe735079259238aaab3e119}{strip\_sectors}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00057}\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{00057}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00058}\mbox{\hyperlink{md__intel_8c_aa3da74fbfa115b47a51db3fbc5d83136}{00058}} \textcolor{preprocessor}{\#define INTEL\_S\_READY           0x00}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00059}\mbox{\hyperlink{md__intel_8c_aae75cc2c95bebee1bb9092bbba82dfba}{00059}} \textcolor{preprocessor}{\#define INTEL\_S\_UNINITIALIZED   0x01}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00060}\mbox{\hyperlink{md__intel_8c_a9e0e0fbd31a8b33d38c2b1d22bf9ad49}{00060}} \textcolor{preprocessor}{\#define INTEL\_S\_DEGRADED        0x02}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00061}\mbox{\hyperlink{md__intel_8c_a0097ee7011fc0bfd374ec995342a5808}{00061}} \textcolor{preprocessor}{\#define INTEL\_S\_FAILURE         0x03}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00063}\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{00063}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00064}\mbox{\hyperlink{md__intel_8c_ac4df06f718999bb87f51a911ce0fe8ef}{00064}} \textcolor{preprocessor}{\#define INTEL\_T\_RAID0           0x00}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00065}\mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{00065}} \textcolor{preprocessor}{\#define INTEL\_T\_RAID1           0x01}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00066}\mbox{\hyperlink{md__intel_8c_ad79ddcabf696e6e7cef2db9d39bdc82b}{00066}} \textcolor{preprocessor}{\#define INTEL\_T\_RAID5           0x05}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00068}\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{00068}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00069}\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{00069}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00070}\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{00070}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00071}\mbox{\hyperlink{structintel__raid__map_a37a18e32e55cfb4675829fc31b0d3e4e}{00071}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__map_a37a18e32e55cfb4675829fc31b0d3e4e}{ddf}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00072}\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{00072}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00073}\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{00073}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00074}\mbox{\hyperlink{structintel__raid__map_a59e9d909cd9a15152c5540763edea2a1}{00074}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_a59e9d909cd9a15152c5540763edea2a1}{stripe\_count\_hi}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00075}\mbox{\hyperlink{structintel__raid__map_ae9bdddabe0eb439eafe88c541d288ca7}{00075}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_ae9bdddabe0eb439eafe88c541d288ca7}{filler\_2}}[4];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00076}\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{00076}}         uint32\_t        \mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[1];    \textcolor{comment}{/* total\_disks entries. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00077}\mbox{\hyperlink{md__intel_8c_a03b6328012ec5504a085179c0c55e983}{00077}} \textcolor{preprocessor}{\#define INTEL\_DI\_IDX    0x00ffffff}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00078}\mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{00078}} \textcolor{preprocessor}{\#define INTEL\_DI\_RBLD   0x01000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00079}\mbox{\hyperlink{md__intel_8c_ab7071c3e8b1f035a3ef7e8c6388f71b9}{00079}} \} \mbox{\hyperlink{md__intel_8c_ab7071c3e8b1f035a3ef7e8c6388f71b9}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00081}\mbox{\hyperlink{structintel__raid__vol}{00081}} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00082}\mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{00082}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{name}}[16];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00083}\mbox{\hyperlink{structintel__raid__vol_acb65b8e395c29a045dc21adf9ae7cdf5}{00083}}         uint64\_t        total\_sectors \mbox{\hyperlink{structintel__raid__vol_acb65b8e395c29a045dc21adf9ae7cdf5}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00084}\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{00084}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00085}\mbox{\hyperlink{md__intel_8c_a5851f381c538f148a549265f499692c6}{00085}} \textcolor{preprocessor}{\#define INTEL\_ST\_BOOTABLE               0x00000001}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00086}\mbox{\hyperlink{md__intel_8c_a6f26a00f50267394ff2f7c62f3f40ff8}{00086}} \textcolor{preprocessor}{\#define INTEL\_ST\_BOOT\_DEVICE            0x00000002}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00087}\mbox{\hyperlink{md__intel_8c_aa9d6b96beb1f964dae3daac1293d1987}{00087}} \textcolor{preprocessor}{\#define INTEL\_ST\_READ\_COALESCING        0x00000004}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00088}\mbox{\hyperlink{md__intel_8c_ae77c23bb034f4cfa8b301eef9726943d}{00088}} \textcolor{preprocessor}{\#define INTEL\_ST\_WRITE\_COALESCING       0x00000008}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00089}\mbox{\hyperlink{md__intel_8c_a84d0d4cd43ce99eeaff4ab662d06ae3e}{00089}} \textcolor{preprocessor}{\#define INTEL\_ST\_LAST\_SHUTDOWN\_DIRTY    0x00000010}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00090}\mbox{\hyperlink{md__intel_8c_a773d3d1878155e3ef8308881fafb2f4d}{00090}} \textcolor{preprocessor}{\#define INTEL\_ST\_HIDDEN\_AT\_BOOT         0x00000020}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00091}\mbox{\hyperlink{md__intel_8c_a3a87ea772a128d3431c9e2d0894e1e2c}{00091}} \textcolor{preprocessor}{\#define INTEL\_ST\_CURRENTLY\_HIDDEN       0x00000040}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00092}\mbox{\hyperlink{md__intel_8c_a8eb8c2ac9022ddcbea5ae2faf1c9db29}{00092}} \textcolor{preprocessor}{\#define INTEL\_ST\_VERIFY\_AND\_FIX         0x00000080}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00093}\mbox{\hyperlink{md__intel_8c_a318bfe739267cde8340d39b4c61a8fe6}{00093}} \textcolor{preprocessor}{\#define INTEL\_ST\_MAP\_STATE\_UNINIT       0x00000100}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00094}\mbox{\hyperlink{md__intel_8c_a9cfdd61e555f0c02f4b70778776a2bd1}{00094}} \textcolor{preprocessor}{\#define INTEL\_ST\_NO\_AUTO\_RECOVERY       0x00000200}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00095}\mbox{\hyperlink{md__intel_8c_ac2969a192a713613975d3346b9c498fc}{00095}} \textcolor{preprocessor}{\#define INTEL\_ST\_CLONE\_N\_GO             0x00000400}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00096}\mbox{\hyperlink{md__intel_8c_a50c800af999cd92f37112d3f71a4e532}{00096}} \textcolor{preprocessor}{\#define INTEL\_ST\_CLONE\_MAN\_SYNC         0x00000800}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00097}\mbox{\hyperlink{md__intel_8c_a54a59a33b270fad894d3fc1da1bbe329}{00097}} \textcolor{preprocessor}{\#define INTEL\_ST\_CNG\_MASTER\_DISK\_NUM    0x00001000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00098}\mbox{\hyperlink{structintel__raid__vol_a87d26a062cef15aada87368c30d446f2}{00098}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_a87d26a062cef15aada87368c30d446f2}{reserved}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00099}\mbox{\hyperlink{structintel__raid__vol_a8151634f10f8b4d129d20bdaf46444ee}{00099}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a8151634f10f8b4d129d20bdaf46444ee}{migr\_priority}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00100}\mbox{\hyperlink{structintel__raid__vol_a097b56a3a3488a02e29a6e73e4b0d5d5}{00100}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a097b56a3a3488a02e29a6e73e4b0d5d5}{num\_sub\_vols}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00101}\mbox{\hyperlink{structintel__raid__vol_a8e2f258217cfc1983e9d1c54915873b3}{00101}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a8e2f258217cfc1983e9d1c54915873b3}{tid}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00102}\mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{00102}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{cng\_master\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00103}\mbox{\hyperlink{structintel__raid__vol_a21250e4b5e52e44b2044d1e3777fab47}{00103}}         uint16\_t        \mbox{\hyperlink{structintel__raid__vol_a21250e4b5e52e44b2044d1e3777fab47}{cache\_policy}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00104}\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{00104}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00105}\mbox{\hyperlink{md__intel_8c_a89bf82a4ee6d13c266f728292bcc29e4}{00105}} \textcolor{preprocessor}{\#define INTEL\_CNGST\_UPDATED             0}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00106}\mbox{\hyperlink{md__intel_8c_a6763a442a1140d7613a65fa3e1d9d880}{00106}} \textcolor{preprocessor}{\#define INTEL\_CNGST\_NEEDS\_UPDATE        1}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00107}\mbox{\hyperlink{md__intel_8c_a0c64803dc30fa13cae2a1617d67e5017}{00107}} \textcolor{preprocessor}{\#define INTEL\_CNGST\_MASTER\_MISSING      2}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00108}\mbox{\hyperlink{structintel__raid__vol_af38ae5980ae30b3a43aae0fd7a54e9b5}{00108}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_af38ae5980ae30b3a43aae0fd7a54e9b5}{cng\_sub\_state}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00109}\mbox{\hyperlink{structintel__raid__vol_a1e08300a08366b8da253c8043475594c}{00109}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_a1e08300a08366b8da253c8043475594c}{filler\_0}}[10];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00111}\mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{00111}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00112}\mbox{\hyperlink{structintel__raid__vol_abe5d9385dc892e51af84960868aeb172}{00112}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_abe5d9385dc892e51af84960868aeb172}{checkpoint\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00113}\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{00113}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00114}\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{00114}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00115}\mbox{\hyperlink{md__intel_8c_a6c3bd0942243ee7a3fe6e984682c23d0}{00115}} \textcolor{preprocessor}{\#define INTEL\_MT\_INIT           0}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00116}\mbox{\hyperlink{md__intel_8c_acf2f6b332ae8e850f983775f34b82588}{00116}} \textcolor{preprocessor}{\#define INTEL\_MT\_REBUILD        1}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00117}\mbox{\hyperlink{md__intel_8c_ad61ff49ce32f04b0f816bd7bd2c9028e}{00117}} \textcolor{preprocessor}{\#define INTEL\_MT\_VERIFY         2}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00118}\mbox{\hyperlink{md__intel_8c_aedba10cd8d3e55eeecb5ede63879d662}{00118}} \textcolor{preprocessor}{\#define INTEL\_MT\_GEN\_MIGR       3}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00119}\mbox{\hyperlink{md__intel_8c_a6f3950bb00aca407f10527e56be675ac}{00119}} \textcolor{preprocessor}{\#define INTEL\_MT\_STATE\_CHANGE   4}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00120}\mbox{\hyperlink{md__intel_8c_aaf4e52e15df77e945be9a74f3504aad0}{00120}} \textcolor{preprocessor}{\#define INTEL\_MT\_REPAIR         5}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00121}\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{00121}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00122}\mbox{\hyperlink{structintel__raid__vol_a51ac61cf38994f1e4191b3647c54dd9b}{00122}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__vol_a51ac61cf38994f1e4191b3647c54dd9b}{fs\_state}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00123}\mbox{\hyperlink{structintel__raid__vol_adf28a4f90fd115ad484f4c09259c6d68}{00123}}         uint16\_t        \mbox{\hyperlink{structintel__raid__vol_adf28a4f90fd115ad484f4c09259c6d68}{verify\_errors}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00124}\mbox{\hyperlink{structintel__raid__vol_aeacd910f63cb0bceb6834e3165847833}{00124}}         uint16\_t        \mbox{\hyperlink{structintel__raid__vol_aeacd910f63cb0bceb6834e3165847833}{bad\_blocks}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00125}\mbox{\hyperlink{structintel__raid__vol_a9dfcd3503911200af2248339a75b16cf}{00125}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_a9dfcd3503911200af2248339a75b16cf}{curr\_migr\_unit\_hi}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00126}\mbox{\hyperlink{structintel__raid__vol_a3eef2d7984bf6be0a8be279042b71e8d}{00126}}         uint32\_t        \mbox{\hyperlink{structintel__raid__vol_a3eef2d7984bf6be0a8be279042b71e8d}{filler\_1}}[3];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00127}\mbox{\hyperlink{structintel__raid__vol_a96985368493ff3f5dc2b707a0ce91744}{00127}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} \mbox{\hyperlink{structintel__raid__vol_a96985368493ff3f5dc2b707a0ce91744}{map}}[1];  \textcolor{comment}{/* 2 entries if migr\_state != 0. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00128}00128 \} \mbox{\hyperlink{md__intel_8c_ab7071c3e8b1f035a3ef7e8c6388f71b9}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00130}\mbox{\hyperlink{structintel__raid__disk}{00130}} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00131}\mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{00131}} \textcolor{preprocessor}{\#define INTEL\_SERIAL\_LEN        16}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00132}\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{00132}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}[\mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00133}\mbox{\hyperlink{structintel__raid__disk_a25a41abc0ab60023b36ab470ecfef0ed}{00133}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_a25a41abc0ab60023b36ab470ecfef0ed}{sectors}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00134}\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{00134}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00135}\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{00135}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00136}\mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{00136}} \textcolor{preprocessor}{\#define INTEL\_F\_SPARE           0x01}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00137}\mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{00137}} \textcolor{preprocessor}{\#define INTEL\_F\_ASSIGNED        0x02}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00138}\mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{00138}} \textcolor{preprocessor}{\#define INTEL\_F\_FAILED          0x04}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00139}\mbox{\hyperlink{md__intel_8c_a50621783f4f433678bb190399455d50c}{00139}} \textcolor{preprocessor}{\#define INTEL\_F\_ONLINE          0x08}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00140}\mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{00140}} \textcolor{preprocessor}{\#define INTEL\_F\_DISABLED        0x80}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00141}\mbox{\hyperlink{structintel__raid__disk_afa26ee94abf9c28ca1cce0b5c102a30f}{00141}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_afa26ee94abf9c28ca1cce0b5c102a30f}{owner\_cfg\_num}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00142}\mbox{\hyperlink{structintel__raid__disk_a9d460a5088142d9edd91cc93088798d8}{00142}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_a9d460a5088142d9edd91cc93088798d8}{sectors\_hi}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00143}\mbox{\hyperlink{structintel__raid__disk_a768b61f1ae4031fdf08b8e066462e1f6}{00143}}         uint32\_t        \mbox{\hyperlink{structintel__raid__disk_a768b61f1ae4031fdf08b8e066462e1f6}{filler}}[3];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00144}00144 \} \mbox{\hyperlink{md__intel_8c_ab7071c3e8b1f035a3ef7e8c6388f71b9}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00146}\mbox{\hyperlink{structintel__raid__conf}{00146}} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00147}\mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{00147}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{intel\_id}}[24];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00148}\mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{00148}} \textcolor{preprocessor}{\#define INTEL\_MAGIC             "{}Intel Raid ISM Cfg Sig. "{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00150}\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{00150}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}}[6];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00151}\mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{00151}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1000      "{}1.0.00"{}}        \textcolor{comment}{/* RAID0 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00152}\mbox{\hyperlink{md__intel_8c_aece1525dc52f553c9cf6ea2a78c353cb}{00152}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1100      "{}1.1.00"{}}        \textcolor{comment}{/* RAID1 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00153}\mbox{\hyperlink{md__intel_8c_ab571cf207a4fa115f931f6e7737a4d64}{00153}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1200      "{}1.2.00"{}}        \textcolor{comment}{/* Many volumes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00154}\mbox{\hyperlink{md__intel_8c_aa28c3f49476c25464eef3aa8795370bc}{00154}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1201      "{}1.2.01"{}}        \textcolor{comment}{/* 3 or 4 disks */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00155}\mbox{\hyperlink{md__intel_8c_a50fcc74af8d6cc15e98f981247562974}{00155}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1202      "{}1.2.02"{}}        \textcolor{comment}{/* RAID5 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00156}\mbox{\hyperlink{md__intel_8c_a945ec2e3b04a64eb95d0cc8a83a9e432}{00156}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1204      "{}1.2.04"{}}        \textcolor{comment}{/* 5 or 6 disks */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00157}\mbox{\hyperlink{md__intel_8c_ae1d0beafe81a641b3352857d03143dde}{00157}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1206      "{}1.2.06"{}}        \textcolor{comment}{/* CNG */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00158}\mbox{\hyperlink{md__intel_8c_a0934f121286aef207d0ea7e5c8fdaf6d}{00158}} \textcolor{preprocessor}{\#define INTEL\_VERSION\_1300      "{}1.3.00"{}}        \textcolor{comment}{/* Attributes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00160}\mbox{\hyperlink{structintel__raid__conf_a37c7223cdc2a9a505a108ca98f7c410b}{00160}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_a37c7223cdc2a9a505a108ca98f7c410b}{dummy\_0}}[2];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00161}\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{00161}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00162}\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{00162}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00163}\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{00163}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00164}\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{00164}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00165}\mbox{\hyperlink{structintel__raid__conf_abde60f68cd7a2b8817dbc79609dd72f9}{00165}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_abde60f68cd7a2b8817dbc79609dd72f9}{error\_log\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00166}\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{00166}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00167}\mbox{\hyperlink{md__intel_8c_a793f95843c5b3fa47361b3d5c4924267}{00167}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAID0        0x00000001}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00168}\mbox{\hyperlink{md__intel_8c_aa931e3ea517f26febe21903ed947e246}{00168}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAID1        0x00000002}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00169}\mbox{\hyperlink{md__intel_8c_a412d7782b319b432acfdc67a43212804}{00169}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAID10       0x00000004}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00170}\mbox{\hyperlink{md__intel_8c_ab7ee1db42c0ae1699f5cd7a9bea39241}{00170}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAID1E       0x00000008}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00171}\mbox{\hyperlink{md__intel_8c_a42c69c1879ad2ea5fe45674f3cbb7a53}{00171}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAID5        0x00000010}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00172}\mbox{\hyperlink{md__intel_8c_a1b48d3bbfc8893e7931f3b8236800af2}{00172}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_RAIDCNG      0x00000020}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00173}\mbox{\hyperlink{md__intel_8c_abb4bd527c6e2977e724adb9b2e40c682}{00173}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_EXT\_STRIP    0x00000040}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00174}\mbox{\hyperlink{md__intel_8c_a58403e998e0ca4b86502b8b46ad15679}{00174}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_NVM\_CACHE    0x02000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00175}\mbox{\hyperlink{md__intel_8c_ac946395e8cb77d6cb5833ddb8cd23547}{00175}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_2TB\_DISK     0x04000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00176}\mbox{\hyperlink{md__intel_8c_ae02a40af67c69049e76cdb661a8705d4}{00176}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_BBM          0x08000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00177}\mbox{\hyperlink{md__intel_8c_acf7f17703cae57a3a62a2dd15accf4b0}{00177}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_NVM\_CACHE2   0x10000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00178}\mbox{\hyperlink{md__intel_8c_a2062e8ed0a3a26647030e6ae433d63b4}{00178}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_2TB          0x20000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00179}\mbox{\hyperlink{md__intel_8c_a315fbc962e6b6934472641aa50c1aae6}{00179}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_PM           0x40000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00180}\mbox{\hyperlink{md__intel_8c_a7cc833bdb461059dfc9609e1412f18f8}{00180}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_CHECKSUM     0x80000000}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00182}\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{00182}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00183}\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{00183}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00184}\mbox{\hyperlink{structintel__raid__conf_ab77ca038d26d5c8b4a7eac837868f3d6}{00184}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_ab77ca038d26d5c8b4a7eac837868f3d6}{error\_log\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00185}\mbox{\hyperlink{structintel__raid__conf_a50b570c3d5135290aca5969b290b6019}{00185}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structintel__raid__conf_a50b570c3d5135290aca5969b290b6019}{dummy\_2}}[1];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00186}\mbox{\hyperlink{structintel__raid__conf_a147df7115bbc074bcb1598d0fe795115}{00186}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a147df7115bbc074bcb1598d0fe795115}{cache\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00187}\mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{00187}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{orig\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00188}\mbox{\hyperlink{structintel__raid__conf_a5a8ca0555a4b3b844bd167af56a4e249}{00188}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a5a8ca0555a4b3b844bd167af56a4e249}{pwr\_cycle\_count}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00189}\mbox{\hyperlink{structintel__raid__conf_a48ee1fcdefdbaf57baae6f1c9c273f24}{00189}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_a48ee1fcdefdbaf57baae6f1c9c273f24}{bbm\_log\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00190}\mbox{\hyperlink{structintel__raid__conf_af017e78702292345c0bc1a923c7aa623}{00190}}         uint32\_t        \mbox{\hyperlink{structintel__raid__conf_af017e78702292345c0bc1a923c7aa623}{filler\_0}}[35];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00191}\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{00191}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}}   \mbox{\hyperlink{structdisk}{disk}}[1];    \textcolor{comment}{/* total\_disks entries. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00192}00192         \textcolor{comment}{/* Here goes total\_volumes of struct intel\_raid\_vol. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00193}00193 \} \mbox{\hyperlink{md__intel_8c_ab7071c3e8b1f035a3ef7e8c6388f71b9}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00195}\mbox{\hyperlink{md__intel_8c_acdb1c2caf09313d5eb7a64f37efa36d5}{00195}} \textcolor{preprocessor}{\#define INTEL\_ATTR\_SUPPORTED    ( INTEL\_ATTR\_RAID0 | INTEL\_ATTR\_RAID1 | \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00196}00196 \textcolor{preprocessor}{    INTEL\_ATTR\_RAID10 | INTEL\_ATTR\_RAID1E | INTEL\_ATTR\_RAID5 |          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00197}00197 \textcolor{preprocessor}{    INTEL\_ATTR\_RAIDCNG | INTEL\_ATTR\_EXT\_STRIP | INTEL\_ATTR\_2TB\_DISK |   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00198}00198 \textcolor{preprocessor}{    INTEL\_ATTR\_2TB | INTEL\_ATTR\_PM | INTEL\_ATTR\_CHECKSUM )}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00200}\mbox{\hyperlink{md__intel_8c_ac5dfd242ca795b9520139f7c78ba9ba3}{00200}} \textcolor{preprocessor}{\#define INTEL\_MAX\_MD\_SIZE(ndisks)                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00201}00201 \textcolor{preprocessor}{    (sizeof(struct intel\_raid\_conf) +                           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00202}00202 \textcolor{preprocessor}{     sizeof(struct intel\_raid\_disk) * (ndisks -\/ 1) +            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00203}00203 \textcolor{preprocessor}{     sizeof(struct intel\_raid\_vol) * 2 +                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00204}00204 \textcolor{preprocessor}{     sizeof(struct intel\_raid\_map) * 2 +                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00205}00205 \textcolor{preprocessor}{     sizeof(uint32\_t) * (ndisks -\/ 1) * 4)}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00207}\mbox{\hyperlink{structg__raid__md__intel__perdisk}{00207}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00208}\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{00208}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}}   *\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00209}\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{00209}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00210}\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{00210}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}}    \mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00211}00211 \};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00213}\mbox{\hyperlink{structg__raid__md__intel__pervolume}{00213}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00214}\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{00214}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00215}\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{00215}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00216}\mbox{\hyperlink{structg__raid__md__intel__pervolume_af3e25e5e60ce4340c6b6efcb88db9ea9}{00216}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__pervolume_af3e25e5e60ce4340c6b6efcb88db9ea9}{pv\_cng\_man\_sync}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00217}\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{00217}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00218}00218 \};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00220}\mbox{\hyperlink{structg__raid__md__intel__object}{00220}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00221}\mbox{\hyperlink{structg__raid__md__intel__object_ad1411750327e1af37d4af7c03af2078b}{00221}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}}  \mbox{\hyperlink{structg__raid__md__intel__object_ad1411750327e1af37d4af7c03af2078b}{mdio\_base}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00222}\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{00222}}         uint32\_t                 \mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00223}\mbox{\hyperlink{structg__raid__md__intel__object_abe647c1b8bf33b2d59ddbbf72407317e}{00223}}         uint32\_t                 \mbox{\hyperlink{structg__raid__md__intel__object_abe647c1b8bf33b2d59ddbbf72407317e}{mdio\_orig\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00224}\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{00224}}         uint32\_t                 \mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00225}\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{00225}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}}   *\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00226}\mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{00226}}         \textcolor{keyword}{struct }callout           \mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{mdio\_start\_co}};    \textcolor{comment}{/* STARTING state timer. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00227}\mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{00227}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{mdio\_disks\_present}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00228}\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{00228}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00229}\mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{00229}}         \textcolor{keywordtype}{int}                      \mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{mdio\_incomplete}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00230}\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{00230}}         \textcolor{keyword}{struct }root\_hold\_token  *\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}}; \textcolor{comment}{/* Root mount delay token. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00231}00231 \};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00233}\mbox{\hyperlink{md__intel_8c_a4c700d919c8b683239111e5efb866a6b}{00233}} \textcolor{keyword}{static} g\_raid\_md\_create\_t \mbox{\hyperlink{md__intel_8c_a4c700d919c8b683239111e5efb866a6b}{g\_raid\_md\_create\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00234}\mbox{\hyperlink{md__intel_8c_af48e82d38c970129850e45ad932814b4}{00234}} \textcolor{keyword}{static} g\_raid\_md\_taste\_t \mbox{\hyperlink{md__intel_8c_af48e82d38c970129850e45ad932814b4}{g\_raid\_md\_taste\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00235}\mbox{\hyperlink{md__intel_8c_a72c0d1fb75493b481fb38f7c4003f709}{00235}} \textcolor{keyword}{static} g\_raid\_md\_event\_t \mbox{\hyperlink{md__intel_8c_a72c0d1fb75493b481fb38f7c4003f709}{g\_raid\_md\_event\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00236}\mbox{\hyperlink{md__intel_8c_a8cfeace25c57d55d524b3bace0921ce5}{00236}} \textcolor{keyword}{static} g\_raid\_md\_ctl\_t \mbox{\hyperlink{md__intel_8c_a8cfeace25c57d55d524b3bace0921ce5}{g\_raid\_md\_ctl\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00237}\mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{00237}} \textcolor{keyword}{static} g\_raid\_md\_write\_t \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00238}\mbox{\hyperlink{md__intel_8c_a8405606d7917dfc05fda829e97c8d3d2}{00238}} \textcolor{keyword}{static} g\_raid\_md\_fail\_disk\_t \mbox{\hyperlink{md__intel_8c_a8405606d7917dfc05fda829e97c8d3d2}{g\_raid\_md\_fail\_disk\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00239}\mbox{\hyperlink{md__intel_8c_a9439042f80feff62238e1df5ec3a6f0f}{00239}} \textcolor{keyword}{static} g\_raid\_md\_free\_disk\_t \mbox{\hyperlink{md__intel_8c_a9439042f80feff62238e1df5ec3a6f0f}{g\_raid\_md\_free\_disk\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00240}\mbox{\hyperlink{md__intel_8c_a06b79be50354a098c8a7fbc0ec3d5260}{00240}} \textcolor{keyword}{static} g\_raid\_md\_free\_volume\_t \mbox{\hyperlink{md__intel_8c_a06b79be50354a098c8a7fbc0ec3d5260}{g\_raid\_md\_free\_volume\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00241}\mbox{\hyperlink{md__intel_8c_a063fd2d74cfc2d5782b3777b93a2a1ca}{00241}} \textcolor{keyword}{static} g\_raid\_md\_free\_t \mbox{\hyperlink{md__intel_8c_a063fd2d74cfc2d5782b3777b93a2a1ca}{g\_raid\_md\_free\_intel}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00243}\mbox{\hyperlink{md__intel_8c_a3d9989bcbdd2123408dabccab347bc85}{00243}} \textcolor{keyword}{static} kobj\_method\_t \mbox{\hyperlink{md__intel_8c_a3d9989bcbdd2123408dabccab347bc85}{g\_raid\_md\_intel\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00244}00244         KOBJMETHOD(g\_raid\_md\_create,    \mbox{\hyperlink{md__intel_8c_a4c700d919c8b683239111e5efb866a6b}{g\_raid\_md\_create\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00245}00245         KOBJMETHOD(g\_raid\_md\_taste,     \mbox{\hyperlink{md__intel_8c_af48e82d38c970129850e45ad932814b4}{g\_raid\_md\_taste\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00246}00246         KOBJMETHOD(g\_raid\_md\_event,     \mbox{\hyperlink{md__intel_8c_a72c0d1fb75493b481fb38f7c4003f709}{g\_raid\_md\_event\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00247}00247         KOBJMETHOD(g\_raid\_md\_ctl,       \mbox{\hyperlink{md__intel_8c_a8cfeace25c57d55d524b3bace0921ce5}{g\_raid\_md\_ctl\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00248}00248         KOBJMETHOD(g\_raid\_md\_write,     \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00249}00249         KOBJMETHOD(g\_raid\_md\_fail\_disk, \mbox{\hyperlink{md__intel_8c_a8405606d7917dfc05fda829e97c8d3d2}{g\_raid\_md\_fail\_disk\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00250}00250         KOBJMETHOD(g\_raid\_md\_free\_disk, \mbox{\hyperlink{md__intel_8c_a9439042f80feff62238e1df5ec3a6f0f}{g\_raid\_md\_free\_disk\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00251}00251         KOBJMETHOD(g\_raid\_md\_free\_volume,       \mbox{\hyperlink{md__intel_8c_a06b79be50354a098c8a7fbc0ec3d5260}{g\_raid\_md\_free\_volume\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00252}00252         KOBJMETHOD(g\_raid\_md\_free,      \mbox{\hyperlink{md__intel_8c_a063fd2d74cfc2d5782b3777b93a2a1ca}{g\_raid\_md\_free\_intel}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00253}00253         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00254}00254 \};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00256}\mbox{\hyperlink{md__intel_8c_abaa5e99e30312fc575b7cd10685dd722}{00256}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__class}{g\_raid\_md\_class}} \mbox{\hyperlink{md__intel_8c_abaa5e99e30312fc575b7cd10685dd722}{g\_raid\_md\_intel\_class}} = \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00257}00257         \textcolor{stringliteral}{"{}Intel"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00258}00258         \mbox{\hyperlink{md__intel_8c_a3d9989bcbdd2123408dabccab347bc85}{g\_raid\_md\_intel\_methods}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00259}00259         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}}),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00260}00260         .mdc\_enable = 1,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00261}00261         .mdc\_priority = 100}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00262}00262 \};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00264}00264 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00265}\mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{00265}} \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol, \textcolor{keywordtype}{int} i)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00266}00266 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00267}00267         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00269}00269         \textcolor{keywordflow}{if} (i > (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} ? 1 : 0))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00270}00270                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00271}00271         mmap = \&mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a96985368493ff3f5dc2b707a0ce91744}{map}}[0];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00272}00272         \textcolor{keywordflow}{for} (; i > 0; i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00273}00273                 mmap = (\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00274}00274                     \&mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00275}00275         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00276}00276         \textcolor{keywordflow}{return} ((\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *)mmap);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00277}00277 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00279}00279 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00280}\mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{00280}} \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta, \textcolor{keywordtype}{int} i)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00281}00281 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00282}00282         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00283}00283         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00285}00285         \textcolor{keywordflow}{if} (i > 1)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00286}00286                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00287}00287         mvol = (\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *)\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00288}00288         for (; i > 0; i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00289}00289                 mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} ? 1 : 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00290}00290                 mvol = (\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00291}00291                     \&mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00292}00292         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00293}00293         \textcolor{keywordflow}{return} (mvol);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00294}00294 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00296}00296 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00297}\mbox{\hyperlink{md__intel_8c_ab9a6536d81b56167b67f8f7eef7e4f28}{00297}} \mbox{\hyperlink{md__intel_8c_ab9a6536d81b56167b67f8f7eef7e4f28}{intel\_get\_map\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00298}00298 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00299}00299         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = (off\_t)mmap-\/>\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}} << 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00301}00301         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += mmap-\/>\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00302}00302         return (\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00303}00303 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00305}00305 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00306}\mbox{\hyperlink{md__intel_8c_aa8359cee88f0a33bde5c7e8b22389df9}{00306}} \mbox{\hyperlink{md__intel_8c_aa8359cee88f0a33bde5c7e8b22389df9}{intel\_set\_map\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap, off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00307}00307 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00309}00309         mmap-\/>\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}} = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} \& 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00310}00310         mmap-\/>\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}} = \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} >> 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00311}00311 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00313}00313 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00314}\mbox{\hyperlink{md__intel_8c_ad8eb07ea0f42b0dee10c372b1037eb5d}{00314}} \mbox{\hyperlink{md__intel_8c_ad8eb07ea0f42b0dee10c372b1037eb5d}{intel\_get\_map\_disk\_sectors}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00315}00315 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00316}00316         off\_t disk\_sectors = (off\_t)mmap-\/>\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}} << 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00317}00317 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00318}00318         disk\_sectors += mmap-\/>\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00319}00319         return (disk\_sectors);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00320}00320 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00322}00322 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00323}\mbox{\hyperlink{md__intel_8c_a682069beff33188d39e2852c2d4aca14}{00323}} \mbox{\hyperlink{md__intel_8c_a682069beff33188d39e2852c2d4aca14}{intel\_set\_map\_disk\_sectors}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap, off\_t disk\_sectors)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00324}00324 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00326}00326         mmap-\/>\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}} = disk\_sectors \& 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00327}00327         mmap-\/>\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}} = disk\_sectors >> 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00328}00328 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00330}00330 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00331}\mbox{\hyperlink{md__intel_8c_a47fcb87e6705a86b786c58eee030c91f}{00331}} \mbox{\hyperlink{md__intel_8c_a47fcb87e6705a86b786c58eee030c91f}{intel\_set\_map\_stripe\_count}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap, off\_t stripe\_count)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00332}00332 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00334}00334         mmap-\/>\mbox{\hyperlink{structintel__raid__map_a5451456911abea635d9c81411ea8640e}{stripe\_count}} = stripe\_count \& 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00335}00335         mmap-\/>\mbox{\hyperlink{structintel__raid__map_a59e9d909cd9a15152c5540763edea2a1}{stripe\_count\_hi}} = stripe\_count >> 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00336}00336 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00338}00338 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00339}\mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{00339}} \mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{intel\_get\_disk\_sectors}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00340}00340 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00341}00341         off\_t sectors = (off\_t)\mbox{\hyperlink{structdisk}{disk}}-\/>sectors\_hi << 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00343}00343         sectors += \mbox{\hyperlink{structdisk}{disk}}-\/>sectors;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00344}00344         return (sectors);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00345}00345 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00347}00347 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00348}\mbox{\hyperlink{md__intel_8c_a94db600860339e778f98cd6581bbefcd}{00348}} \mbox{\hyperlink{md__intel_8c_a94db600860339e778f98cd6581bbefcd}{intel\_set\_disk\_sectors}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, off\_t sectors)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00349}00349 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00351}00351         \mbox{\hyperlink{structdisk}{disk}}-\/>sectors = sectors \& 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00352}00352         \mbox{\hyperlink{structdisk}{disk}}-\/>sectors\_hi = sectors >> 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00353}00353 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00355}00355 \textcolor{keyword}{static} off\_t}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00356}\mbox{\hyperlink{md__intel_8c_a99827f71c574a2333c927dcb44cf0b37}{00356}} \mbox{\hyperlink{md__intel_8c_a99827f71c574a2333c927dcb44cf0b37}{intel\_get\_vol\_curr\_migr\_unit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00357}00357 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00358}00358         off\_t \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}} = (off\_t)\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>curr\_migr\_unit\_hi << 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00360}00360         \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}} += \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>curr\_migr\_unit;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00361}00361         return (\mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00362}00362 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00364}00364 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00365}\mbox{\hyperlink{md__intel_8c_ae9323565d4b39802cedf1f8efb24369c}{00365}} \mbox{\hyperlink{md__intel_8c_ae9323565d4b39802cedf1f8efb24369c}{intel\_set\_vol\_curr\_migr\_unit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, off\_t \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00366}00366 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00368}00368         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>curr\_migr\_unit = \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}} \& 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00369}00369         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>curr\_migr\_unit\_hi = \mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}} >> 32;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00370}00370 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00372}00372 \textcolor{keyword}{static} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00373}\mbox{\hyperlink{md__intel_8c_ae4c13b0cd3a195a405f9f067c502e89f}{00373}} \mbox{\hyperlink{md__intel_8c_ae4c13b0cd3a195a405f9f067c502e89f}{intel\_status2str}}(\textcolor{keywordtype}{int} status)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00374}00374 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00376}00376         \textcolor{keywordflow}{switch} (status) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00377}00377         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_aa3da74fbfa115b47a51db3fbc5d83136}{INTEL\_S\_READY}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00378}00378                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}READY"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00379}00379         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_aae75cc2c95bebee1bb9092bbba82dfba}{INTEL\_S\_UNINITIALIZED}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00380}00380                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UNINITIALIZED"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00381}00381         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a9e0e0fbd31a8b33d38c2b1d22bf9ad49}{INTEL\_S\_DEGRADED}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00382}00382                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}DEGRADED"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00383}00383         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a0097ee7011fc0bfd374ec995342a5808}{INTEL\_S\_FAILURE}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00384}00384                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}FAILURE"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00385}00385         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00386}00386                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00387}00387         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00388}00388 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00390}00390 \textcolor{keyword}{static} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00391}\mbox{\hyperlink{md__intel_8c_a4ba9a67fd401d0b21881f4a0cc47b01b}{00391}} \mbox{\hyperlink{md__intel_8c_a4ba9a67fd401d0b21881f4a0cc47b01b}{intel\_type2str}}(\textcolor{keywordtype}{int} \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00392}00392 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00394}00394         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00395}00395         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_ac4df06f718999bb87f51a911ce0fe8ef}{INTEL\_T\_RAID0}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00396}00396                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}RAID0"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00397}00397         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{INTEL\_T\_RAID1}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00398}00398                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}RAID1"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00399}00399         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_ad79ddcabf696e6e7cef2db9d39bdc82b}{INTEL\_T\_RAID5}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00400}00400                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}RAID5"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00401}00401         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00402}00402                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00403}00403         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00404}00404 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00406}00406 \textcolor{keyword}{static} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00407}\mbox{\hyperlink{md__intel_8c_a035708df815dc317a3ee43a2b2a4a245}{00407}} \mbox{\hyperlink{md__intel_8c_a035708df815dc317a3ee43a2b2a4a245}{intel\_cngst2str}}(\textcolor{keywordtype}{int} \mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00408}00408 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00410}00410         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00411}00411         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a89bf82a4ee6d13c266f728292bcc29e4}{INTEL\_CNGST\_UPDATED}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00412}00412                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UPDATED"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00413}00413         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a6763a442a1140d7613a65fa3e1d9d880}{INTEL\_CNGST\_NEEDS\_UPDATE}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00414}00414                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NEEDS\_UPDATE"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00415}00415         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a0c64803dc30fa13cae2a1617d67e5017}{INTEL\_CNGST\_MASTER\_MISSING}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00416}00416                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}MASTER\_MISSING"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00417}00417         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00418}00418                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00419}00419         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00420}00420 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00422}00422 \textcolor{keyword}{static} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00423}\mbox{\hyperlink{md__intel_8c_a71314476f382eef03c76fe04913389b8}{00423}} \mbox{\hyperlink{md__intel_8c_a71314476f382eef03c76fe04913389b8}{intel\_mt2str}}(\textcolor{keywordtype}{int} \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00424}00424 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00426}00426         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00427}00427         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a6c3bd0942243ee7a3fe6e984682c23d0}{INTEL\_MT\_INIT}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00428}00428                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}INIT"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00429}00429         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_acf2f6b332ae8e850f983775f34b82588}{INTEL\_MT\_REBUILD}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00430}00430                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}REBUILD"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00431}00431         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_ad61ff49ce32f04b0f816bd7bd2c9028e}{INTEL\_MT\_VERIFY}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00432}00432                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}VERIFY"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00433}00433         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_aedba10cd8d3e55eeecb5ede63879d662}{INTEL\_MT\_GEN\_MIGR}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00434}00434                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}GEN\_MIGR"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00435}00435         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_a6f3950bb00aca407f10527e56be675ac}{INTEL\_MT\_STATE\_CHANGE}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00436}00436                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}STATE\_CHANGE"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00437}00437         \textcolor{keywordflow}{case} \mbox{\hyperlink{md__intel_8c_aaf4e52e15df77e945be9a74f3504aad0}{INTEL\_MT\_REPAIR}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00438}00438                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}REPAIR"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00439}00439         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00440}00440                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}UNKNOWN"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00441}00441         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00442}00442 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00444}00444 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00445}\mbox{\hyperlink{md__intel_8c_a6b76d55ca3088561dc852ac3393b19a5}{00445}} \mbox{\hyperlink{md__intel_8c_a6b76d55ca3088561dc852ac3393b19a5}{g\_raid\_md\_intel\_print}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00446}00446 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00447}00447         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00448}00448         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00449}00449         \textcolor{keywordtype}{int} i, j, k;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00450}00450 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00451}00451         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_a60062ce0bb852760514459b7a1f3d32e}{g\_raid\_debug}} < 1)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00452}00452                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00454}00454         printf(\textcolor{stringliteral}{"{}********* ATA Intel MatrixRAID Metadata *********\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00455}00455         printf(\textcolor{stringliteral}{"{}intel\_id            <\%.24s>\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{intel\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00456}00456         printf(\textcolor{stringliteral}{"{}version             <\%.6s>\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00457}00457         printf(\textcolor{stringliteral}{"{}checksum            0x\%08x\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00458}00458         printf(\textcolor{stringliteral}{"{}config\_size         0x\%08x\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00459}00459         printf(\textcolor{stringliteral}{"{}config\_id           0x\%08x\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00460}00460         printf(\textcolor{stringliteral}{"{}generation          0x\%08x\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00461}00461         printf(\textcolor{stringliteral}{"{}error\_log\_size      \%d\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_abde60f68cd7a2b8817dbc79609dd72f9}{error\_log\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00462}00462         printf(\textcolor{stringliteral}{"{}attributes          0x\%b\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00463}00463                 \textcolor{stringliteral}{"{}\(\backslash\)020"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00464}00464                 \textcolor{stringliteral}{"{}\(\backslash\)001RAID0"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00465}00465                 \textcolor{stringliteral}{"{}\(\backslash\)002RAID1"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00466}00466                 \textcolor{stringliteral}{"{}\(\backslash\)003RAID10"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00467}00467                 \textcolor{stringliteral}{"{}\(\backslash\)004RAID1E"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00468}00468                 \textcolor{stringliteral}{"{}\(\backslash\)005RAID15"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00469}00469                 \textcolor{stringliteral}{"{}\(\backslash\)006RAIDCNG"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00470}00470                 \textcolor{stringliteral}{"{}\(\backslash\)007EXT\_STRIP"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00471}00471                 \textcolor{stringliteral}{"{}\(\backslash\)032NVM\_CACHE"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00472}00472                 \textcolor{stringliteral}{"{}\(\backslash\)0332TB\_DISK"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00473}00473                 \textcolor{stringliteral}{"{}\(\backslash\)034BBM"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00474}00474                 \textcolor{stringliteral}{"{}\(\backslash\)035NVM\_CACHE"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00475}00475                 \textcolor{stringliteral}{"{}\(\backslash\)0362TB"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00476}00476                 \textcolor{stringliteral}{"{}\(\backslash\)037PM"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00477}00477                 \textcolor{stringliteral}{"{}\(\backslash\)040CHECKSUM"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00478}00478         printf(\textcolor{stringliteral}{"{}total\_disks         \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00479}00479         printf(\textcolor{stringliteral}{"{}total\_volumes       \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00480}00480         printf(\textcolor{stringliteral}{"{}error\_log\_pos       \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_ab77ca038d26d5c8b4a7eac837868f3d6}{error\_log\_pos}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00481}00481         printf(\textcolor{stringliteral}{"{}cache\_size          \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a147df7115bbc074bcb1598d0fe795115}{cache\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00482}00482         printf(\textcolor{stringliteral}{"{}orig\_config\_id      0x\%08x\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{orig\_config\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00483}00483         printf(\textcolor{stringliteral}{"{}pwr\_cycle\_count     \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a5a8ca0555a4b3b844bd167af56a4e249}{pwr\_cycle\_count}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00484}00484         printf(\textcolor{stringliteral}{"{}bbm\_log\_size        \%u\(\backslash\)n"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a48ee1fcdefdbaf57baae6f1c9c273f24}{bbm\_log\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00485}00485         printf(\textcolor{stringliteral}{"{}Flags: S -\/ Spare, A -\/ Assigned, F -\/ Failed, O -\/ Online, D -\/ Disabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00486}00486         printf(\textcolor{stringliteral}{"{}DISK\#   serial disk\_sectors disk\_sectors\_hi disk\_id flags owner\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00487}00487         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}}; i++ ) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00488}00488                 printf(\textcolor{stringliteral}{"{}    \%d   <\%.16s> \%u \%u 0x\%08x 0x\%b \%08x\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00489}00489                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_a25a41abc0ab60023b36ab470ecfef0ed}{sectors}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00490}00490                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_a9d460a5088142d9edd91cc93088798d8}{sectors\_hi}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00491}00491                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}}, \textcolor{stringliteral}{"{}\(\backslash\)20\(\backslash\)01S\(\backslash\)02A\(\backslash\)03F\(\backslash\)04O\(\backslash\)05D"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00492}00492                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[i].\mbox{\hyperlink{structintel__raid__disk_afa26ee94abf9c28ca1cce0b5c102a30f}{owner\_cfg\_num}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00493}00493         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00494}00494         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00495}00495                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00496}00496                 printf(\textcolor{stringliteral}{"{} ****** Volume \%d ******\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00497}00497                 printf(\textcolor{stringliteral}{"{} name               \%.16s\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{name}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00498}00498                 printf(\textcolor{stringliteral}{"{} total\_sectors      \%ju\(\backslash\)n"{}}, mvol-\/>total\_sectors);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00499}00499                 printf(\textcolor{stringliteral}{"{} state              0x\%b\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00500}00500                         \textcolor{stringliteral}{"{}\(\backslash\)020"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00501}00501                         \textcolor{stringliteral}{"{}\(\backslash\)001BOOTABLE"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00502}00502                         \textcolor{stringliteral}{"{}\(\backslash\)002BOOT\_DEVICE"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00503}00503                         \textcolor{stringliteral}{"{}\(\backslash\)003READ\_COALESCING"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00504}00504                         \textcolor{stringliteral}{"{}\(\backslash\)004WRITE\_COALESCING"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00505}00505                         \textcolor{stringliteral}{"{}\(\backslash\)005LAST\_SHUTDOWN\_DIRTY"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00506}00506                         \textcolor{stringliteral}{"{}\(\backslash\)006HIDDEN\_AT\_BOOT"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00507}00507                         \textcolor{stringliteral}{"{}\(\backslash\)007CURRENTLY\_HIDDEN"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00508}00508                         \textcolor{stringliteral}{"{}\(\backslash\)010VERIFY\_AND\_FIX"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00509}00509                         \textcolor{stringliteral}{"{}\(\backslash\)011MAP\_STATE\_UNINIT"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00510}00510                         \textcolor{stringliteral}{"{}\(\backslash\)012NO\_AUTO\_RECOVERY"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00511}00511                         \textcolor{stringliteral}{"{}\(\backslash\)013CLONE\_N\_GO"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00512}00512                         \textcolor{stringliteral}{"{}\(\backslash\)014CLONE\_MAN\_SYNC"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00513}00513                         \textcolor{stringliteral}{"{}\(\backslash\)015CNG\_MASTER\_DISK\_NUM"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00514}00514                 printf(\textcolor{stringliteral}{"{} reserved           \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a87d26a062cef15aada87368c30d446f2}{reserved}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00515}00515                 printf(\textcolor{stringliteral}{"{} migr\_priority      \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a8151634f10f8b4d129d20bdaf46444ee}{migr\_priority}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00516}00516                 printf(\textcolor{stringliteral}{"{} num\_sub\_vols       \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a097b56a3a3488a02e29a6e73e4b0d5d5}{num\_sub\_vols}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00517}00517                 printf(\textcolor{stringliteral}{"{} tid                \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a8e2f258217cfc1983e9d1c54915873b3}{tid}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00518}00518                 printf(\textcolor{stringliteral}{"{} cng\_master\_disk    \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{cng\_master\_disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00519}00519                 printf(\textcolor{stringliteral}{"{} cache\_policy       \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a21250e4b5e52e44b2044d1e3777fab47}{cache\_policy}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00520}00520                 printf(\textcolor{stringliteral}{"{} cng\_state          \%u (\%s)\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00521}00521                         \mbox{\hyperlink{md__intel_8c_a035708df815dc317a3ee43a2b2a4a245}{intel\_cngst2str}}(mvol-\/>\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00522}00522                 printf(\textcolor{stringliteral}{"{} cng\_sub\_state      \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_af38ae5980ae30b3a43aae0fd7a54e9b5}{cng\_sub\_state}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00523}00523                 printf(\textcolor{stringliteral}{"{} curr\_migr\_unit     \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a059d6f6a314bde05bd222ebedb7dec3f}{curr\_migr\_unit}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00524}00524                 printf(\textcolor{stringliteral}{"{} curr\_migr\_unit\_hi  \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a9dfcd3503911200af2248339a75b16cf}{curr\_migr\_unit\_hi}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00525}00525                 printf(\textcolor{stringliteral}{"{} checkpoint\_id      \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_abe5d9385dc892e51af84960868aeb172}{checkpoint\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00526}00526                 printf(\textcolor{stringliteral}{"{} migr\_state         \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00527}00527                 printf(\textcolor{stringliteral}{"{} migr\_type          \%u (\%s)\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00528}00528                         \mbox{\hyperlink{md__intel_8c_a71314476f382eef03c76fe04913389b8}{intel\_mt2str}}(mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00529}00529                 printf(\textcolor{stringliteral}{"{} dirty              \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00530}00530                 printf(\textcolor{stringliteral}{"{} fs\_state           \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a51ac61cf38994f1e4191b3647c54dd9b}{fs\_state}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00531}00531                 printf(\textcolor{stringliteral}{"{} verify\_errors      \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adf28a4f90fd115ad484f4c09259c6d68}{verify\_errors}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00532}00532                 printf(\textcolor{stringliteral}{"{} bad\_blocks         \%u\(\backslash\)n"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_aeacd910f63cb0bceb6834e3165847833}{bad\_blocks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00534}00534                 \textcolor{keywordflow}{for} (j = 0; j < (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} ? 2 : 1); j++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00535}00535                         printf(\textcolor{stringliteral}{"{}  *** Map \%d ***\(\backslash\)n"{}}, j);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00536}00536                         mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, j);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00537}00537                         printf(\textcolor{stringliteral}{"{}  offset            \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00538}00538                         printf(\textcolor{stringliteral}{"{}  offset\_hi         \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00539}00539                         printf(\textcolor{stringliteral}{"{}  disk\_sectors      \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00540}00540                         printf(\textcolor{stringliteral}{"{}  disk\_sectors\_hi   \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00541}00541                         printf(\textcolor{stringliteral}{"{}  stripe\_count      \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a5451456911abea635d9c81411ea8640e}{stripe\_count}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00542}00542                         printf(\textcolor{stringliteral}{"{}  stripe\_count\_hi   \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a59e9d909cd9a15152c5540763edea2a1}{stripe\_count\_hi}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00543}00543                         printf(\textcolor{stringliteral}{"{}  strip\_sectors     \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_ae130bfc14fe735079259238aaab3e119}{strip\_sectors}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00544}00544                         printf(\textcolor{stringliteral}{"{}  status            \%u (\%s)\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00545}00545                                 \mbox{\hyperlink{md__intel_8c_ae4c13b0cd3a195a405f9f067c502e89f}{intel\_status2str}}(mmap-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00546}00546                         printf(\textcolor{stringliteral}{"{}  type              \%u (\%s)\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00547}00547                                 \mbox{\hyperlink{md__intel_8c_a4ba9a67fd401d0b21881f4a0cc47b01b}{intel\_type2str}}(mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00548}00548                         printf(\textcolor{stringliteral}{"{}  total\_disks       \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00549}00549                         printf(\textcolor{stringliteral}{"{}  total\_domains     \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00550}00550                         printf(\textcolor{stringliteral}{"{}  failed\_disk\_num   \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00551}00551                         printf(\textcolor{stringliteral}{"{}  ddf               \%u\(\backslash\)n"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a37a18e32e55cfb4675829fc31b0d3e4e}{ddf}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00552}00552                         printf(\textcolor{stringliteral}{"{}  disk\_idx         "{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00553}00553                         \textcolor{keywordflow}{for} (k = 0; k < mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}; k++)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00554}00554                                 printf(\textcolor{stringliteral}{"{} 0x\%08x"{}}, mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[k]);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00555}00555                         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00556}00556                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00557}00557         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00558}00558         printf(\textcolor{stringliteral}{"{}=================================================\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00559}00559 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00561}00561 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00562}\mbox{\hyperlink{md__intel_8c_a4f1f3bcd5b4af574b486bd8e46ad117e}{00562}} \mbox{\hyperlink{md__intel_8c_a4f1f3bcd5b4af574b486bd8e46ad117e}{intel\_meta\_copy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00563}00563 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00564}00564         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *nmeta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00566}00566         nmeta = malloc(meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}}, M\_MD\_INTEL, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00567}00567         memcpy(nmeta, meta, meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00568}00568         \textcolor{keywordflow}{return} (nmeta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00569}00569 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00571}00571 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00572}\mbox{\hyperlink{md__intel_8c_a4933d907b210fae0b0d51f52b93d5e19}{00572}} \mbox{\hyperlink{md__intel_8c_a4933d907b210fae0b0d51f52b93d5e19}{intel\_meta\_find\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta, \textcolor{keywordtype}{char} *serial)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00573}00573 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00574}00574         \textcolor{keywordtype}{int} pos;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00575}00575 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00576}00576         \textcolor{keywordflow}{for} (pos = 0; pos < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}}; pos++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00577}00577                 \textcolor{keywordflow}{if} (strncmp(meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[pos].\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00578}00578                     serial, \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}}) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00579}00579                         \textcolor{keywordflow}{return} (pos);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00580}00580         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00581}00581         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00582}00582 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00584}00584 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00585}\mbox{\hyperlink{md__intel_8c_a294cfd6b6eb74d8745b44c2bba6ee6bb}{00585}} \mbox{\hyperlink{md__intel_8c_a294cfd6b6eb74d8745b44c2bba6ee6bb}{intel\_meta\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00586}00586 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00587}00587         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00588}00588         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00589}00589         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00590}00590         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap, *mmap1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00591}00591         \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00592}00592         \textcolor{keywordtype}{int} error, i, j, k, left, size;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00593}00593         uint32\_t checksum, *ptr;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00595}00595         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00596}00596         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(*meta))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00597}00597                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00598}00598         \textcolor{comment}{/* Read the anchor sector. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00599}00599         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00600}00600             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * 2, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \&error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00601}00601         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00602}00602                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00603}00603                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00604}00604                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00605}00605         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00606}00606         meta = (\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *)\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00607}00607 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00608}00608         \textcolor{comment}{/* Check if this is an Intel RAID struct */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00609}00609         \textcolor{keywordflow}{if} (strncmp(meta-\/>\mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{intel\_id}}, \mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}, strlen(\mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}))) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00610}00610                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel signature check failed on \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00611}00611                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00612}00612                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00613}00613         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00614}00614         \textcolor{keywordflow}{if} (meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} > 65536 ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00615}00615             meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}})) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00616}00616                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel metadata size looks wrong: \%d"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00617}00617                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00618}00618                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00619}00619                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00620}00620         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00621}00621         size = meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00622}00622         meta = malloc(size, M\_MD\_INTEL, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00623}00623         memcpy(meta, \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, min(size, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00624}00624         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00625}00625 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00626}00626         \textcolor{comment}{/* Read all the rest, if needed. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00627}00627         \textcolor{keywordflow}{if} (meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} > \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00628}00628                 left = (meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} -\/ 1) / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00629}00629                 \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00630}00630                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * (2 + left),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00631}00631                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * left, \&error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00632}00632                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00633}00633                         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot read remaining metadata"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00634}00634                             \textcolor{stringliteral}{"{} part from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00635}00635                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00636}00636                         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00637}00637                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00638}00638                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00639}00639                 memcpy(((\textcolor{keywordtype}{char} *)meta) + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00640}00640                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * left);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00641}00641                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00642}00642         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00643}00643 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00644}00644         \textcolor{comment}{/* Check metadata checksum. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00645}00645         \textcolor{keywordflow}{for} (\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} = 0, ptr = (uint32\_t *)meta, i = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00646}00646             i < (meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} / \textcolor{keyword}{sizeof}(uint32\_t)); i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00647}00647                 \mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} += *ptr++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00648}00648         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00649}00649         \mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} -\/= meta-\/>\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00650}00650         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} != meta-\/>\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00651}00651                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel checksum check failed on \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00652}00652                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00653}00653                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00654}00654         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00656}00656         \textcolor{comment}{/* Validate metadata size. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00657}00657         size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}}) +}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00658}00658             sizeof(struct \mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}}) * (meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}} -\/ 1) +}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00659}00659             \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}}) * meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00660}00660         \textcolor{keywordflow}{if} (size > meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00661}00661 badsize:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00662}00662                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel metadata size incorrect \%d < \%d"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00663}00663                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}}, size);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00664}00664                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00665}00665                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00666}00666         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00667}00667         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00668}00668                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00669}00669                 mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00670}00670                 size += 4 * (mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00671}00671                 \textcolor{keywordflow}{if} (size > meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00672}00672                         \textcolor{keywordflow}{goto} badsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00673}00673                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00674}00674                         size += \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00675}00675                         \textcolor{keywordflow}{if} (size > meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00676}00676                                 \textcolor{keywordflow}{goto} badsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00677}00677                         mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00678}00678                         size += 4 * (mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00679}00679                         \textcolor{keywordflow}{if} (size > meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00680}00680                                 \textcolor{keywordflow}{goto} badsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00681}00681                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00682}00682         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00683}00683 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00684}00684         \mbox{\hyperlink{md__intel_8c_a6b76d55ca3088561dc852ac3393b19a5}{g\_raid\_md\_intel\_print}}(meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00686}00686         \textcolor{keywordflow}{if} (strncmp(meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}}, \mbox{\hyperlink{md__intel_8c_a0934f121286aef207d0ea7e5c8fdaf6d}{INTEL\_VERSION\_1300}}, 6) > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00687}00687                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel unsupported version: '\%.6s'"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00688}00688                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00689}00689                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00690}00690                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00691}00691         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00692}00692 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00693}00693         \textcolor{keywordflow}{if} (strncmp(meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}}, \mbox{\hyperlink{md__intel_8c_a0934f121286aef207d0ea7e5c8fdaf6d}{INTEL\_VERSION\_1300}}, 6) >= 0 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00694}00694             (meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} \& \string~\mbox{\hyperlink{md__intel_8c_acdb1c2caf09313d5eb7a64f37efa36d5}{INTEL\_ATTR\_SUPPORTED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00695}00695                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel unsupported attributes: 0x\%08x"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00696}00696                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} \& \string~\mbox{\hyperlink{md__intel_8c_acdb1c2caf09313d5eb7a64f37efa36d5}{INTEL\_ATTR\_SUPPORTED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00697}00697                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00698}00698                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00699}00699         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00701}00701         \textcolor{comment}{/* Validate disk indexes. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00702}00702         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00703}00703                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00704}00704                 \textcolor{keywordflow}{for} (j = 0; j < (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} ? 2 : 1); j++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00705}00705                         mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, j);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00706}00706                         \textcolor{keywordflow}{for} (k = 0; k < mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}; k++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00707}00707                                 \textcolor{keywordflow}{if} ((mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[k] \& \mbox{\hyperlink{md__intel_8c_a03b6328012ec5504a085179c0c55e983}{INTEL\_DI\_IDX}}) >}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00708}00708                                     meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00709}00709                                         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel metadata disk"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00710}00710                                             \textcolor{stringliteral}{"{} index \%d too big (>\%d)"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00711}00711                                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[k] \& \mbox{\hyperlink{md__intel_8c_a03b6328012ec5504a085179c0c55e983}{INTEL\_DI\_IDX}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00712}00712                                             meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00713}00713                                         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00714}00714                                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00715}00715                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00716}00716                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00717}00717                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00718}00718         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00720}00720         \textcolor{comment}{/* Validate migration types. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00721}00721         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00722}00722                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00723}00723                 \textcolor{comment}{/* Deny unknown migration types. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00724}00724                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00725}00725                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} != \mbox{\hyperlink{md__intel_8c_a6c3bd0942243ee7a3fe6e984682c23d0}{INTEL\_MT\_INIT}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00726}00726                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} != \mbox{\hyperlink{md__intel_8c_acf2f6b332ae8e850f983775f34b82588}{INTEL\_MT\_REBUILD}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00727}00727                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} != \mbox{\hyperlink{md__intel_8c_ad61ff49ce32f04b0f816bd7bd2c9028e}{INTEL\_MT\_VERIFY}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00728}00728                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} != \mbox{\hyperlink{md__intel_8c_aedba10cd8d3e55eeecb5ede63879d662}{INTEL\_MT\_GEN\_MIGR}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00729}00729                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} != \mbox{\hyperlink{md__intel_8c_aaf4e52e15df77e945be9a74f3504aad0}{INTEL\_MT\_REPAIR}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00730}00730                         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel metadata has unsupported"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00731}00731                             \textcolor{stringliteral}{"{} migration type \%d"{}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00732}00732                         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00733}00733                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00734}00734                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00735}00735                 \textcolor{comment}{/* Deny general migrations except SINGLE-\/>RAID1. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00736}00736                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00737}00737                     mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_aedba10cd8d3e55eeecb5ede63879d662}{INTEL\_MT\_GEN\_MIGR}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00738}00738                         mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00739}00739                         mmap1 = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00740}00740                         \textcolor{keywordflow}{if} (mmap1-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} != 1 ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00741}00741                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} != \mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{INTEL\_T\_RAID1}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00742}00742                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} != 2 ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00743}00743                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}} != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a8f01985d45c918144ba50c1eaaf50b13}{offset}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00744}00744                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}} != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_ac37139174bc8673c12488fec36b5e29b}{disk\_sectors}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00745}00745                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} != mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00746}00746                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}} != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a997cc0eff7d888359211088693497998}{offset\_hi}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00747}00747                             mmap-\/>\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}} != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_ab8bfc0a9bc49435de147c529dc64a310}{disk\_sectors\_hi}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00748}00748                             (mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[0] != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[0] \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00749}00749                              mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[0] != mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[1])) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00750}00750                                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel metadata has unsupported"{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00751}00751                                     \textcolor{stringliteral}{"{} variant of general migration"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00752}00752                                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00753}00753                                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00754}00754                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00755}00755                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00756}00756         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00758}00758         \textcolor{keywordflow}{return} (meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00759}00759 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00760}00760 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00761}00761 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00762}\mbox{\hyperlink{md__intel_8c_a1d44d6837cdbf59d38bdfde48cd995d3}{00762}} \mbox{\hyperlink{md__intel_8c_a1d44d6837cdbf59d38bdfde48cd995d3}{intel\_meta\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00763}00763 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00764}00764         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00765}00765         \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00766}00766         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, i, sectors;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00767}00767         uint32\_t checksum, *ptr;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00769}00769         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00770}00770 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00771}00771         \textcolor{comment}{/* Recalculate checksum for case if metadata were changed. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00772}00772         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00773}00773         \textcolor{keywordflow}{for} (checksum = 0, ptr = (uint32\_t *)meta, i = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00774}00774             i < (meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} / \textcolor{keyword}{sizeof}(uint32\_t)); i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00775}00775                 checksum += *ptr++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00776}00776         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00777}00777         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a59467539f68ff069195190e4253b0e46}{checksum}} = checksum;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00778}00778 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00779}00779         \textcolor{comment}{/* Create and fill buffer. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00780}00780         sectors = howmany(meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00781}00781         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = malloc(sectors * \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00782}00782         \textcolor{keywordflow}{if} (sectors > 1) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00783}00783                 memcpy(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, ((\textcolor{keywordtype}{char} *)meta) + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00784}00784                     (sectors -\/ 1) * \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00785}00785         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00786}00786         memcpy(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + (sectors -\/ 1) * \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, meta, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00787}00787 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00788}00788         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00789}00789             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * (1 + sectors),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00790}00790             \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} * sectors);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00791}00791         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00792}00792                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot write metadata to \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00793}00793                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00794}00794         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00796}00796         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00797}00797         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00798}00798 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00799}00799 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00800}00800 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00801}\mbox{\hyperlink{md__intel_8c_a57b48f3413ef41715933575fd6ec0279}{00801}} \mbox{\hyperlink{md__intel_8c_a57b48f3413ef41715933575fd6ec0279}{intel\_meta\_erase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00802}00802 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00803}00803         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00804}00804         \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00805}00805         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00807}00807         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00808}00808         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = malloc(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00809}00809         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00810}00810             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ 2 * \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00811}00811             \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00812}00812         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00813}00813                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot erase metadata on \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00814}00814                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00815}00815         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00816}00816         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00817}00817         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00818}00818 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00820}00820 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00821}\mbox{\hyperlink{md__intel_8c_acaff5a8054fe5ef04a40706cc09a0b41}{00821}} \mbox{\hyperlink{md__intel_8c_acaff5a8054fe5ef04a40706cc09a0b41}{intel\_meta\_write\_spare}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}} *d)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00822}00822 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00823}00823         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00824}00824         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00826}00826         \textcolor{comment}{/* Fill anchor and single disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00827}00827         meta = malloc(\mbox{\hyperlink{md__intel_8c_ac5dfd242ca795b9520139f7c78ba9ba3}{INTEL\_MAX\_MD\_SIZE}}(1), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00828}00828         memcpy(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{intel\_id}}[0], \mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00829}00829         memcpy(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}}[0], \mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{INTEL\_VERSION\_1000}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00830}00830             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{INTEL\_VERSION\_1000}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00831}00831         meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} = \mbox{\hyperlink{md__intel_8c_ac5dfd242ca795b9520139f7c78ba9ba3}{INTEL\_MAX\_MD\_SIZE}}(1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00832}00832         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}} = meta-\/>\mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{orig\_config\_id}} = arc4random();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00833}00833         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00834}00834         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00835}00835         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[0] = *d;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00836}00836         error = \mbox{\hyperlink{md__intel_8c_a1d44d6837cdbf59d38bdfde48cd995d3}{intel\_meta\_write}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00837}00837         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00838}00838         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00839}00839 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00841}00841 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00842}\mbox{\hyperlink{md__intel_8c_ad1a11a5a274e2de558ba45382e1366af}{00842}} \mbox{\hyperlink{md__intel_8c_ad1a11a5a274e2de558ba45382e1366af}{g\_raid\_md\_intel\_get\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc, \textcolor{keywordtype}{int} \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00843}00843 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00844}00844         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}}   *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00845}00845         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00846}00846 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00847}00847         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00848}00848                 pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00849}00849                 if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} == \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00850}00850                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00851}00851         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00852}00852         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00853}00853 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00854}00854 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00855}00855 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00856}\mbox{\hyperlink{md__intel_8c_a7f11a2a796b509acfdbcfa7ecf747006}{00856}} \mbox{\hyperlink{md__intel_8c_a7f11a2a796b509acfdbcfa7ecf747006}{g\_raid\_md\_intel\_supported}}(\textcolor{keywordtype}{int} level, \textcolor{keywordtype}{int} qual, \textcolor{keywordtype}{int} disks, \textcolor{keywordtype}{int} force)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00857}00857 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00859}00859         \textcolor{keywordflow}{switch} (level) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00860}00860         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00861}00861                 \textcolor{keywordflow}{if} (disks < 1)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00862}00862                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00863}00863                 \textcolor{keywordflow}{if} (!force \&\& (disks < 2 || disks > 6))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00864}00864                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00865}00865                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00866}00866         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00867}00867                 \textcolor{keywordflow}{if} (disks < 1)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00868}00868                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00869}00869                 \textcolor{keywordflow}{if} (!force \&\& (disks != 2))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00870}00870                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00871}00871                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00872}00872         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00873}00873                 \textcolor{keywordflow}{if} (disks < 2)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00874}00874                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00875}00875                 \textcolor{keywordflow}{if} (!force \&\& (disks != 4))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00876}00876                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00877}00877                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00878}00878         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00879}00879                 \textcolor{keywordflow}{if} (disks < 3)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00880}00880                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00881}00881                 \textcolor{keywordflow}{if} (!force \&\& disks > 6)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00882}00882                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00883}00883                 \textcolor{keywordflow}{if} (qual != \mbox{\hyperlink{g__raid_8h_a85a42d827015531803abc6df07b15e89}{G\_RAID\_VOLUME\_RLQ\_R5LA}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00884}00884                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00885}00885                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00886}00886         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00887}00887                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00888}00888         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00889}00889         \textcolor{keywordflow}{if} (level != \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}} \&\& qual != \mbox{\hyperlink{g__raid_8h_a9c036957b2fb94761b5fd084e8f991c9}{G\_RAID\_VOLUME\_RLQ\_NONE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00890}00890                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00891}00891         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00892}00892 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00894}00894 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00895}\mbox{\hyperlink{md__intel_8c_a3647760f14807115b0129293f43dc399}{00895}} \mbox{\hyperlink{md__intel_8c_a3647760f14807115b0129293f43dc399}{g\_raid\_md\_intel\_get\_volume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc, \textcolor{keywordtype}{int} \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00896}00896 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00897}00897         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}}       *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00898}00898         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00900}00900         TAILQ\_FOREACH(mvol, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00901}00901                 pv = mvol-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00902}00902                 \textcolor{keywordflow}{if} (pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}} == \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00903}00903                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00904}00904         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00905}00905         \textcolor{keywordflow}{return} (mvol);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00906}00906 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00908}00908 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00909}\mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{00909}} \mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00910}00910 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00911}00911         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00912}00912         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, *tmpsd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00913}00913         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *olddisk, *tmpdisk;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00914}00914         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00915}00915         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00916}00916         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00917}00917         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd, *oldpd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00918}00918         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00919}00919         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00920}00920         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap0, *mmap1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00921}00921         \textcolor{keywordtype}{int} disk\_pos, resurrection = 0, migr\_global, i;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00922}00922 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00923}00923         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00924}00924         md = sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00925}00925         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00926}00926         meta = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00927}00927         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00928}00928         olddisk = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00929}00929 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00930}00930         \textcolor{comment}{/* Find disk position in metadata by its serial. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00931}00931         disk\_pos = \mbox{\hyperlink{md__intel_8c_a4933d907b210fae0b0d51f52b93d5e19}{intel\_meta\_find\_disk}}(meta, pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00932}00932         \textcolor{keywordflow}{if} (disk\_pos < 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00933}00933                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}Unknown, probably new or stale disk"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00934}00934                 \textcolor{comment}{/* Failed stale disk is useless for us. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00935}00935                 \textcolor{keywordflow}{if} ((pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}}) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00936}00936                     !(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{INTEL\_F\_DISABLED}})) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00937}00937                         \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_ac204b4a9677b7e98bfeb81a687335e97}{G\_RAID\_DISK\_S\_STALE\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00938}00938                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00939}00939                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00940}00940                 \textcolor{comment}{/* If we are in the start process, that's all for now. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00941}00941                 \textcolor{keywordflow}{if} (!mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00942}00942                         \textcolor{keywordflow}{goto} nofit;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00943}00943                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00944}00944 \textcolor{comment}{                 * If we have already started -\/ try to get use of the disk.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00945}00945 \textcolor{comment}{                 * Try to replace OFFLINE disks first, then FAILED.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00946}00946 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00947}00947                 TAILQ\_FOREACH(tmpdisk, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00948}00948                         \textcolor{keywordflow}{if} (tmpdisk-\/>\mbox{\hyperlink{structg__raid__disk_a893b44bb63bf0b41d6f140424e0db523}{d\_state}} != \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00949}00949                             tmpdisk-\/>\mbox{\hyperlink{structg__raid__disk_a893b44bb63bf0b41d6f140424e0db523}{d\_state}} != \mbox{\hyperlink{g__raid_8h_a2135c7d2f628dbf559cad6d4ea1b5c8f}{G\_RAID\_DISK\_S\_FAILED}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00950}00950                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00951}00951                         \textcolor{comment}{/* Make sure this disk is big enough. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00952}00952                         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&tmpdisk-\/>d\_subdisks, sd\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00953}00953                                 off\_t disk\_sectors = }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00954}00954                                     \mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{intel\_get\_disk\_sectors}}(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00956}00956                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} + \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} + 4096 >}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00957}00957                                     disk\_sectors * 512) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00958}00958                                         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00959}00959                                             \textcolor{stringliteral}{"{}Disk too small (\%llu < \%llu)"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00960}00960                                             (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00961}00961                                             disk\_sectors * 512,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00962}00962                                             (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \textcolor{keywordtype}{long})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00963}00963                                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} + \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} + 4096);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00964}00964                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00965}00965                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00966}00966                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00967}00967                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} != NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00968}00968                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00969}00969                         \textcolor{keywordflow}{if} (tmpdisk-\/>\mbox{\hyperlink{structg__raid__disk_a893b44bb63bf0b41d6f140424e0db523}{d\_state}} == \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00970}00970                                 olddisk = tmpdisk;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00971}00971                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00972}00972                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (olddisk == NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00973}00973                                 olddisk = tmpdisk;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00974}00974                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00975}00975                 \textcolor{keywordflow}{if} (olddisk == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00976}00976 nofit:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00977}00977                         \textcolor{keywordflow}{if} (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00978}00978                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00979}00979                                     \mbox{\hyperlink{g__raid_8h_a53208a3eca6d67917c6fdf6321292c99}{G\_RAID\_DISK\_S\_SPARE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00980}00980                                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00981}00981                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00982}00982                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00983}00983                                     \mbox{\hyperlink{g__raid_8h_a12c815344c6e588760a1619861a54122}{G\_RAID\_DISK\_S\_STALE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00984}00984                                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00985}00985                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00986}00986                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00987}00987                 oldpd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)olddisk-\/>\mbox{\hyperlink{structg__raid__disk_ab6681cb16ceeb79b9e88d639eca0bd9e}{d\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00988}00988                 disk\_pos = oldpd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00989}00989                 resurrection = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00990}00990         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00992}00992         \textcolor{keywordflow}{if} (olddisk == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00993}00993                 \textcolor{comment}{/* Find placeholder by position. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00994}00994                 olddisk = \mbox{\hyperlink{md__intel_8c_ad1a11a5a274e2de558ba45382e1366af}{g\_raid\_md\_intel\_get\_disk}}(sc, disk\_pos);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00995}00995                 \textcolor{keywordflow}{if} (olddisk == NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00996}00996                         panic(\textcolor{stringliteral}{"{}No disk at position \%d!"{}}, disk\_pos);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00997}00997                 \textcolor{keywordflow}{if} (olddisk-\/>\mbox{\hyperlink{structg__raid__disk_a893b44bb63bf0b41d6f140424e0db523}{d\_state}} != \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00998}00998                         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}More than one disk for pos \%d"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l00999}00999                             disk\_pos);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01000}01000                         \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_a12c815344c6e588760a1619861a54122}{G\_RAID\_DISK\_S\_STALE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01001}01001                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01002}01002                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01003}01003                 oldpd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)olddisk-\/>\mbox{\hyperlink{structg__raid__disk_ab6681cb16ceeb79b9e88d639eca0bd9e}{d\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01004}01004         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01005}01005 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01006}01006         \textcolor{comment}{/* Replace failed disk or placeholder with new disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01007}01007         TAILQ\_FOREACH\_SAFE(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&olddisk-\/>d\_subdisks, sd\_next, tmpsd) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01008}01008                 TAILQ\_REMOVE(\&olddisk-\/>d\_subdisks, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, sd\_next);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01009}01009                 TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, sd\_next);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01010}01010                 \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01011}01011         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01012}01012         oldpd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = -\/2;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01013}01013         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = disk\_pos;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01014}01014 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01015}01015         \textcolor{comment}{/* If it was placeholder -\/-\/ destroy it. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01016}01016         \textcolor{keywordflow}{if} (olddisk-\/>\mbox{\hyperlink{structg__raid__disk_a893b44bb63bf0b41d6f140424e0db523}{d\_state}} == \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01017}01017                 \mbox{\hyperlink{g__raid_8c_ac1e32d950d9354f1dca5d2ca34244adc}{g\_raid\_destroy\_disk}}(olddisk);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01018}01018         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01019}01019                 \textcolor{comment}{/* Otherwise, make it STALE\_FAILED. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01020}01020                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(olddisk, \mbox{\hyperlink{g__raid_8h_ac204b4a9677b7e98bfeb81a687335e97}{G\_RAID\_DISK\_S\_STALE\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01021}01021                 \textcolor{comment}{/* Update global metadata just in case. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01022}01022                 memcpy(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos], \&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01023}01023                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__disk}{intel\_raid\_disk}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01024}01024         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01026}01026         \textcolor{comment}{/* Welcome the new disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01027}01027         \textcolor{keywordflow}{if} ((meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{INTEL\_F\_DISABLED}}) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01028}01028             !(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01029}01029                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01030}01030         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (resurrection)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01031}01031                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01032}01032         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01033}01033                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_a2135c7d2f628dbf559cad6d4ea1b5c8f}{G\_RAID\_DISK\_S\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01034}01034         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01035}01035                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_a53208a3eca6d67917c6fdf6321292c99}{G\_RAID\_DISK\_S\_SPARE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01036}01036         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01037}01037                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01038}01038         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, sd\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01039}01039                 pv = \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_ab7f11cd5b966d381d1ae75c6ac9e3ddd}{sd\_volume}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01040}01040                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01041}01041                 mmap0 = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01042}01042                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01043}01043                         mmap1 = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01044}01044                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01045}01045                         mmap1 = mmap0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01046}01046 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01047}01047                 migr\_global = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01048}01048                 \textcolor{keywordflow}{for} (i = 0; i < mmap0-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01049}01049                         \textcolor{keywordflow}{if} ((mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[i] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01050}01050                             (mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[i] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01051}01051                                 migr\_global = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01052}01052                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01054}01054                 \textcolor{keywordflow}{if} ((meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{INTEL\_F\_DISABLED}}) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01055}01055                     !(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}})) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01056}01056                         \textcolor{comment}{/* Disabled disk, useless. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01057}01057                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01058}01058                             \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01059}01059                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (resurrection) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01060}01060                         \textcolor{comment}{/* Stale disk, almost same as new. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01061}01061                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01062}01062                             \mbox{\hyperlink{g__raid_8h_a9dd59db9322af74b4b15021c3fc8f2f5}{G\_RAID\_SUBDISK\_S\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01063}01063                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01064}01064                         \textcolor{comment}{/* Failed disk, almost useless. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01065}01065                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01066}01066                             \mbox{\hyperlink{g__raid_8h_a2e56fb1cd5fdab097052e38c28a8c92f}{G\_RAID\_SUBDISK\_S\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01067}01067                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01068}01068                         \textcolor{keywordflow}{if} (mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} == \mbox{\hyperlink{md__intel_8c_aae75cc2c95bebee1bb9092bbba82dfba}{INTEL\_S\_UNINITIALIZED}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01069}01069                             (!pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}} || pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}} != disk\_pos)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01070}01070                                 \textcolor{comment}{/* Freshly created uninitialized volume. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01071}01071                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01072}01072                                     \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01073}01073                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}}] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01074}01074                                 \textcolor{comment}{/* Freshly inserted disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01075}01075                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01076}01076                                     \mbox{\hyperlink{g__raid_8h_a9dd59db9322af74b4b15021c3fc8f2f5}{G\_RAID\_SUBDISK\_S\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01077}01077                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}} \&\& (!pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01078}01078                             pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}} != disk\_pos)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01079}01079                                 \textcolor{comment}{/* Dirty volume (unclean shutdown). */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01080}01080                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01081}01081                                     \mbox{\hyperlink{g__raid_8h_a41bff35bee21218d2aba7a261eb2e83c}{G\_RAID\_SUBDISK\_S\_STALE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01082}01082                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01083}01083                                 \textcolor{comment}{/* Up to date disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01084}01084                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01085}01085                                     \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01086}01086                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01087}01087                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_a6c3bd0942243ee7a3fe6e984682c23d0}{INTEL\_MT\_INIT}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01088}01088                            mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_acf2f6b332ae8e850f983775f34b82588}{INTEL\_MT\_REBUILD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01089}01089                         \textcolor{keywordflow}{if} (mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}}] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01090}01090                                 \textcolor{comment}{/* Freshly inserted disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01091}01091                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01092}01092                                     \mbox{\hyperlink{g__raid_8h_a9dd59db9322af74b4b15021c3fc8f2f5}{G\_RAID\_SUBDISK\_S\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01093}01093                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}}] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01094}01094                                 \textcolor{comment}{/* Rebuilding disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01095}01095                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01096}01096                                     \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01097}01097                                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01098}01098                                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01099}01099                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01100}01100                                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}} =}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01101}01101                                             \mbox{\hyperlink{md__intel_8c_a99827f71c574a2333c927dcb44cf0b37}{intel\_get\_vol\_curr\_migr\_unit}}(mvol) *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01102}01102                                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_ab7f11cd5b966d381d1ae75c6ac9e3ddd}{sd\_volume}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01103}01103                                             mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01104}01104                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01105}01105                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_a6c3bd0942243ee7a3fe6e984682c23d0}{INTEL\_MT\_INIT}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01106}01106                             migr\_global) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01107}01107                                 \textcolor{comment}{/* Freshly created uninitialized volume. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01108}01108                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01109}01109                                     \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01110}01110                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}} \&\& (!pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01111}01111                             pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}} != disk\_pos)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01112}01112                                 \textcolor{comment}{/* Dirty volume (unclean shutdown). */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01113}01113                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01114}01114                                     \mbox{\hyperlink{g__raid_8h_a41bff35bee21218d2aba7a261eb2e83c}{G\_RAID\_SUBDISK\_S\_STALE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01115}01115                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01116}01116                                 \textcolor{comment}{/* Up to date disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01117}01117                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01118}01118                                     \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01119}01119                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01120}01120                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_ad61ff49ce32f04b0f816bd7bd2c9028e}{INTEL\_MT\_VERIFY}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01121}01121                            mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_aaf4e52e15df77e945be9a74f3504aad0}{INTEL\_MT\_REPAIR}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01122}01122                         \textcolor{keywordflow}{if} (mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}}] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01123}01123                                 \textcolor{comment}{/* Freshly inserted disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01124}01124                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01125}01125                                     \mbox{\hyperlink{g__raid_8h_a9dd59db9322af74b4b15021c3fc8f2f5}{G\_RAID\_SUBDISK\_S\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01126}01126                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a415c982fbd2537861e39aa04fa582969}{sd\_pos}}] \& \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}}) ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01127}01127                             migr\_global) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01128}01128                                 \textcolor{comment}{/* Resyncing disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01129}01129                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01130}01130                                     \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01131}01131                                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01132}01132                                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01133}01133                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01134}01134                                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}} =}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01135}01135                                             \mbox{\hyperlink{md__intel_8c_a99827f71c574a2333c927dcb44cf0b37}{intel\_get\_vol\_curr\_migr\_unit}}(mvol) *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01136}01136                                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_ab7f11cd5b966d381d1ae75c6ac9e3ddd}{sd\_volume}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01137}01137                                             mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01138}01138                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01139}01139                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01140}01140                                 \textcolor{comment}{/* Dirty volume (unclean shutdown). */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01141}01141                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01142}01142                                     \mbox{\hyperlink{g__raid_8h_a41bff35bee21218d2aba7a261eb2e83c}{G\_RAID\_SUBDISK\_S\_STALE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01143}01143                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01144}01144                                 \textcolor{comment}{/* Up to date disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01145}01145                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01146}01146                                     \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01147}01147                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01148}01148                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} == \mbox{\hyperlink{md__intel_8c_aedba10cd8d3e55eeecb5ede63879d662}{INTEL\_MT\_GEN\_MIGR}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01149}01149                         \textcolor{keywordflow}{if} ((mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[0] \& \mbox{\hyperlink{md__intel_8c_a03b6328012ec5504a085179c0c55e983}{INTEL\_DI\_IDX}}) != disk\_pos) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01150}01150                                 \textcolor{comment}{/* Freshly inserted disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01151}01151                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01152}01152                                     \mbox{\hyperlink{g__raid_8h_a9dd59db9322af74b4b15021c3fc8f2f5}{G\_RAID\_SUBDISK\_S\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01153}01153                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01154}01154                                 \textcolor{comment}{/* Up to date disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01155}01155                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01156}01156                                     \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01157}01157                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01158}01158                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01159}01159                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_ae59b963d99efabe56d8173f3ad914a07}{G\_RAID\_SUBDISK\_E\_NEW}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01160}01160                     \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01161}01161         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01163}01163         \textcolor{comment}{/* Update status of our need for spare. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01164}01164         \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01165}01165                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{mdio\_incomplete}} =}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01166}01166                     (\mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) +}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01167}01167                      \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}}) <}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01168}01168                      meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01169}01169         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01170}01170 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01171}01171         \textcolor{keywordflow}{return} (resurrection);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01172}01172 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01173}01173 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01174}01174 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01175}\mbox{\hyperlink{md__intel_8c_a8a691b5c1412cadb81fec192082ef545}{01175}} \mbox{\hyperlink{md__intel_8c_a8a691b5c1412cadb81fec192082ef545}{g\_disk\_md\_intel\_retaste}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01176}01176 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01177}01177 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01178}01178         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Array is not complete, trying to retaste."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01179}01179         \mbox{\hyperlink{geom_8h_adb2947739c157b0cb4f1650d1122b953}{g\_retaste}}(\&\mbox{\hyperlink{g__raid_8h_a490a02fd5fb980866b6fbce0f042ed65}{g\_raid\_class}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01180}01180         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(arg, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01181}01181 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01182}01182 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01183}01183 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01184}\mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{01184}} \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01185}01185 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01186}01186         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01187}01187         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01188}01188         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01189}01189         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01190}01190         \textcolor{keyword}{struct }task *task;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01191}01191         \textcolor{keywordtype}{int} update, na;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01192}01192 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01193}01193         md = sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01194}01194         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01195}01195         meta = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01196}01196         update = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01197}01197         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01198}01198                 \textcolor{comment}{/* Make sure we miss anything. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01199}01199                 na = \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) +}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01200}01200                     \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01201}01201                 \textcolor{keywordflow}{if} (na == meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01202}01202                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01203}01203 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01204}01204                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01205}01205                     \textcolor{stringliteral}{"{}Array is not complete (\%d of \%d), "{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01206}01206                     \textcolor{stringliteral}{"{}trying to refill."{}}, na, meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01207}01207 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01208}01208                 \textcolor{comment}{/* Try to get use some of STALE disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01209}01209                 TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01210}01210                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a12c815344c6e588760a1619861a54122}{G\_RAID\_DISK\_S\_STALE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01211}01211                                 update += \mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01212}01212                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01213}01213                                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01214}01214                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01215}01215                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01216}01216                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01217}01217                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} != NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01218}01218                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01219}01219 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01220}01220                 \textcolor{comment}{/* Try to get use some of SPARE disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01221}01221                 TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01222}01222                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a53208a3eca6d67917c6fdf6321292c99}{G\_RAID\_DISK\_S\_SPARE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01223}01223                                 update += \mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01224}01224                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01225}01225                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01226}01226                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01227}01227                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01228}01228         \} \textcolor{keywordflow}{while} (\mbox{\hyperlink{structdisk}{disk}} != NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01229}01229 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01230}01230         \textcolor{comment}{/* Write new metadata if we changed something. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01231}01231         \textcolor{keywordflow}{if} (update) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01232}01232                 \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01233}01233                 meta = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01234}01234         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01235}01235 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01236}01236         \textcolor{comment}{/* Update status of our need for spare. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01237}01237         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{mdio\_incomplete}} = (\mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) +}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01238}01238             \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}}) < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01239}01239 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01240}01240         \textcolor{comment}{/* Request retaste hoping to find spare. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01241}01241         \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{mdio\_incomplete}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01242}01242                 task = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} task),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01243}01243                     M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01244}01244                 TASK\_INIT(task, 0, \mbox{\hyperlink{md__intel_8c_a8a691b5c1412cadb81fec192082ef545}{g\_disk\_md\_intel\_retaste}}, task);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01245}01245                 taskqueue\_enqueue(taskqueue\_swi, task);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01246}01246         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01247}01247 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01248}01248 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01249}01249 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01250}\mbox{\hyperlink{md__intel_8c_aca36a5c0885f8c418c0596f8d81f46c7}{01250}} \mbox{\hyperlink{md__intel_8c_aca36a5c0885f8c418c0596f8d81f46c7}{g\_raid\_md\_intel\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01251}01251 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01252}01252         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01253}01253         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01254}01254         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01255}01255         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01256}01256         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01257}01257         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01258}01258         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01259}01259         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01260}01260         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01261}01261         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01262}01262         \textcolor{keywordtype}{int} i, j, disk\_pos;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01264}01264         md = sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01265}01265         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01266}01266         meta = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01267}01267 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01268}01268         \textcolor{comment}{/* Create volumes and subdisks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01269}01269         \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01270}01270                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01271}01271                 mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01272}01272                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = \mbox{\hyperlink{g__raid_8c_a582a2f56fe635a9f1d2783b9342126ee}{g\_raid\_create\_volume}}(sc, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{name}}, mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a8e2f258217cfc1983e9d1c54915873b3}{tid}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01273}01273                 pv = malloc(\textcolor{keyword}{sizeof}(*pv), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01274}01274                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}} = i;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01275}01275                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}} = (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} \& \mbox{\hyperlink{md__intel_8c_ac2969a192a713613975d3346b9c498fc}{INTEL\_ST\_CLONE\_N\_GO}}) != 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01276}01276                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af3e25e5e60ce4340c6b6efcb88db9ea9}{pv\_cng\_man\_sync}} = (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} \& \mbox{\hyperlink{md__intel_8c_a50c800af999cd92f37112d3f71a4e532}{INTEL\_ST\_CLONE\_MAN\_SYNC}}) != 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01277}01277                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{cng\_master\_disk}} < mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01278}01278                         pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}} = mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{cng\_master\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01279}01279                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}} = pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01280}01280                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad17bb2da7eadd462f1f27551cb1da76f}{v\_raid\_level\_qualifier}} = \mbox{\hyperlink{g__raid_8h_a9c036957b2fb94761b5fd084e8f991c9}{G\_RAID\_VOLUME\_RLQ\_NONE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01281}01281                 \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} == \mbox{\hyperlink{md__intel_8c_ac4df06f718999bb87f51a911ce0fe8ef}{INTEL\_T\_RAID0}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01282}01282                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01283}01283                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} == \mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{INTEL\_T\_RAID1}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01284}01284                     mmap-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} >= 2 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01285}01285                     mmap-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} <= mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01286}01286                         \textcolor{comment}{/* Assume total\_domains is correct. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01287}01287                         \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} == mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01288}01288                                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01289}01289                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01290}01290                                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01291}01291                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} == \mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{INTEL\_T\_RAID1}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01292}01292                         \textcolor{comment}{/* total\_domains looks wrong. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01293}01293                         \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} <= 2)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01294}01294                                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01295}01295                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01296}01296                                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01297}01297                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mmap-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} == \mbox{\hyperlink{md__intel_8c_ad79ddcabf696e6e7cef2db9d39bdc82b}{INTEL\_T\_RAID5}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01298}01298                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01299}01299                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad17bb2da7eadd462f1f27551cb1da76f}{v\_raid\_level\_qualifier}} = \mbox{\hyperlink{g__raid_8h_a85a42d827015531803abc6df07b15e89}{G\_RAID\_VOLUME\_RLQ\_R5LA}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01300}01300                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01301}01301                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = \mbox{\hyperlink{g__raid_8h_a44d5861b2b013283a9dbff0d3ae791e8}{G\_RAID\_VOLUME\_RL\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01302}01302                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} = (u\_int)mmap-\/>\mbox{\hyperlink{structintel__raid__map_ae130bfc14fe735079259238aaab3e119}{strip\_sectors}} * 512; \textcolor{comment}{//ZZZ}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01303}01303                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} = mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01304}01304                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = (off\_t)mvol-\/>total\_sectors * 512; \textcolor{comment}{//ZZZ}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01305}01305                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af7b9dcf6621dc8d66be12ba187d5f34b}{v\_sectorsize}} = 512; \textcolor{comment}{//ZZZ}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01306}01306                 \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}; j++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01307}01307                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[j];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01308}01308                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} = \mbox{\hyperlink{md__intel_8c_ab9a6536d81b56167b67f8f7eef7e4f28}{intel\_get\_map\_offset}}(mmap) * 512; \textcolor{comment}{//ZZZ}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01309}01309                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} = \mbox{\hyperlink{md__intel_8c_ad8eb07ea0f42b0dee10c372b1037eb5d}{intel\_get\_map\_disk\_sectors}}(mmap) * 512; \textcolor{comment}{//ZZZ}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01310}01310                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01311}01311                 \mbox{\hyperlink{g__raid_8c_a7e6ffb9d11de08e7eaa3e36d1028aa28}{g\_raid\_start\_volume}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01312}01312         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01313}01313 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01314}01314         \textcolor{comment}{/* Create disk placeholders to store data for later writing. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01315}01315         \textcolor{keywordflow}{for} (disk\_pos = 0; disk\_pos < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}}; disk\_pos++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01316}01316                 pd = malloc(\textcolor{keyword}{sizeof}(*pd), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01317}01317                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = disk\_pos;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01318}01318                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}} = meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01319}01319                 \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__raid_8c_a7d896eb1612c17408eedbdda2032e897}{g\_raid\_create\_disk}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01320}01320                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data = (\textcolor{keywordtype}{void} *)pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01321}01321                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_state = \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01322}01322                 \textcolor{keywordflow}{for} (i = 0; i < meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}}; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01323}01323                         mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01324}01324                         mmap = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01325}01325                         \textcolor{keywordflow}{for} (j = 0; j < mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}}; j++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01326}01326                                 \textcolor{keywordflow}{if} ((mmap-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[j] \& \mbox{\hyperlink{md__intel_8c_a03b6328012ec5504a085179c0c55e983}{INTEL\_DI\_IDX}}) == disk\_pos)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01327}01327                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01328}01328                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01329}01329                         \textcolor{keywordflow}{if} (j == mmap-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01330}01330                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01331}01331                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = \mbox{\hyperlink{md__intel_8c_a3647760f14807115b0129293f43dc399}{g\_raid\_md\_intel\_get\_volume}}(sc, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01332}01332                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[j];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01333}01333                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01334}01334                         TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, sd\_next);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01335}01335                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01336}01336         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01337}01337 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01338}01338         \textcolor{comment}{/* Make all disks found till the moment take their places. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01339}01339         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01340}01340                 TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01341}01341                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_ad090f72fa79be3f1a59687ba60f85510}{G\_RAID\_DISK\_S\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01342}01342                                 \mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01343}01343                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01344}01344                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01345}01345                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01346}01346         \} \textcolor{keywordflow}{while} (\mbox{\hyperlink{structdisk}{disk}} != NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01347}01347 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01348}01348         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01349}01349         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(0, sc, \textcolor{stringliteral}{"{}Array started."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01350}01350         \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01351}01351 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01352}01352         \textcolor{comment}{/* Pickup any STALE/SPARE disks to refill array if needed. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01353}01353         \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01354}01354 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01355}01355         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01356}01356                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_ab4cc6f1792faa0f90f83ebf0f7217a9b}{G\_RAID\_VOLUME\_E\_START}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01357}01357                     \mbox{\hyperlink{g__raid_8h_aa6f84af705b9b366dcb0e4aabd807667}{G\_RAID\_EVENT\_VOLUME}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01358}01358         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01359}01359 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01360}01360         callout\_stop(\&mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{mdio\_start\_co}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01361}01361         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}root\_mount\_rel \%p"{}}, mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01362}01362         root\_mount\_rel(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01363}01363         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01364}01364 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01365}01365 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01366}01366 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01367}\mbox{\hyperlink{md__intel_8c_a80fe8764ebf18ac666546f3d419144d3}{01367}} \mbox{\hyperlink{md__intel_8c_a80fe8764ebf18ac666546f3d419144d3}{g\_raid\_md\_intel\_new\_disk}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01368}01368 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01369}01369         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01370}01370         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01371}01371         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01372}01372         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *pdmeta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01373}01373         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01374}01374 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01375}01375         sc = \mbox{\hyperlink{structdisk}{disk}}-\/>d\_softc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01376}01376         md = sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01377}01377         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01378}01378         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01379}01379         pdmeta = pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01380}01380 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01381}01381         if (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01382}01382                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\mbox{\hyperlink{structdisk}{disk}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01383}01383                         \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01384}01384         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01385}01385                 \textcolor{comment}{/* If we haven't started yet -\/ check metadata freshness. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01386}01386                 \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} == NULL ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01387}01387                     ((int32\_t)(pdmeta-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}} -\/ mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}})) > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01388}01388                         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}Newer disk"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01389}01389                         \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} != NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01390}01390                                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01391}01391                         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} = \mbox{\hyperlink{md__intel_8c_a4f1f3bcd5b4af574b486bd8e46ad117e}{intel\_meta\_copy}}(pdmeta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01392}01392                         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}} = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01393}01393                         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{mdio\_disks\_present}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01394}01394                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (pdmeta-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}} == mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01395}01395                         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{mdio\_disks\_present}}++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01396}01396                         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}Matching disk (\%d of \%d up)"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01397}01397                             mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{mdio\_disks\_present}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01398}01398                             mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01399}01399                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01400}01400                         \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}Older disk"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01401}01401                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01402}01402                 \textcolor{comment}{/* If we collected all needed disks -\/ start array. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01403}01403                 \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a179366b6dcc22c9eb5c8443e8bdeaf13}{mdio\_disks\_present}} == mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01404}01404                         \mbox{\hyperlink{md__intel_8c_aca36a5c0885f8c418c0596f8d81f46c7}{g\_raid\_md\_intel\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01405}01405         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01406}01406 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01407}01407 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01408}01408 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01409}\mbox{\hyperlink{md__intel_8c_a7aa9a3f5d20f94d78dc03b45b39f6b19}{01409}} \mbox{\hyperlink{md__intel_8c_a7aa9a3f5d20f94d78dc03b45b39f6b19}{g\_raid\_intel\_go}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01410}01410 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01411}01411         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01412}01412         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01413}01413         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01414}01414 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01415}01415         sc = arg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01416}01416         md = sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01417}01417         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01418}01418         \textcolor{keywordflow}{if} (!mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01419}01419                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(0, sc, \textcolor{stringliteral}{"{}Force array start due to timeout."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01420}01420                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(sc, \mbox{\hyperlink{g__raid_8h_a24e4a89ebdc2516aa17a2d4c804b38a0}{G\_RAID\_NODE\_E\_START}}, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01421}01421         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01422}01422 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01423}01423 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01424}01424 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01425}\mbox{\hyperlink{md__intel_8c_adf956728080ea03cda90a80db4631149}{01425}} \mbox{\hyperlink{md__intel_8c_a4c700d919c8b683239111e5efb866a6b}{g\_raid\_md\_create\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01426}01426     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} **\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01427}01427 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01428}01428         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01429}01429         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01430}01430         \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[16];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01432}01432         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01433}01433         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}} = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_abe647c1b8bf33b2d59ddbbf72407317e}{mdio\_orig\_config\_id}} = arc4random();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01434}01434         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01435}01435         snprintf(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}), \textcolor{stringliteral}{"{}Intel-\/\%08x"{}}, mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01436}01436         sc = \mbox{\hyperlink{g__raid_8c_aee6d4bf64b6c670eda4a8033cb968ae7}{g\_raid\_create\_node}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, md);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01437}01437         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01438}01438                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__md__if_8m_ae3e40a1a8689841d6d6f54a441d53d43}{G\_RAID\_MD\_TASTE\_FAIL}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01439}01439         md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}} = sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01440}01440         *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = sc-\/>\mbox{\hyperlink{structg__raid__softc_aaaffc18ac5f4ad54f823080cf1842943}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01441}01441         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__md__if_8m_aa5340dcca98f524650a3aa3675073120}{G\_RAID\_MD\_TASTE\_NEW}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01442}01442 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01443}01443 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01444}01444 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01445}01445 \textcolor{comment}{ * Return the last N characters of the serial label.  The Linux and}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01446}01446 \textcolor{comment}{ * ataraid(7) code always uses the last 16 characters of the label to}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01447}01447 \textcolor{comment}{ * store into the Intel meta format.  Generalize this to N characters}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01448}01448 \textcolor{comment}{ * since that's easy.  Labels can be up to 20 characters for SATA drives}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01449}01449 \textcolor{comment}{ * and up 251 characters for SAS drives.  Since intel controllers don't}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01450}01450 \textcolor{comment}{ * support SAS drives, just stick with the SATA limits for stack friendliness.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01451}01451 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01452}01452 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01453}\mbox{\hyperlink{md__intel_8c_a1f599651d1c6fbaa40c12f7038e65db1}{01453}} \mbox{\hyperlink{md__intel_8c_a1f599651d1c6fbaa40c12f7038e65db1}{g\_raid\_md\_get\_label}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keywordtype}{char} *serial, \textcolor{keywordtype}{int} serlen)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01454}01454 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01455}01455         \textcolor{keywordtype}{char} serial\_buffer[DISK\_IDENT\_SIZE];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01456}01456         \textcolor{keywordtype}{int} len, error;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01457}01457 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01458}01458         len = \textcolor{keyword}{sizeof}(serial\_buffer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01459}01459         error = \mbox{\hyperlink{geom_8h_a63ec0c10c4635c215416171e7e804d17}{g\_io\_getattr}}(\textcolor{stringliteral}{"{}GEOM::ident"{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&len, serial\_buffer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01460}01460         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01461}01461                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01462}01462         len = strlen(serial\_buffer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01463}01463         \textcolor{keywordflow}{if} (len > serlen)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01464}01464                 len -\/= serlen;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01465}01465         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01466}01466                 len = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01467}01467         strncpy(serial, serial\_buffer + len, serlen);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01468}01468         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01469}01469 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01470}01470 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01471}01471 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01472}\mbox{\hyperlink{md__intel_8c_a86818ef290d8e5fdc1dd5652854fe0bf}{01472}} \mbox{\hyperlink{md__intel_8c_af48e82d38c970129850e45ad932814b4}{g\_raid\_md\_taste\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01473}01473                               \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} **\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01474}01474 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01475}01475         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *rcp;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01476}01476         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01477}01477         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi, *mdi1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01478}01478         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01479}01479         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01480}01480         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01481}01481         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01482}01482         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *geom;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01483}01483         \textcolor{keywordtype}{int} error, disk\_pos, result, spare, len;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01484}01484         \textcolor{keywordtype}{char} serial[\mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01485}01485         \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[16];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01486}01486         uint16\_t vendor;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01487}01487 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01488}01488         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Tasting Intel on \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01489}01489         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01490}01490         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01491}01491 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01492}01492         \textcolor{comment}{/* Read metadata from device. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01493}01493         meta = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01494}01494         disk\_pos = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01495}01495         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01496}01496         error = \mbox{\hyperlink{md__intel_8c_a1f599651d1c6fbaa40c12f7038e65db1}{g\_raid\_md\_get\_label}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, serial, \textcolor{keyword}{sizeof}(serial));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01497}01497         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01498}01498                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Cannot get serial number from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01499}01499                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01500}01500                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01501}01501         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01502}01502         vendor = 0xffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01503}01503         len = \textcolor{keyword}{sizeof}(vendor);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01504}01504         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_a6e00f814c9e37ee129d5d456d0379576}{rank}} == 1)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01505}01505                 \mbox{\hyperlink{geom_8h_a63ec0c10c4635c215416171e7e804d17}{g\_io\_getattr}}(\textcolor{stringliteral}{"{}GEOM::hba\_vendor"{}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&len, \&vendor);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01506}01506         meta = \mbox{\hyperlink{md__intel_8c_a294cfd6b6eb74d8745b44c2bba6ee6bb}{intel\_meta\_read}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01507}01507         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01508}01508         \textcolor{keywordflow}{if} (meta == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01509}01509                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_afffb01dfa563be86d3c73e5f264c75ce}{g\_raid\_aggressive\_spare}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01510}01510                         \textcolor{keywordflow}{if} (vendor != 0x8086) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01511}01511                                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01512}01512                                     \textcolor{stringliteral}{"{}Intel vendor mismatch 0x\%04x != 0x8086"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01513}01513                                     vendor);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01514}01514                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01515}01515                                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01516}01516                                     \textcolor{stringliteral}{"{}No Intel metadata, forcing spare."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01517}01517                                 spare = 2;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01518}01518                                 \textcolor{keywordflow}{goto} search;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01519}01519                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01520}01520                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01521}01521                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__md__if_8m_ae3e40a1a8689841d6d6f54a441d53d43}{G\_RAID\_MD\_TASTE\_FAIL}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01522}01522         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01523}01523 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01524}01524         \textcolor{comment}{/* Check this disk position in obtained metadata. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01525}01525         disk\_pos = \mbox{\hyperlink{md__intel_8c_a4933d907b210fae0b0d51f52b93d5e19}{intel\_meta\_find\_disk}}(meta, serial);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01526}01526         \textcolor{keywordflow}{if} (disk\_pos < 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01527}01527                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel serial '\%s' not found"{}}, serial);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01528}01528                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01529}01529         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01530}01530         \textcolor{keywordflow}{if} (\mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{intel\_get\_disk\_sectors}}(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos]) !=}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01531}01531             (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}})) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01532}01532                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel size mismatch \%ju != \%ju"{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01533}01533                     \mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{intel\_get\_disk\_sectors}}(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos]),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01534}01534                     (off\_t)(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01535}01535                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01536}01536         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01537}01537 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01538}01538         \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Intel disk position \%d"{}}, disk\_pos);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01539}01539         spare = meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01540}01540 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01541}01541 search:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01542}01542         \textcolor{comment}{/* Search for matching node. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01543}01543         sc = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01544}01544         mdi1 = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01545}01545         LIST\_FOREACH(geom, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01546}01546                 sc = geom-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01547}01547                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01548}01548                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01549}01549                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a92d7a08f5e32fa07a7b8769b5b3ca4f4}{sc\_stopping}} != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01550}01550                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01551}01551                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}}-\/>\mbox{\hyperlink{structg__raid__md__object_ab622ae7b27ee826f1117caaf7fc38f48}{mdo\_class}} != md-\/>\mbox{\hyperlink{structg__raid__md__object_ab622ae7b27ee826f1117caaf7fc38f48}{mdo\_class}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01552}01552                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01553}01553                 mdi1 = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)sc-\/>\mbox{\hyperlink{structg__raid__softc_a5bf7421452e0a324fc4f8b954b57314b}{sc\_md}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01554}01554                 if (spare) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01555}01555                         \textcolor{keywordflow}{if} (mdi1-\/>\mbox{\hyperlink{structg__raid__md__intel__object_ac599ca15b073f682fe775a4478733da2}{mdio\_incomplete}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01556}01556                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01557}01557                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01558}01558                         \textcolor{keywordflow}{if} (mdi1-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}} == meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01559}01559                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01560}01560                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01561}01561         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01562}01562 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01563}01563         \textcolor{comment}{/* Found matching node. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01564}01564         \textcolor{keywordflow}{if} (geom != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01565}01565                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Found matching array \%s"{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01566}01566                 result = \mbox{\hyperlink{g__raid__md__if_8m_a462421bd5367102456b64943db520823}{G\_RAID\_MD\_TASTE\_EXISTING}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01567}01567 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01568}01568         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (spare) \{ \textcolor{comment}{/* Not found needy node -\/-\/ left for later. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01569}01569                 \mbox{\hyperlink{g__raid_8h_a4333fbd8d0899facf171aee7b60697f6}{G\_RAID\_DEBUG}}(1, \textcolor{stringliteral}{"{}Spare is not needed at this time"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01570}01570                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01571}01571 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01572}01572         \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* Not found matching node -\/-\/ create one. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01573}01573                 result = \mbox{\hyperlink{g__raid__md__if_8m_aa5340dcca98f524650a3aa3675073120}{G\_RAID\_MD\_TASTE\_NEW}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01574}01574                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}} = meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01575}01575                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_abe647c1b8bf33b2d59ddbbf72407317e}{mdio\_orig\_config\_id}} = meta-\/>\mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{orig\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01576}01576                 snprintf(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}), \textcolor{stringliteral}{"{}Intel-\/\%08x"{}}, meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01577}01577                 sc = \mbox{\hyperlink{g__raid_8c_aee6d4bf64b6c670eda4a8033cb968ae7}{g\_raid\_create\_node}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, md);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01578}01578                 md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}} = sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01579}01579                 geom = sc-\/>\mbox{\hyperlink{structg__raid__softc_aaaffc18ac5f4ad54f823080cf1842943}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01580}01580                 callout\_init(\&mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{mdio\_start\_co}}, 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01581}01581                 callout\_reset(\&mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{mdio\_start\_co}}, \mbox{\hyperlink{g__raid_8c_afcfadaaafd5305ba6550313e2cac825b}{g\_raid\_start\_timeout}} * hz,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01582}01582                     \mbox{\hyperlink{md__intel_8c_a7aa9a3f5d20f94d78dc03b45b39f6b19}{g\_raid\_intel\_go}}, sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01583}01583                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}} = root\_mount\_hold(\textcolor{stringliteral}{"{}GRAID-\/Intel"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01584}01584                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, sc, \textcolor{stringliteral}{"{}root\_mount\_hold \%p"{}}, mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01585}01585         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01586}01586 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01587}01587         \textcolor{comment}{/* There is no return after this point, so we close passed consumer. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01588}01588         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01589}01589 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01590}01590         rcp = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(geom);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01591}01591         rcp-\/>\mbox{\hyperlink{structg__consumer_acf792357913c0445233b71f8259764d9}{flags}} |= \mbox{\hyperlink{geom_8h_a2184f2512ddb7a67ddbb71409cdd953f}{G\_CF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01592}01592         \mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(rcp, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01593}01593         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(rcp, 1, 1, 1) != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01594}01594                 ; \textcolor{comment}{//goto fail1;}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01595}01595 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01596}01596         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01597}01597         sx\_xlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01599}01599         pd = malloc(\textcolor{keyword}{sizeof}(*pd), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01600}01600         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} = meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01601}01601         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = -\/1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01602}01602         \textcolor{keywordflow}{if} (spare == 2) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01603}01603                 memcpy(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}[0], serial, \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01604}01604                 \mbox{\hyperlink{md__intel_8c_a94db600860339e778f98cd6581bbefcd}{intel\_set\_disk\_sectors}}(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}, }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01605}01605                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01606}01606                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01607}01607                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01608}01608         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01609}01609                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}} = meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[disk\_pos];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01610}01610         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01611}01611         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__raid_8c_a7d896eb1612c17408eedbdda2032e897}{g\_raid\_create\_disk}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01612}01612         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data = (\textcolor{keywordtype}{void} *)pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01613}01613         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = rcp;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01614}01614         rcp-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01615}01615 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01616}01616         \mbox{\hyperlink{g__raid_8c_afbb51abcd221460c50c23ecc69be3114}{g\_raid\_get\_disk\_info}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01617}01617 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01618}01618         \mbox{\hyperlink{md__intel_8c_a80fe8764ebf18ac666546f3d419144d3}{g\_raid\_md\_intel\_new\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01619}01619 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01620}01620         sx\_xunlock(\&sc-\/>\mbox{\hyperlink{structg__raid__softc_a6242ad65da243c1107889ace908799fd}{sc\_lock}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01621}01621         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01622}01622         *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = geom;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01623}01623         \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01624}01624 fail2:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01625}01625         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01626}01626 fail1:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01627}01627         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(meta, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01628}01628         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__raid__md__if_8m_ae3e40a1a8689841d6d6f54a441d53d43}{G\_RAID\_MD\_TASTE\_FAIL}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01629}01629 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01630}01630 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01631}01631 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01632}\mbox{\hyperlink{md__intel_8c_a83000edb9c309eec41ce9c2f9389c218}{01632}} \mbox{\hyperlink{md__intel_8c_a72c0d1fb75493b481fb38f7c4003f709}{g\_raid\_md\_event\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01633}01633     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}}, u\_int \mbox{\hyperlink{g__raid__md__if_8m_a683a43faabf5ffc974caacd425b678d0}{event}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01634}01634 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01635}01635         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01636}01636         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01637}01637         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01638}01638         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01639}01639 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01640}01640         sc = md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01641}01641         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01642}01642         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01643}01643                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{g__raid__md__if_8m_a683a43faabf5ffc974caacd425b678d0}{event}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01644}01644                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_a24e4a89ebdc2516aa17a2d4c804b38a0}{G\_RAID\_NODE\_E\_START}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01645}01645                         \textcolor{keywordflow}{if} (!mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01646}01646                                 \mbox{\hyperlink{md__intel_8c_aca36a5c0885f8c418c0596f8d81f46c7}{g\_raid\_md\_intel\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01647}01647                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01648}01648                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01649}01649                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01650}01650         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01651}01651         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01652}01652         switch (\mbox{\hyperlink{g__raid__md__if_8m_a683a43faabf5ffc974caacd425b678d0}{event}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01653}01653         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__raid_8h_aa6e0d41a9b7f63b694bd95805efd6137}{G\_RAID\_DISK\_E\_DISCONNECTED}}:}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01654}01654                 \textcolor{comment}{/* If disk was assigned, just update statuses. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01655}01655                 \textcolor{keywordflow}{if} (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} >= 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01656}01656                         \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01657}01657                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01658}01658                                 \mbox{\hyperlink{g__raid_8c_abedf322bff3060596a6f822db290b9f3}{g\_raid\_kill\_consumer}}(sc, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01659}01659                                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01660}01660                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01661}01661                         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, sd\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01662}01662                                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01663}01663                                     \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01664}01664                                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_a1323466893d4ab83ea4c87e89e02fd06}{G\_RAID\_SUBDISK\_E\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01665}01665                                     \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01666}01666                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01667}01667                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01668}01668                         \textcolor{comment}{/* Otherwise -\/-\/ delete. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01669}01669                         \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_ad090f72fa79be3f1a59687ba60f85510}{G\_RAID\_DISK\_S\_NONE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01670}01670                         \mbox{\hyperlink{g__raid_8c_ac1e32d950d9354f1dca5d2ca34244adc}{g\_raid\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01671}01671                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01672}01672 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01673}01673                 \textcolor{comment}{/* Write updated metadata to all disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01674}01674                 \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01675}01675 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01676}01676                 \textcolor{comment}{/* Check if anything left except placeholders. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01677}01677                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, -\/1) ==}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01678}01678                     \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01679}01679                         \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01680}01680                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01681}01681                         \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01682}01682                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01683}01683         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01684}01684         \textcolor{keywordflow}{return} (-\/2);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01685}01685 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01686}01686 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01687}01687 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01688}\mbox{\hyperlink{md__intel_8c_a9ef5b9ea45f95b9a0ac7c63afb82355b}{01688}} \mbox{\hyperlink{md__intel_8c_a8cfeace25c57d55d524b3bace0921ce5}{g\_raid\_md\_ctl\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01689}01689     \textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01690}01690 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01691}01691         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01692}01692         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, *vol1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01693}01693         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01694}01694         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01695}01695         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01696}01696         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01697}01697         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01698}01698         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01699}01699         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01700}01700         \textcolor{keywordtype}{char} arg[16], serial[\mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01701}01701         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *nodename, *verb, *volname, *levelname, *diskname;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01702}01702         \textcolor{keywordtype}{char} *tmp;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01703}01703         \textcolor{keywordtype}{int} *nargs, *force;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01704}01704         off\_t off, size, \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, strip, disk\_sectors;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01705}01705         intmax\_t *sizearg, *striparg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01706}01706         \textcolor{keywordtype}{int} numdisks, i, len, level, qual, update;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01707}01707         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01708}01708 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01709}01709         sc = md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01710}01710         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01711}01711         verb = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}verb"{}}, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01712}01712         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01713}01713         error = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01714}01714         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}label"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01715}01715                 \textcolor{keywordflow}{if} (*nargs < 4) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01716}01716                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01717}01717                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01718}01718                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01719}01719                 volname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg1"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01720}01720                 \textcolor{keywordflow}{if} (volname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01721}01721                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No volume name."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01722}01722                         \textcolor{keywordflow}{return} (-\/2);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01723}01723                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01724}01724                 levelname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg2"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01725}01725                 \textcolor{keywordflow}{if} (levelname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01726}01726                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No RAID level."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01727}01727                         \textcolor{keywordflow}{return} (-\/3);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01728}01728                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01729}01729                 \textcolor{keywordflow}{if} (strcasecmp(levelname, \textcolor{stringliteral}{"{}RAID5"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01730}01730                         levelname = \textcolor{stringliteral}{"{}RAID5-\/LA"{}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01731}01731                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_a54f71ba156f1c4128a0c379435d79f3a}{g\_raid\_volume\_str2level}}(levelname, \&level, \&qual)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01732}01732                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown RAID level '\%s'."{}}, levelname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01733}01733                         \textcolor{keywordflow}{return} (-\/4);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01734}01734                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01735}01735                 numdisks = *nargs -\/ 3;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01736}01736                 force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01737}01737                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{md__intel_8c_a7f11a2a796b509acfdbcfa7ecf747006}{g\_raid\_md\_intel\_supported}}(level, qual, numdisks,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01738}01738                     force ? *force : 0)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01739}01739                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unsupported RAID level "{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01740}01740                             \textcolor{stringliteral}{"{}(0x\%02x/0x\%02x), or number of disks (\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01741}01741                             level, qual, numdisks);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01742}01742                         \textcolor{keywordflow}{return} (-\/5);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01743}01743                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01744}01744 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01745}01745                 \textcolor{comment}{/* Search for disks, connect them and probe. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01746}01746                 size = 0x7fffffffffffffffllu;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01747}01747                 sectorsize = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01748}01748                 \textcolor{keywordflow}{for} (i = 0; i < numdisks; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01749}01749                         snprintf(arg, \textcolor{keyword}{sizeof}(arg), \textcolor{stringliteral}{"{}arg\%d"{}}, i + 3);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01750}01750                         diskname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01751}01751                         \textcolor{keywordflow}{if} (diskname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01752}01752                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No disk name (\%s)."{}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01753}01753                                 error = -\/6;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01754}01754                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01755}01755                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01756}01756                         \textcolor{keywordflow}{if} (strcmp(diskname, \textcolor{stringliteral}{"{}NONE"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01757}01757                                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01758}01758                                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01759}01759                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01760}01760                                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01761}01761                                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{g__raid_8c_acc4d5f993651e14eb607d9efe39061c8}{g\_raid\_open\_consumer}}(sc, diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01762}01762                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01763}01763                                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Can't open disk '\%s'."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01764}01764                                             diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01765}01765                                         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01766}01766                                         error = -\/7;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01767}01767                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01768}01768                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01769}01769                                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01770}01770                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01771}01771                         pd = malloc(\textcolor{keyword}{sizeof}(*pd), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01772}01772                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = i;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01773}01773                         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__raid_8c_a7d896eb1612c17408eedbdda2032e897}{g\_raid\_create\_disk}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01774}01774                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data = (\textcolor{keywordtype}{void} *)pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01775}01775                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01776}01776                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01777}01777                                 strcpy(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}[0], \textcolor{stringliteral}{"{}NONE"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01778}01778                                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01779}01779                                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01780}01780                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01781}01781                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01782}01782                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01783}01783                         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01784}01784 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01785}01785                         error = \mbox{\hyperlink{md__intel_8c_a1f599651d1c6fbaa40c12f7038e65db1}{g\_raid\_md\_get\_label}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01786}01786                             \&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}[0], \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01787}01787                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01788}01788                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01789}01789                                     \textcolor{stringliteral}{"{}Can't get serial for provider '\%s'."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01790}01790                                     diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01791}01791                                 error = -\/8;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01792}01792                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01793}01793                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01794}01794 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01795}01795                         \mbox{\hyperlink{g__raid_8c_afbb51abcd221460c50c23ecc69be3114}{g\_raid\_get\_disk\_info}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01796}01796 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01797}01797                         \mbox{\hyperlink{md__intel_8c_a94db600860339e778f98cd6581bbefcd}{intel\_set\_disk\_sectors}}(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01798}01798                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01799}01799                         \textcolor{keywordflow}{if} (size > \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01800}01800                                 size = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01801}01801                         \textcolor{keywordflow}{if} (sectorsize < pp-\/>sectorsize)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01802}01802                                 sectorsize = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01803}01803                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01804}01804                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}} | \mbox{\hyperlink{md__intel_8c_a50621783f4f433678bb190399455d50c}{INTEL\_F\_ONLINE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01805}01805                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01806}01806                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01807}01807                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01808}01808 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01809}01809                 \textcolor{keywordflow}{if} (sectorsize <= 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01810}01810                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Can't get sector size."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01811}01811                         \textcolor{keywordflow}{return} (-\/8);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01812}01812                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01813}01813 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01814}01814                 \textcolor{comment}{/* Reserve some space for metadata. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01815}01815                 size -\/= ((4096 + sectorsize -\/ 1) / sectorsize) * sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01816}01816 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01817}01817                 \textcolor{comment}{/* Handle size argument. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01818}01818                 len = \textcolor{keyword}{sizeof}(*sizearg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01819}01819                 sizearg = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}size"{}}, \&len);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01820}01820                 \textcolor{keywordflow}{if} (sizearg != NULL \&\& len == \textcolor{keyword}{sizeof}(*sizearg) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01821}01821                     *sizearg > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01822}01822                         \textcolor{keywordflow}{if} (*sizearg > size) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01823}01823                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size too big \%lld > \%lld."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01824}01824                                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})*sizearg, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})size);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01825}01825                                 \textcolor{keywordflow}{return} (-\/9);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01826}01826                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01827}01827                         size = *sizearg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01828}01828                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01829}01829 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01830}01830                 \textcolor{comment}{/* Handle strip argument. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01831}01831                 strip = 131072;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01832}01832                 len = \textcolor{keyword}{sizeof}(*striparg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01833}01833                 striparg = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}strip"{}}, \&len);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01834}01834                 \textcolor{keywordflow}{if} (striparg != NULL \&\& len == \textcolor{keyword}{sizeof}(*striparg) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01835}01835                     *striparg > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01836}01836                         \textcolor{keywordflow}{if} (*striparg < sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01837}01837                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Strip size too small."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01838}01838                                 \textcolor{keywordflow}{return} (-\/10);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01839}01839                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01840}01840                         \textcolor{keywordflow}{if} (*striparg \% sectorsize != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01841}01841                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Incorrect strip size."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01842}01842                                 \textcolor{keywordflow}{return} (-\/11);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01843}01843                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01844}01844                         \textcolor{keywordflow}{if} (strip > 65535 * sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01845}01845                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Strip size too big."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01846}01846                                 \textcolor{keywordflow}{return} (-\/12);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01847}01847                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01848}01848                         strip = *striparg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01849}01849                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01850}01850 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01851}01851                 \textcolor{comment}{/* Round size down to strip or sector. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01852}01852                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01853}01853                         size -\/= (size \% sectorsize);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01854}01854                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01855}01855                     (numdisks \& 1) != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01856}01856                         size -\/= (size \% (2 * strip));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01857}01857                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01858}01858                         size -\/= (size \% strip);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01859}01859                 \textcolor{keywordflow}{if} (size <= 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01860}01860                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size too small."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01861}01861                         \textcolor{keywordflow}{return} (-\/13);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01862}01862                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01863}01863 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01864}01864                 \textcolor{comment}{/* We have all we need, create things: volume, ... */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01865}01865                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01866}01866                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = \mbox{\hyperlink{g__raid_8c_a582a2f56fe635a9f1d2783b9342126ee}{g\_raid\_create\_volume}}(sc, volname, -\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01867}01867                 pv = malloc(\textcolor{keyword}{sizeof}(*pv), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01868}01868                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01869}01869                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}} = pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01870}01870                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = level;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01871}01871                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad17bb2da7eadd462f1f27551cb1da76f}{v\_raid\_level\_qualifier}} = qual;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01872}01872                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} = strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01873}01873                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} = numdisks;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01874}01874                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01875}01875                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size * numdisks;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01876}01876                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01877}01877                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01878}01878                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01879}01879                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size * (numdisks -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01880}01880                 \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* RAID1E */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01881}01881                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = ((size * numdisks) / strip / 2) *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01882}01882                             strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01883}01883                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01884}01884                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af7b9dcf6621dc8d66be12ba187d5f34b}{v\_sectorsize}} = sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01885}01885                 \mbox{\hyperlink{g__raid_8c_a7e6ffb9d11de08e7eaa3e36d1028aa28}{g\_raid\_start\_volume}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01886}01886 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01887}01887                 \textcolor{comment}{/* , and subdisks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01888}01888                 TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01889}01889                         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01890}01890                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}}];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01891}01891                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}} = \mbox{\hyperlink{structdisk}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01892}01892                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01893}01893                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} = size;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01894}01894                         TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, sd\_next);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01895}01895                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}}-\/>\mbox{\hyperlink{structg__raid__disk_a830f6bd55251c14ca26a7f8fceb06a89}{d\_consumer}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01896}01896                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01897}01897                                     \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01898}01898                                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01899}01899                                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01900}01900                                             \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01901}01901                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01902}01902                                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01903}01903                                             \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01904}01904                                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_ae59b963d99efabe56d8173f3ad914a07}{G\_RAID\_SUBDISK\_E\_NEW}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01905}01905                                     \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01906}01906                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01907}01907                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01908}01908                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01909}01909                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01910}01910 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01911}01911                 \textcolor{comment}{/* Write metadata based on created entities. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01912}01912                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(0, sc, \textcolor{stringliteral}{"{}Array started."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01913}01913                 \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01914}01914 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01915}01915                 \textcolor{comment}{/* Pickup any STALE/SPARE disks to refill array if needed. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01916}01916                 \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01917}01917 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01918}01918                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_ab4cc6f1792faa0f90f83ebf0f7217a9b}{G\_RAID\_VOLUME\_E\_START}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01919}01919                     \mbox{\hyperlink{g__raid_8h_aa6f84af705b9b366dcb0e4aabd807667}{G\_RAID\_EVENT\_VOLUME}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01920}01920                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01921}01921         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01922}01922         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}add"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01923}01923                 \textcolor{keywordflow}{if} (*nargs != 3) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01924}01924                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01925}01925                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01926}01926                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01927}01927                 volname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg1"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01928}01928                 \textcolor{keywordflow}{if} (volname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01929}01929                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No volume name."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01930}01930                         \textcolor{keywordflow}{return} (-\/2);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01931}01931                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01932}01932                 levelname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg2"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01933}01933                 \textcolor{keywordflow}{if} (levelname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01934}01934                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No RAID level."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01935}01935                         \textcolor{keywordflow}{return} (-\/3);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01936}01936                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01937}01937                 \textcolor{keywordflow}{if} (strcasecmp(levelname, \textcolor{stringliteral}{"{}RAID5"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01938}01938                         levelname = \textcolor{stringliteral}{"{}RAID5-\/LA"{}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01939}01939                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_a54f71ba156f1c4128a0c379435d79f3a}{g\_raid\_volume\_str2level}}(levelname, \&level, \&qual)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01940}01940                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown RAID level '\%s'."{}}, levelname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01941}01941                         \textcolor{keywordflow}{return} (-\/4);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01942}01942                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01943}01943 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01944}01944                 \textcolor{comment}{/* Look for existing volumes. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01945}01945                 i = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01946}01946                 vol1 = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01947}01947                 TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01948}01948                         vol1 = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01949}01949                         i++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01950}01950                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01951}01951                 \textcolor{keywordflow}{if} (i > 1) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01952}01952                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Maximum two volumes supported."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01953}01953                         \textcolor{keywordflow}{return} (-\/6);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01954}01954                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01955}01955                 \textcolor{keywordflow}{if} (vol1 == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01956}01956                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}At least one volume must exist."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01957}01957                         \textcolor{keywordflow}{return} (-\/7);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01958}01958                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01959}01959 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01960}01960                 numdisks = vol1-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01961}01961                 force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01962}01962                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{md__intel_8c_a7f11a2a796b509acfdbcfa7ecf747006}{g\_raid\_md\_intel\_supported}}(level, qual, numdisks,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01963}01963                     force ? *force : 0)) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01964}01964                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unsupported RAID level "{}}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01965}01965                             \textcolor{stringliteral}{"{}(0x\%02x/0x\%02x), or number of disks (\%d)."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01966}01966                             level, qual, numdisks);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01967}01967                         \textcolor{keywordflow}{return} (-\/5);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01968}01968                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01969}01969 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01970}01970                 \textcolor{comment}{/* Collect info about present disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01971}01971                 size = 0x7fffffffffffffffllu;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01972}01972                 sectorsize = 512;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01973}01973                 \textcolor{keywordflow}{for} (i = 0; i < numdisks; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01974}01974                         \mbox{\hyperlink{structdisk}{disk}} = vol1-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[i].\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01975}01975                         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01976}01976                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01977}01977                         disk\_sectors = }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01978}01978                             \mbox{\hyperlink{md__intel_8c_a0489b03cf2e2fcd0e1c451938c16b6eb}{intel\_get\_disk\_sectors}}(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01979}01979 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01980}01980                         \textcolor{keywordflow}{if} (disk\_sectors * 512 < size)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01981}01981                                 size = disk\_sectors * 512;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01982}01982                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01983}01983                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider != NULL \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01984}01984                             \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>sectorsize >}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01985}01985                              sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01986}01986                                 sectorsize =}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01987}01987                                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01988}01988                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01989}01989                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01990}01990 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01991}01991                 \textcolor{comment}{/* Reserve some space for metadata. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01992}01992                 size -\/= ((4096 + sectorsize -\/ 1) / sectorsize) * sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01993}01993 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01994}01994                 \textcolor{comment}{/* Decide insert before or after. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01995}01995                 \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&vol1-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[0];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01996}01996                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} >}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01997}01997                     size -\/ (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} + \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}})) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01998}01998                         off = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l01999}01999                         size = \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02000}02000                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02001}02001                         off = \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} + \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02002}02002                         size = size -\/ (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} + \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02003}02003                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02004}02004 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02005}02005                 \textcolor{comment}{/* Handle strip argument. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02006}02006                 strip = 131072;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02007}02007                 len = \textcolor{keyword}{sizeof}(*striparg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02008}02008                 striparg = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}strip"{}}, \&len);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02009}02009                 \textcolor{keywordflow}{if} (striparg != NULL \&\& len == \textcolor{keyword}{sizeof}(*striparg) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02010}02010                     *striparg > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02011}02011                         \textcolor{keywordflow}{if} (*striparg < sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02012}02012                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Strip size too small."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02013}02013                                 \textcolor{keywordflow}{return} (-\/10);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02014}02014                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02015}02015                         \textcolor{keywordflow}{if} (*striparg \% sectorsize != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02016}02016                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Incorrect strip size."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02017}02017                                 \textcolor{keywordflow}{return} (-\/11);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02018}02018                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02019}02019                         \textcolor{keywordflow}{if} (strip > 65535 * sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02020}02020                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Strip size too big."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02021}02021                                 \textcolor{keywordflow}{return} (-\/12);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02022}02022                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02023}02023                         strip = *striparg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02024}02024                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02025}02025 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02026}02026                 \textcolor{comment}{/* Round offset up to strip. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02027}02027                 \textcolor{keywordflow}{if} (off \% strip != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02028}02028                         size -\/= strip -\/ off \% strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02029}02029                         off += strip -\/ off \% strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02030}02030                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02031}02031 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02032}02032                 \textcolor{comment}{/* Handle size argument. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02033}02033                 len = \textcolor{keyword}{sizeof}(*sizearg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02034}02034                 sizearg = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}size"{}}, \&len);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02035}02035                 \textcolor{keywordflow}{if} (sizearg != NULL \&\& len == \textcolor{keyword}{sizeof}(*sizearg) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02036}02036                     *sizearg > 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02037}02037                         \textcolor{keywordflow}{if} (*sizearg > size) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02038}02038                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size too big \%lld > \%lld."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02039}02039                                     (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})*sizearg, (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})size);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02040}02040                                 \textcolor{keywordflow}{return} (-\/9);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02041}02041                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02042}02042                         size = *sizearg;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02043}02043                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02044}02044 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02045}02045                 \textcolor{comment}{/* Round size down to strip or sector. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02046}02046                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02047}02047                         size -\/= (size \% sectorsize);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02048}02048                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02049}02049                         size -\/= (size \% strip);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02050}02050                 \textcolor{keywordflow}{if} (size <= 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02051}02051                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size too small."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02052}02052                         \textcolor{keywordflow}{return} (-\/13);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02053}02053                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02054}02054                 \textcolor{keywordflow}{if} (size > 0xffffffffllu * sectorsize) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02055}02055                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Size too big."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02056}02056                         \textcolor{keywordflow}{return} (-\/14);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02057}02057                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02058}02058 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02059}02059                 \textcolor{comment}{/* We have all we need, create things: volume, ... */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02060}02060                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} = \mbox{\hyperlink{g__raid_8c_a582a2f56fe635a9f1d2783b9342126ee}{g\_raid\_create\_volume}}(sc, volname, -\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02061}02061                 pv = malloc(\textcolor{keyword}{sizeof}(*pv), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02062}02062                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}} = i;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02063}02063                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}} = pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02064}02064                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} = level;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02065}02065                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad17bb2da7eadd462f1f27551cb1da76f}{v\_raid\_level\_qualifier}} = qual;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02066}02066                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} = strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02067}02067                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} = numdisks;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02068}02068                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02069}02069                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size * numdisks;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02070}02070                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02071}02071                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02072}02072                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02073}02073                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = size * (numdisks -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02074}02074                 \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* RAID1E */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02075}02075                         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} = ((size * numdisks) / strip / 2) *}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02076}02076                             strip;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02077}02077                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02078}02078                 \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af7b9dcf6621dc8d66be12ba187d5f34b}{v\_sectorsize}} = sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02079}02079                 \mbox{\hyperlink{g__raid_8c_a7e6ffb9d11de08e7eaa3e36d1028aa28}{g\_raid\_start\_volume}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02081}02081                 \textcolor{comment}{/* , and subdisks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02082}02082                 \textcolor{keywordflow}{for} (i = 0; i < numdisks; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02083}02083                         \mbox{\hyperlink{structdisk}{disk}} = vol1-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[i].\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02084}02084                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[i];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02085}02085                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02086}02086                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} = off;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02087}02087                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} = size;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02088}02088                         TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, sd\_next);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02089}02089                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02090}02090                                 \textcolor{keywordflow}{if} (level == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02091}02091                                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02092}02092                                             \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02093}02093                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02094}02094                                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02095}02095                                             \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02096}02096                                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_ae59b963d99efabe56d8173f3ad914a07}{G\_RAID\_SUBDISK\_E\_NEW}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02097}02097                                     \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02098}02098                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02099}02099                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02100}02100 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02101}02101                 \textcolor{comment}{/* Write metadata based on created entities. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02102}02102                 \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02103}02103 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02104}02104                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_ab4cc6f1792faa0f90f83ebf0f7217a9b}{G\_RAID\_VOLUME\_E\_START}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02105}02105                     \mbox{\hyperlink{g__raid_8h_aa6f84af705b9b366dcb0e4aabd807667}{G\_RAID\_EVENT\_VOLUME}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02106}02106                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02107}02107         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02108}02108         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}delete"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02109}02109                 nodename = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02110}02110                 \textcolor{keywordflow}{if} (nodename != NULL \&\& strcasecmp(sc-\/>sc\_name, nodename) != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02111}02111                         nodename = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02112}02112 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02113}02113                 \textcolor{comment}{/* Full node destruction. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02114}02114                 \textcolor{keywordflow}{if} (*nargs == 1 \&\& nodename != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02115}02115                         \textcolor{comment}{/* Check if some volume is still open. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02116}02116                         force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02117}02117                         \textcolor{keywordflow}{if} (force != NULL \&\& *force == 0 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02118}02118                             \mbox{\hyperlink{g__raid_8c_a58ee15b5e8995450f68f052f5fe277bd}{g\_raid\_nopens}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02119}02119                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Some volume is still open."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02120}02120                                 \textcolor{keywordflow}{return} (-\/4);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02121}02121                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02122}02122 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02123}02123                         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02124}02124                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02125}02125                                         \mbox{\hyperlink{md__intel_8c_a57b48f3413ef41715933575fd6ec0279}{intel\_meta\_erase}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02126}02126                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02127}02127                         \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02128}02128                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02129}02129                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02130}02130 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02131}02131                 \textcolor{comment}{/* Destroy specified volume. If it was last -\/ all node. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02132}02132                 \textcolor{keywordflow}{if} (*nargs > 2) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02133}02133                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02134}02134                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02135}02135                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02136}02136                 volname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02137}02137                     nodename != NULL ? \textcolor{stringliteral}{"{}arg1"{}} : \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02138}02138                 \textcolor{keywordflow}{if} (volname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02139}02139                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No volume name."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02140}02140                         \textcolor{keywordflow}{return} (-\/2);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02141}02141                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02142}02142 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02143}02143                 \textcolor{comment}{/* Search for volume. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02144}02144                 TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02145}02145                         \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_abdedb24b3ca3f4d3020f94e62d63fa05}{v\_name}}, volname) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02146}02146                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02147}02147                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a633aac264a87a0cc71846e28693c945e}{v\_provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02148}02148                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02149}02149                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02150}02150                         \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, volname) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02151}02151                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02152}02152                         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \textcolor{stringliteral}{"{}raid/"{}}, 5) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02153}02153                             strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}} + 5, volname) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02154}02154                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02155}02155                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02156}02156                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02157}02157                         i = strtol(volname, \&tmp, 10);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02158}02158                         \textcolor{keywordflow}{if} (verb != volname \&\& tmp[0] == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02159}02159                                 TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02160}02160                                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af90545cbb7240d2f2376df5fcae3b6fa}{v\_global\_id}} == i)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02161}02161                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02162}02162                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02163}02163                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02164}02164                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02165}02165                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02166}02166                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Volume '\%s' not found."{}}, volname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02167}02167                         \textcolor{keywordflow}{return} (-\/3);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02168}02168                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02169}02169 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02170}02170                 \textcolor{comment}{/* Check if volume is still open. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02171}02171                 force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02172}02172                 \textcolor{keywordflow}{if} (force != NULL \&\& *force == 0 \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02173}02173                     \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a0b8a2a2e8d624f55afca59f2f33f3979}{v\_provider\_open}} != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02174}02174                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Volume is still open."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02175}02175                         \textcolor{keywordflow}{return} (-\/4);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02176}02176                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02177}02177 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02178}02178                 \textcolor{comment}{/* Destroy volume and potentially node. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02179}02179                 i = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02180}02180                 TAILQ\_FOREACH(vol1, \&sc-\/>sc\_volumes, v\_next)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02181}02181                         i++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02182}02182                 \textcolor{keywordflow}{if} (i >= 2) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02183}02183                         \mbox{\hyperlink{g__raid_8c_ab2c6132332d0e91db0d7402a150d7716}{g\_raid\_destroy\_volume}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02184}02184                         \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02185}02185                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02186}02186                         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02187}02187                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02188}02188                                         \mbox{\hyperlink{md__intel_8c_a57b48f3413ef41715933575fd6ec0279}{intel\_meta\_erase}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02189}02189                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02190}02190                         \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02191}02191                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02192}02192                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02193}02193         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02194}02194         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}remove"{}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02195}02195             strcmp(verb, \textcolor{stringliteral}{"{}fail"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02196}02196                 \textcolor{keywordflow}{if} (*nargs < 2) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02197}02197                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02198}02198                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02199}02199                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02200}02200                 \textcolor{keywordflow}{for} (i = 1; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02201}02201                         snprintf(arg, \textcolor{keyword}{sizeof}(arg), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02202}02202                         diskname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02203}02203                         \textcolor{keywordflow}{if} (diskname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02204}02204                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No disk name (\%s)."{}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02205}02205                                 error = -\/2;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02206}02206                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02207}02207                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02208}02208                         \textcolor{keywordflow}{if} (strncmp(diskname, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, 5) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02209}02209                                 diskname += 5;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02210}02210 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02211}02211                         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02212}02212                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer != NULL \&\& }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02213}02213                                     \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider != NULL \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02214}02214                                     strcmp(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer-\/>provider-\/>name,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02215}02215                                      diskname) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02216}02216                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02217}02217                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02218}02218                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02219}02219                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Disk '\%s' not found."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02220}02220                                     diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02221}02221                                 error = -\/3;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02222}02222                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02223}02223                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02224}02224 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02225}02225                         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}fail"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02226}02226                                 \mbox{\hyperlink{md__intel_8c_a8405606d7917dfc05fda829e97c8d3d2}{g\_raid\_md\_fail\_disk\_intel}}(md, NULL, \mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02227}02227                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02228}02228                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02229}02229 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02230}02230                         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02231}02231 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02232}02232                         \textcolor{comment}{/* Erase metadata on deleting disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02233}02233                         \mbox{\hyperlink{md__intel_8c_a57b48f3413ef41715933575fd6ec0279}{intel\_meta\_erase}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02234}02234 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02235}02235                         \textcolor{comment}{/* If disk was assigned, just update statuses. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02236}02236                         \textcolor{keywordflow}{if} (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} >= 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02237}02237                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02238}02238                                 \mbox{\hyperlink{g__raid_8c_abedf322bff3060596a6f822db290b9f3}{g\_raid\_kill\_consumer}}(sc, \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02239}02239                                 \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02240}02240                                 TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&\mbox{\hyperlink{structdisk}{disk}}-\/>d\_subdisks, sd\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02241}02241                                         \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02242}02242                                             \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02243}02243                                         \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_a1323466893d4ab83ea4c87e89e02fd06}{G\_RAID\_SUBDISK\_E\_DISCONNECTED}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02244}02244                                             \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02245}02245                                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02246}02246                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02247}02247                                 \textcolor{comment}{/* Otherwise -\/-\/ delete. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02248}02248                                 \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(\mbox{\hyperlink{structdisk}{disk}}, \mbox{\hyperlink{g__raid_8h_ad090f72fa79be3f1a59687ba60f85510}{G\_RAID\_DISK\_S\_NONE}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02249}02249                                 \mbox{\hyperlink{g__raid_8c_ac1e32d950d9354f1dca5d2ca34244adc}{g\_raid\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02250}02250                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02251}02251                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02252}02252 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02253}02253                 \textcolor{comment}{/* Write updated metadata to remaining disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02254}02254                 \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02255}02255 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02256}02256                 \textcolor{comment}{/* Check if anything left except placeholders. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02257}02257                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, -\/1) ==}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02258}02258                     \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02259}02259                         \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02260}02260                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02261}02261                         \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02262}02262                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02263}02263         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02264}02264         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}insert"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02265}02265                 \textcolor{keywordflow}{if} (*nargs < 2) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02266}02266                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02267}02267                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02268}02268                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02269}02269                 update = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02270}02270                 \textcolor{keywordflow}{for} (i = 1; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02271}02271                         \textcolor{comment}{/* Get disk name. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02272}02272                         snprintf(arg, \textcolor{keyword}{sizeof}(arg), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02273}02273                         diskname = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02274}02274                         \textcolor{keywordflow}{if} (diskname == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02275}02275                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No disk name (\%s)."{}}, arg);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02276}02276                                 error = -\/3;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02277}02277                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02278}02278                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02279}02279 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02280}02280                         \textcolor{comment}{/* Try to find provider with specified name. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02281}02281                         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02282}02282                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{g__raid_8c_acc4d5f993651e14eb607d9efe39061c8}{g\_raid\_open\_consumer}}(sc, diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02283}02283                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02284}02284                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Can't open disk '\%s'."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02285}02285                                     diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02286}02286                                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02287}02287                                 error = -\/4;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02288}02288                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02289}02289                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02290}02290                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02291}02291                         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02292}02292 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02293}02293                         \textcolor{comment}{/* Read disk serial. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02294}02294                         error = \mbox{\hyperlink{md__intel_8c_a1f599651d1c6fbaa40c12f7038e65db1}{g\_raid\_md\_get\_label}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02295}02295                             \&serial[0], \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02296}02296                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02297}02297                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02298}02298                                     \textcolor{stringliteral}{"{}Can't get serial for provider '\%s'."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02299}02299                                     diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02300}02300                                 \mbox{\hyperlink{g__raid_8c_abedf322bff3060596a6f822db290b9f3}{g\_raid\_kill\_consumer}}(sc, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02301}02301                                 error = -\/7;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02302}02302                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02303}02303                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02304}02304 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02305}02305                         pd = malloc(\textcolor{keyword}{sizeof}(*pd), M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02306}02306                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} = -\/1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02307}02307 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02308}02308                         \mbox{\hyperlink{structdisk}{disk}} = \mbox{\hyperlink{g__raid_8c_a7d896eb1612c17408eedbdda2032e897}{g\_raid\_create\_disk}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02309}02309                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02310}02310                         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data = (\textcolor{keywordtype}{void} *)pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02311}02311                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a11273c1281d0cffbc3383eb4e49e7010}{private}} = \mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02312}02312 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02313}02313                         \mbox{\hyperlink{g__raid_8c_afbb51abcd221460c50c23ecc69be3114}{g\_raid\_get\_disk\_info}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02314}02314 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02315}02315                         memcpy(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}}[0], \&serial[0],}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02316}02316                             \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02317}02317                         \mbox{\hyperlink{md__intel_8c_a94db600860339e778f98cd6581bbefcd}{intel\_set\_disk\_sectors}}(\&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02318}02318                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02319}02319                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02320}02320                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_a27c34d21d917bf2f77b79abdfa107e87}{INTEL\_F\_SPARE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02321}02321 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02322}02322                         \textcolor{comment}{/* Welcome the "{}new"{} disk. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02323}02323                         update += \mbox{\hyperlink{md__intel_8c_a2cab21dd4abcd285a1e3bfa513e61f17}{g\_raid\_md\_intel\_start\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02324}02324                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a53208a3eca6d67917c6fdf6321292c99}{G\_RAID\_DISK\_S\_SPARE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02325}02325                                 \mbox{\hyperlink{md__intel_8c_acaff5a8054fe5ef04a40706cc09a0b41}{intel\_meta\_write\_spare}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02326}02326                                 \mbox{\hyperlink{g__raid_8c_ac1e32d950d9354f1dca5d2ca34244adc}{g\_raid\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02327}02327                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02328}02328                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Disk '\%s' doesn't fit."{}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02329}02329                                     diskname);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02330}02330                                 \mbox{\hyperlink{g__raid_8c_ac1e32d950d9354f1dca5d2ca34244adc}{g\_raid\_destroy\_disk}}(\mbox{\hyperlink{structdisk}{disk}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02331}02331                                 error = -\/8;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02332}02332                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02333}02333                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02334}02334                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02335}02335 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02336}02336                 \textcolor{comment}{/* Write new metadata if we changed something. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02337}02337                 \textcolor{keywordflow}{if} (update)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02338}02338                         \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02339}02339                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02340}02340         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02341}02341         \textcolor{keywordflow}{return} (-\/100);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02342}02342 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02343}02343 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02344}02344 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02345}\mbox{\hyperlink{md__intel_8c_a31dbe322c53248080d216d147a6f297b}{02345}} \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *tvol,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02346}02346     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *tsd, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *tdisk)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02347}02347 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02348}02348         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02349}02349         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02350}02350         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02351}02351         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{g__raid__md__if_8m_a9508e997a57ea259d6ecc0e563261993}{disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02352}02352         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02353}02353         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02354}02354         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02355}02355         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__conf}{intel\_raid\_conf}} *meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02356}02356         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__vol}{intel\_raid\_vol}} *mvol;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02357}02357         \textcolor{keyword}{struct }\mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}} *mmap0, *mmap1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02358}02358         off\_t sectorsize = 512, pos;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02359}02359         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *version, *cv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02360}02360         \textcolor{keywordtype}{int} vi, sdi, numdisks, len, state, stale;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02361}02361 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02362}02362         sc = md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02363}02363         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02364}02364 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02365}02365         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__raid__softc_a92d7a08f5e32fa07a7b8769b5b3ca4f4}{sc\_stopping}} == \mbox{\hyperlink{g__raid_8h_ae019bb639a31951ab4cf8dad7f68e46a}{G\_RAID\_DESTROY\_HARD}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02366}02366                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02367}02367 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02368}02368         \textcolor{comment}{/* Bump generation. Newly written metadata may differ from previous. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02369}02369         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}}++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02370}02370 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02371}02371         \textcolor{comment}{/* Count number of disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02372}02372         numdisks = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02373}02373         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02374}02374                 pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02375}02375                 if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} < 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02376}02376                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02377}02377                 numdisks++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02378}02378                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02379}02379                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} =}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02380}02380                             \mbox{\hyperlink{md__intel_8c_a50621783f4f433678bb190399455d50c}{INTEL\_F\_ONLINE}} | \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02381}02381                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a2135c7d2f628dbf559cad6d4ea1b5c8f}{G\_RAID\_DISK\_S\_FAILED}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02382}02382                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}} |}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02383}02383                             \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02384}02384                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state == \mbox{\hyperlink{g__raid_8h_a6bb28014fbb4222deac383a188d399af}{G\_RAID\_DISK\_S\_DISABLED}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02385}02385                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}} |}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02386}02386                             \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}} | \mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{INTEL\_F\_DISABLED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02387}02387                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02388}02388                         \textcolor{keywordflow}{if} (!(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} \& \mbox{\hyperlink{md__intel_8c_a25112a7eb150b6d060671f807d759c98}{INTEL\_F\_DISABLED}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02389}02389                                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_a85171ec13ae3bab27fe6eac19c1ab872}{INTEL\_F\_ASSIGNED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02390}02390                         if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} != 0xffffffff) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02391}02391                                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a13f695a5de6b1021e4e91601315f112c}{id}} = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02392}02392                                 len = strlen(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02393}02393                                 len = min(len, \mbox{\hyperlink{md__intel_8c_a5dbcd36b9464b2422265a9366a758c03}{INTEL\_SERIAL\_LEN}} -\/ 3);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02394}02394                                 strcpy(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_ab6756bc413783deda277da20251ac9e3}{serial}} + len, \textcolor{stringliteral}{"{}:0"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02395}02395                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02396}02396                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02397}02397         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02398}02398 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02399}02399         \textcolor{comment}{/* Fill anchor and disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02400}02400         meta = malloc(\mbox{\hyperlink{md__intel_8c_ac5dfd242ca795b9520139f7c78ba9ba3}{INTEL\_MAX\_MD\_SIZE}}(numdisks),}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02401}02401             M\_MD\_INTEL, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02402}02402         memcpy(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_ae1a1aca6a1b820d2b42a3e30d6076024}{intel\_id}}[0], \mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{md__intel_8c_a6134af974a82b80c2de8f9f3173d4beb}{INTEL\_MAGIC}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02403}02403         meta-\/>\mbox{\hyperlink{structintel__raid__conf_ad2dd9168c65fe5139ae242b1a09070a0}{config\_size}} = \mbox{\hyperlink{md__intel_8c_ac5dfd242ca795b9520139f7c78ba9ba3}{INTEL\_MAX\_MD\_SIZE}}(numdisks);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02404}02404         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aed254e95a41e86df26e6fdc98659ebc7}{config\_id}} = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a4a79465f4dbb4bd10323ac0545c37551}{mdio\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02405}02405         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a98c19ec2cd4c63f2e6e5c632893617bc}{orig\_config\_id}} = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_abe647c1b8bf33b2d59ddbbf72407317e}{mdio\_orig\_config\_id}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02406}02406         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a77c2831fd608862542480b49aad5793d}{generation}} = mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a229e60963274c7467d2d922271e88dd9}{mdio\_generation}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02407}02407         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} = \mbox{\hyperlink{md__intel_8c_a7cc833bdb461059dfc9609e1412f18f8}{INTEL\_ATTR\_CHECKSUM}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02408}02408         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a34985feda17343ab30c923c4b9c29975}{total\_disks}} = numdisks;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02409}02409         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02410}02410                 pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02411}02411                 if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} < 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02412}02412                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02413}02413                 meta-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}}] = pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02414}02414                 \textcolor{keywordflow}{if} (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a9d460a5088142d9edd91cc93088798d8}{sectors\_hi}} != 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02415}02415                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_ac946395e8cb77d6cb5833ddb8cd23547}{INTEL\_ATTR\_2TB\_DISK}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02416}02416         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02417}02417 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02418}02418         \textcolor{comment}{/* Fill volumes and maps. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02419}02419         vi = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02420}02420         version = \mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{INTEL\_VERSION\_1000}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02421}02421         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \&sc-\/>sc\_volumes, v\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02422}02422                 pv = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02423}02423                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a61fb0849390a6916c173c37a9653dada}{v\_stopping}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02424}02424                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02425}02425                 mvol = \mbox{\hyperlink{md__intel_8c_a4291a7480582bdaa41fccea6ca9fcce9}{intel\_get\_volume}}(meta, vi);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02426}02426 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02427}02427                 \textcolor{comment}{/* New metadata may have different volumes order. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02428}02428                 pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a6443133f73cecfb3202cda4043a35b42}{pv\_volume\_pos}} = vi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02429}02429 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02430}02430                 \textcolor{keywordflow}{for} (sdi = 0; sdi < \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}; sdi++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02431}02431                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[sdi];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02432}02432                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}} != NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02433}02433                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02434}02434                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02435}02435                 \textcolor{keywordflow}{if} (sdi >= \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02436}02436                         panic(\textcolor{stringliteral}{"{}No any filled subdisk in volume"{}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02437}02437                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} >= 0x20000000000llu)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02438}02438                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_a2062e8ed0a3a26647030e6ae433d63b4}{INTEL\_ATTR\_2TB}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02439}02439                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02440}02440                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_a793f95843c5b3fa47361b3d5c4924267}{INTEL\_ATTR\_RAID0}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02441}02441                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02442}02442                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_aa931e3ea517f26febe21903ed947e246}{INTEL\_ATTR\_RAID1}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02443}02443                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02444}02444                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_a42c69c1879ad2ea5fe45674f3cbb7a53}{INTEL\_ATTR\_RAID5}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02445}02445                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} \& 1) == 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02446}02446                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_a412d7782b319b432acfdc67a43212804}{INTEL\_ATTR\_RAID10}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02447}02447                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02448}02448                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_ab7ee1db42c0ae1699f5cd7a9bea39241}{INTEL\_ATTR\_RAID1E}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02449}02449                 \textcolor{keywordflow}{if} (pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02450}02450                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_a1b48d3bbfc8893e7931f3b8236800af2}{INTEL\_ATTR\_RAIDCNG}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02451}02451                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} > 131072)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02452}02452                         meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} |= \mbox{\hyperlink{md__intel_8c_abb4bd527c6e2977e724adb9b2e40c682}{INTEL\_ATTR\_EXT\_STRIP}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02453}02453 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02454}02454                 \textcolor{keywordflow}{if} (pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02455}02455                         cv = \mbox{\hyperlink{md__intel_8c_ae1d0beafe81a641b3352857d03143dde}{INTEL\_VERSION\_1206}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02456}02456                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} > 4)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02457}02457                         cv = \mbox{\hyperlink{md__intel_8c_a945ec2e3b04a64eb95d0cc8a83a9e432}{INTEL\_VERSION\_1204}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02458}02458                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_af6db015b03ea390243f2df897eb1189d}{G\_RAID\_VOLUME\_RL\_RAID5}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02459}02459                         cv = \mbox{\hyperlink{md__intel_8c_a50fcc74af8d6cc15e98f981247562974}{INTEL\_VERSION\_1202}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02460}02460                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}} > 2)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02461}02461                         cv = \mbox{\hyperlink{md__intel_8c_aa28c3f49476c25464eef3aa8795370bc}{INTEL\_VERSION\_1201}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02462}02462                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02463}02463                         cv = \mbox{\hyperlink{md__intel_8c_aece1525dc52f553c9cf6ea2a78c353cb}{INTEL\_VERSION\_1100}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02464}02464                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02465}02465                         cv = \mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{INTEL\_VERSION\_1000}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02466}02466                 \textcolor{keywordflow}{if} (strcmp(cv, version) > 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02467}02467                         version = cv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02468}02468 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02469}02469                 strlcpy(\&mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{name}}[0], \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_abdedb24b3ca3f4d3020f94e62d63fa05}{v\_name}}, \textcolor{keyword}{sizeof}(mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a564fb27d3c3740a25a94e9fc34a47dba}{name}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02470}02470                 mvol-\/>total\_sectors = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ad81a0903c26424634b555fa29c0cd400}{v\_mediasize}} / sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02471}02471                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} = (\mbox{\hyperlink{md__intel_8c_aa9d6b96beb1f964dae3daac1293d1987}{INTEL\_ST\_READ\_COALESCING}} |}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02472}02472                     \mbox{\hyperlink{md__intel_8c_ae77c23bb034f4cfa8b301eef9726943d}{INTEL\_ST\_WRITE\_COALESCING}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02473}02473                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a8e2f258217cfc1983e9d1c54915873b3}{tid}} = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af90545cbb7240d2f2376df5fcae3b6fa}{v\_global\_id}} + 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02474}02474                 \textcolor{keywordflow}{if} (pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af46b6938bde926aa228bfe398703740a}{pv\_cng}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02475}02475                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} |= \mbox{\hyperlink{md__intel_8c_ac2969a192a713613975d3346b9c498fc}{INTEL\_ST\_CLONE\_N\_GO}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02476}02476                         \textcolor{keywordflow}{if} (pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_af3e25e5e60ce4340c6b6efcb88db9ea9}{pv\_cng\_man\_sync}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02477}02477                                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} |= \mbox{\hyperlink{md__intel_8c_a50c800af999cd92f37112d3f71a4e532}{INTEL\_ST\_CLONE\_MAN\_SYNC}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02478}02478                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a09b2421eb0e1bed4a5c1569c2bf246a8}{cng\_master\_disk}} = pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02479}02479                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[pv-\/>\mbox{\hyperlink{structg__raid__md__intel__pervolume_a659b3ae71c45fbda6b9d69d675831022}{pv\_cng\_master\_disk}}].\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} ==}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02480}02480                             \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02481}02481                                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}} = \mbox{\hyperlink{md__intel_8c_a0c64803dc30fa13cae2a1617d67e5017}{INTEL\_CNGST\_MASTER\_MISSING}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02482}02482                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} != \mbox{\hyperlink{g__raid_8h_a20afd300edb0e3cdbfb0386d2fbb36c3}{G\_RAID\_VOLUME\_S\_OPTIMAL}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02483}02483                                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}} = \mbox{\hyperlink{md__intel_8c_a6763a442a1140d7613a65fa3e1d9d880}{INTEL\_CNGST\_NEEDS\_UPDATE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02484}02484                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02485}02485                                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_ae3c3f9a6cc8a55aa288f14bab7b8c557}{cng\_state}} = \mbox{\hyperlink{md__intel_8c_a89bf82a4ee6d13c266f728292bcc29e4}{INTEL\_CNGST\_UPDATED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02486}02486                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02487}02487 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02488}02488                 \textcolor{comment}{/* Check for any recovery in progress. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02489}02489                 state = \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02490}02490                 pos = 0x7fffffffffffffffllu;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02491}02491                 stale = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02492}02492                 \textcolor{keywordflow}{for} (sdi = 0; sdi < \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}; sdi++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02493}02493                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[sdi];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02494}02494                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02495}02495                                 state = \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02496}02496                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02497}02497                             state != \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02498}02498                                 state = \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02499}02499                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a41bff35bee21218d2aba7a261eb2e83c}{G\_RAID\_SUBDISK\_S\_STALE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02500}02500                                 stale = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02501}02501                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02502}02502                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}}) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02503}02503                              \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}} < pos)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02504}02504                                 pos = \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_aca58c7c621e10d2cbe97cd1c87214d7b}{sd\_rebuild\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02505}02505                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02506}02506                 \textcolor{keywordflow}{if} (state == \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02507}02507                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02508}02508                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} = \mbox{\hyperlink{md__intel_8c_acf2f6b332ae8e850f983775f34b82588}{INTEL\_MT\_REBUILD}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02509}02509                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (state == \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02510}02510                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02511}02511                         \textcolor{comment}{/* mvol-\/>migr\_type = INTEL\_MT\_REPAIR; */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02512}02512                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a790f777e65e58ca5908a0f7bcb9418ca}{migr\_type}} = \mbox{\hyperlink{md__intel_8c_ad61ff49ce32f04b0f816bd7bd2c9028e}{INTEL\_MT\_VERIFY}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02513}02513                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_adaf6235d4582e44ef250d84f4289b4c8}{state}} |= \mbox{\hyperlink{md__intel_8c_a8eb8c2ac9022ddcbea5ae2faf1c9db29}{INTEL\_ST\_VERIFY\_AND\_FIX}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02514}02514                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02515}02515                         mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02516}02516                 mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a1744ce04869cc07221bef931f6bacaf8}{dirty}} = (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1c672df93d899cfd72dc0f9b1f4e7139}{v\_dirty}} || stale);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02517}02517 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02518}02518                 mmap0 = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02519}02519 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02520}02520                 \textcolor{comment}{/* Write map / common part of two maps. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02521}02521                 \mbox{\hyperlink{md__intel_8c_aa8359cee88f0a33bde5c7e8b22389df9}{intel\_set\_map\_offset}}(mmap0, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a9b4e12573b26ee18473a16408044819f}{sd\_offset}} / sectorsize);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02522}02522                 \mbox{\hyperlink{md__intel_8c_a682069beff33188d39e2852c2d4aca14}{intel\_set\_map\_disk\_sectors}}(mmap0, \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} / sectorsize);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02523}02523                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_ae130bfc14fe735079259238aaab3e119}{strip\_sectors}} = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} / sectorsize;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02524}02524                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} == \mbox{\hyperlink{g__raid_8h_a271c4821091e2a44a8a3412dde015fea}{G\_RAID\_VOLUME\_S\_BROKEN}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02525}02525                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} = \mbox{\hyperlink{md__intel_8c_a0097ee7011fc0bfd374ec995342a5808}{INTEL\_S\_FAILURE}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02526}02526                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a5a90d68c226a2ae59ff670759f9cad28}{v\_state}} == \mbox{\hyperlink{g__raid_8h_a127fdd15d01e1ff21b274d56dabc3df5}{G\_RAID\_VOLUME\_S\_DEGRADED}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02527}02527                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} = \mbox{\hyperlink{md__intel_8c_a9e0e0fbd31a8b33d38c2b1d22bf9ad49}{INTEL\_S\_DEGRADED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02528}02528                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_ab8f738fdad1ea577cf8da5e1537f342c}{g\_raid\_nsubdisks}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02529}02529                     == \mbox{\hyperlink{g__raid_8c_ab8f738fdad1ea577cf8da5e1537f342c}{g\_raid\_nsubdisks}}(\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}, -\/1))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02530}02530                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} = \mbox{\hyperlink{md__intel_8c_aae75cc2c95bebee1bb9092bbba82dfba}{INTEL\_S\_UNINITIALIZED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02531}02531                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02532}02532                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} = \mbox{\hyperlink{md__intel_8c_aa3da74fbfa115b47a51db3fbc5d83136}{INTEL\_S\_READY}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02533}02533                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a6a49f4ddd0b45eb4210ce72528786a32}{G\_RAID\_VOLUME\_RL\_RAID0}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02534}02534                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} = \mbox{\hyperlink{md__intel_8c_ac4df06f718999bb87f51a911ce0fe8ef}{INTEL\_T\_RAID0}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02535}02535                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02536}02536                     \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02537}02537                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} = \mbox{\hyperlink{md__intel_8c_ad6ea69ed94509e2f415aa81f80eb829a}{INTEL\_T\_RAID1}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02538}02538                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02539}02539                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_aaa7c9b368513ab7e52fd7bf76223172b}{type}} = \mbox{\hyperlink{md__intel_8c_ad79ddcabf696e6e7cef2db9d39bdc82b}{INTEL\_T\_RAID5}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02540}02540                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_afa6e5efbef76f8205be792a73578cd53}{total\_disks}} = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02541}02541                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_a270bdf6b61fc7d810795e08ebbe60931}{G\_RAID\_VOLUME\_RL\_RAID1}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02542}02542                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} = \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02543}02543                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_ab7c2840f8398e5a91b560d7644957a57}{v\_raid\_level}} == \mbox{\hyperlink{g__raid_8h_ad0ef2cd50760a49759a6cbaf2afeb286}{G\_RAID\_VOLUME\_RL\_RAID1E}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02544}02544                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} = 2;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02545}02545                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02546}02546                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02547}02547                 \mbox{\hyperlink{md__intel_8c_a47fcb87e6705a86b786c58eee030c91f}{intel\_set\_map\_stripe\_count}}(mmap0,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02548}02548                     \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_abc4da1103e29e3a8e2bbadb18fbccbf6}{sd\_size}} / \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} / mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02549}02549                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}} = 0xff;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02550}02550                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a37a18e32e55cfb4675829fc31b0d3e4e}{ddf}} = 1;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02551}02551 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02552}02552                 \textcolor{comment}{/* If there are two maps -\/ copy common and update. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02553}02553                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02554}02554                         \mbox{\hyperlink{md__intel_8c_ae9323565d4b39802cedf1f8efb24369c}{intel\_set\_vol\_curr\_migr\_unit}}(mvol,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02555}02555                             pos / \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_af0ca6a1c61e893f02a43ca29953c8e39}{v\_strip\_size}} / mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a756a841fd285610b9806d083e2545181}{total\_domains}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02556}02556                         mmap1 = \mbox{\hyperlink{md__intel_8c_a0770b641e6846b2c0aec95de8d32dc66}{intel\_get\_map}}(mvol, 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02557}02557                         memcpy(mmap1, mmap0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structintel__raid__map}{intel\_raid\_map}}));}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02558}02558                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a54159c4428e0351c21ac9373edc0810c}{status}} = \mbox{\hyperlink{md__intel_8c_aa3da74fbfa115b47a51db3fbc5d83136}{INTEL\_S\_READY}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02559}02559                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02560}02560                         mmap1 = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02561}02561 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02562}02562                 \textcolor{comment}{/* Write disk indexes and put rebuild flags. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02563}02563                 \textcolor{keywordflow}{for} (sdi = 0; sdi < \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a21482a5ac78a397faf4e95eb1ebef431}{v\_disks\_count}}; sdi++) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02564}02564                         \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}} = \&\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a3c43185db4bd1c4818d95a415635854b}{v\_subdisks}}[sdi];}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02565}02565                         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02566}02566                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_a5570ab684f57213078d94750e63354e1}{sd\_disk}}-\/>\mbox{\hyperlink{structg__raid__disk_ab6681cb16ceeb79b9e88d639eca0bd9e}{d\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02567}02567                         mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[sdi] = pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02568}02568                         if (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02569}02569                                 mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[sdi] = pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02570}02570                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02571}02571                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a8c3d62bf4e551976a8941a23c8984e5d}{G\_RAID\_SUBDISK\_S\_RESYNC}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02572}02572                                 mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[sdi] |= \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02573}02573                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} != \mbox{\hyperlink{g__raid_8h_a498effa0ffa87b75f6c40381c6d4eb39}{G\_RAID\_SUBDISK\_S\_ACTIVE}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02574}02574                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} != \mbox{\hyperlink{g__raid_8h_a41bff35bee21218d2aba7a261eb2e83c}{G\_RAID\_SUBDISK\_S\_STALE}} \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02575}02575                             \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} != \mbox{\hyperlink{g__raid_8h_a13d824d436f40abb3ab52f0d96a79b62}{G\_RAID\_SUBDISK\_S\_UNINITIALIZED}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02576}02576                                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[sdi] |= \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02577}02577                                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02578}02578                                         mmap1-\/>\mbox{\hyperlink{structintel__raid__map_a14ab3965705cff289ded678fe58b2a5f}{disk\_idx}}[sdi] |= \mbox{\hyperlink{md__intel_8c_af628a1e39d26f5b23b461d619898a5b6}{INTEL\_DI\_RBLD}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02579}02579                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02580}02580                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_af37111ba44cfc01a98d97bed8f60d964}{G\_RAID\_SUBDISK\_S\_NONE}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02581}02581                              \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a2e56fb1cd5fdab097052e38c28a8c92f}{G\_RAID\_SUBDISK\_S\_FAILED}} ||}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02582}02582                              \mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}-\/>\mbox{\hyperlink{structg__raid__subdisk_acd19794916930f74ecad38ca7dd69f69}{sd\_state}} == \mbox{\hyperlink{g__raid_8h_a856d6801d600e0089b0cd39ff5af7224}{G\_RAID\_SUBDISK\_S\_REBUILD}}) \&\&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02583}02583                             mmap0-\/>\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}} == 0xff) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02584}02584                                 mmap0-\/>\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}} = sdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02585}02585                                 \textcolor{keywordflow}{if} (mvol-\/>\mbox{\hyperlink{structintel__raid__vol_a26d1aa226d1114b0a4982c8dd1efc813}{migr\_state}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02586}02586                                         mmap1-\/>\mbox{\hyperlink{structintel__raid__map_ae7e7abebb3df279bcd11202fff024079}{failed\_disk\_num}} = sdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02587}02587                         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02588}02588                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02589}02589                 vi++;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02590}02590         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02591}02591         meta-\/>\mbox{\hyperlink{structintel__raid__conf_a71f2a65777b1c48dce42e1bce1c7cfe9}{total\_volumes}} = vi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02592}02592         \textcolor{keywordflow}{if} (vi > 1 || meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} \&}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02593}02593              (\mbox{\hyperlink{md__intel_8c_abb4bd527c6e2977e724adb9b2e40c682}{INTEL\_ATTR\_EXT\_STRIP}} | \mbox{\hyperlink{md__intel_8c_ac946395e8cb77d6cb5833ddb8cd23547}{INTEL\_ATTR\_2TB\_DISK}} | \mbox{\hyperlink{md__intel_8c_a2062e8ed0a3a26647030e6ae433d63b4}{INTEL\_ATTR\_2TB}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02594}02594                 version = \mbox{\hyperlink{md__intel_8c_a0934f121286aef207d0ea7e5c8fdaf6d}{INTEL\_VERSION\_1300}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02595}02595         \textcolor{keywordflow}{if} (strcmp(version, \mbox{\hyperlink{md__intel_8c_a0934f121286aef207d0ea7e5c8fdaf6d}{INTEL\_VERSION\_1300}}) < 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02596}02596                 meta-\/>\mbox{\hyperlink{structintel__raid__conf_aeba59f0f5674d57b3046d91be94ee3e2}{attributes}} \&= \mbox{\hyperlink{md__intel_8c_a7cc833bdb461059dfc9609e1412f18f8}{INTEL\_ATTR\_CHECKSUM}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02597}02597         memcpy(\&meta-\/>\mbox{\hyperlink{structintel__raid__conf_a42abaed7f1ec45a2c26cd9448920142a}{version}}[0], version, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{md__intel_8c_a3f6613423ea29316cfdf25a4a855dd4f}{INTEL\_VERSION\_1000}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02598}02598 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02599}02599         \textcolor{comment}{/* We are done. Print meta data and store them to disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02600}02600         \mbox{\hyperlink{md__intel_8c_a6b76d55ca3088561dc852ac3393b19a5}{g\_raid\_md\_intel\_print}}(meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02601}02601         \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} != NULL)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02602}02602                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02603}02603         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} = meta;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02604}02604         TAILQ\_FOREACH(\mbox{\hyperlink{structdisk}{disk}}, \&sc-\/>sc\_disks, d\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02605}02605                 pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02606}02606                 if (\mbox{\hyperlink{structdisk}{disk}}-\/>d\_state != \mbox{\hyperlink{g__raid_8h_aaf46a21394a57a2fcac34b1b7b52701c}{G\_RAID\_DISK\_S\_ACTIVE}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02607}02607                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02608}02608                 \textcolor{keywordflow}{if} (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02609}02609                         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02610}02610                         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02611}02611                 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02612}02612                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} = \mbox{\hyperlink{md__intel_8c_a4f1f3bcd5b4af574b486bd8e46ad117e}{intel\_meta\_copy}}(meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02613}02613                 \mbox{\hyperlink{md__intel_8c_a1d44d6837cdbf59d38bdfde48cd995d3}{intel\_meta\_write}}(\mbox{\hyperlink{structdisk}{disk}}-\/>d\_consumer, meta);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02614}02614         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02615}02615         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02616}02616 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02617}02617 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02618}02618 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02619}\mbox{\hyperlink{md__intel_8c_a147e67e5869871899903a5c331a17711}{02619}} \mbox{\hyperlink{md__intel_8c_a8405606d7917dfc05fda829e97c8d3d2}{g\_raid\_md\_fail\_disk\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02620}02620     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *tsd, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *tdisk)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02621}02621 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02622}02622         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__softc}{g\_raid\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02623}02623         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02624}02624         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02625}02625         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__subdisk}{g\_raid\_subdisk}} *\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02626}02626 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02627}02627         sc = md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02628}02628         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02629}02629         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)tdisk-\/>\mbox{\hyperlink{structg__raid__disk_ab6681cb16ceeb79b9e88d639eca0bd9e}{d\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02630}02630 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02631}02631         \textcolor{comment}{/* We can't fail disk that is not a part of array now. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02632}02632         if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}} < 0)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02633}02633                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02634}02634 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02635}02635         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02636}02636 \textcolor{comment}{         * Mark disk as failed in metadata and try to write that metadata}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02637}02637 \textcolor{comment}{         * to the disk itself to prevent it's later resurrection as STALE.}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02638}02638 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02639}02639         mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}-\/>\mbox{\hyperlink{structintel__raid__conf_a251e8638815a7d310c770163bd9d8928}{disk}}[pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a465cf7e3c4456304a6fe74a618feab96}{pd\_disk\_pos}}].\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02640}02640         pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_aeb173807e7f1642e9831baf5d025bc55}{pd\_disk\_meta}}.\mbox{\hyperlink{structintel__raid__disk_a919ab78e413876ebbf1d4c38f7485631}{flags}} = \mbox{\hyperlink{md__intel_8c_ae855ddd7b1366b634edf82bd731bf139}{INTEL\_F\_FAILED}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02641}02641         \mbox{\hyperlink{md__intel_8c_a6b76d55ca3088561dc852ac3393b19a5}{g\_raid\_md\_intel\_print}}(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02642}02642         \textcolor{keywordflow}{if} (tdisk-\/>\mbox{\hyperlink{structg__raid__disk_a830f6bd55251c14ca26a7f8fceb06a89}{d\_consumer}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02643}02643                 \mbox{\hyperlink{md__intel_8c_a1d44d6837cdbf59d38bdfde48cd995d3}{intel\_meta\_write}}(tdisk-\/>\mbox{\hyperlink{structg__raid__disk_a830f6bd55251c14ca26a7f8fceb06a89}{d\_consumer}}, mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02644}02644 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02645}02645         \textcolor{comment}{/* Change states. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02646}02646         \mbox{\hyperlink{g__raid_8c_a342da571518e21e0521b6416c838d00e}{g\_raid\_change\_disk\_state}}(tdisk, \mbox{\hyperlink{g__raid_8h_a2135c7d2f628dbf559cad6d4ea1b5c8f}{G\_RAID\_DISK\_S\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02647}02647         TAILQ\_FOREACH(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \&tdisk-\/>d\_subdisks, sd\_next) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02648}02648                 \mbox{\hyperlink{g__raid_8c_a058db459d5349d2130fda3a02dd2af29}{g\_raid\_change\_subdisk\_state}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02649}02649                     \mbox{\hyperlink{g__raid_8h_a2e56fb1cd5fdab097052e38c28a8c92f}{G\_RAID\_SUBDISK\_S\_FAILED}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02650}02650                 \mbox{\hyperlink{g__raid_8c_ac49cc1991dccaeef0743e0bc4f64e0b5}{g\_raid\_event\_send}}(\mbox{\hyperlink{g__raid__md__if_8m_a910062273088d146e8533398780701eb}{sd}}, \mbox{\hyperlink{g__raid_8h_a11e4d6f6fe0cb9ecaceeb81d2b30a125}{G\_RAID\_SUBDISK\_E\_FAILED}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02651}02651                     \mbox{\hyperlink{g__raid_8h_ae6ac3f8d5dcaa73174e3e8bb9dd12f1c}{G\_RAID\_EVENT\_SUBDISK}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02652}02652         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02653}02653 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02654}02654         \textcolor{comment}{/* Write updated metadata to remaining disks. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02655}02655         \mbox{\hyperlink{md__intel_8c_a7e8bbc06ea9c615838a33a3e1289fd2b}{g\_raid\_md\_write\_intel}}(md, NULL, NULL, tdisk);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02656}02656 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02657}02657         \textcolor{comment}{/* Check if anything left except placeholders. */}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02658}02658         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, -\/1) ==}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02659}02659             \mbox{\hyperlink{g__raid_8c_ad1004201fc232c60faacd7bd3f3b604f}{g\_raid\_ndisks}}(sc, \mbox{\hyperlink{g__raid_8h_aee552862c97f7442835d7c81b3399ac2}{G\_RAID\_DISK\_S\_OFFLINE}}))}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02660}02660                 \mbox{\hyperlink{g__raid_8c_a99807e6db37e78d1738e46dfd48b7b5c}{g\_raid\_destroy\_node}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02661}02661         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02662}02662                 \mbox{\hyperlink{md__intel_8c_a98cd9a45a932e4366ef3a9db0fdc5273}{g\_raid\_md\_intel\_refill}}(sc);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02663}02663         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02664}02664 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02665}02665 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02666}02666 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02667}\mbox{\hyperlink{md__intel_8c_a7ef79e652bb773d0835a4c4ce327339d}{02667}} \mbox{\hyperlink{md__intel_8c_a9439042f80feff62238e1df5ec3a6f0f}{g\_raid\_md\_free\_disk\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02668}02668     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__disk}{g\_raid\_disk}} *\mbox{\hyperlink{structdisk}{disk}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02669}02669 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02670}02670         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *pd;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02671}02671 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02672}02672         pd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__perdisk}{g\_raid\_md\_intel\_perdisk}} *)\mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02673}02673         if (pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02674}02674                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02675}02675                 pd-\/>\mbox{\hyperlink{structg__raid__md__intel__perdisk_a581d64dfa54016e0879aef7b972090c7}{pd\_meta}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02676}02676         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02677}02677         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(pd, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02678}02678         \mbox{\hyperlink{structdisk}{disk}}-\/>d\_md\_data = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02679}02679         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02680}02680 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02681}02681 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02682}02682 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02683}\mbox{\hyperlink{md__intel_8c_ad6824b4df16b509e22d04b3e60f02d3a}{02683}} \mbox{\hyperlink{md__intel_8c_a06b79be50354a098c8a7fbc0ec3d5260}{g\_raid\_md\_free\_volume\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md,}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02684}02684     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__volume}{g\_raid\_volume}} *\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}})}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02685}02685 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02686}02686         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *pv;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02687}02687 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02688}02688         pv = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__pervolume}{g\_raid\_md\_intel\_pervolume}} *)\mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}};}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02689}02689         \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(pv, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02690}02690         \mbox{\hyperlink{g__raid__md__if_8m_aaa46aabd2a891668d71cec64e90b4848}{vol}}-\/>\mbox{\hyperlink{structg__raid__volume_a1f432fb732072f5b196b570dd1d1e998}{v\_md\_data}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02691}02691         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02692}02692 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02693}02693 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02694}02694 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02695}\mbox{\hyperlink{md__intel_8c_a73518ac7e9abbb109a434f7c6221ae30}{02695}} \mbox{\hyperlink{md__intel_8c_a063fd2d74cfc2d5782b3777b93a2a1ca}{g\_raid\_md\_free\_intel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__raid__md__object}{g\_raid\_md\_object}} *md)}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02696}02696 \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02697}02697         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *mdi;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02698}02698 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02699}02699         mdi = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__raid__md__intel__object}{g\_raid\_md\_intel\_object}} *)md;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02700}02700         \textcolor{keywordflow}{if} (!mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}}) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02701}02701                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a161b355f3b2e6289b9e5ac39dd247e1b}{mdio\_started}} = 0;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02702}02702                 callout\_stop(\&mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a3ca01a906f502bdccf4d3f62eb34150f}{mdio\_start\_co}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02703}02703                 \mbox{\hyperlink{g__raid_8h_ace7234f8197b96e1b636f9376de8d7ea}{G\_RAID\_DEBUG1}}(1, md-\/>\mbox{\hyperlink{structg__raid__md__object_a4acc92ca2582509c74947d83b258e31d}{mdo\_softc}},}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02704}02704                     \textcolor{stringliteral}{"{}root\_mount\_rel \%p"{}}, mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02705}02705                 root\_mount\_rel(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}});}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02706}02706                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_a405f6093931f99e78f424a737d885c63}{mdio\_rootmount}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02707}02707         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02708}02708         \textcolor{keywordflow}{if} (mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02709}02709                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}}, M\_MD\_INTEL);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02710}02710                 mdi-\/>\mbox{\hyperlink{structg__raid__md__intel__object_aae05ffeef1a3f5de2dbebfe2ec7157df}{mdio\_meta}} = NULL;}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02711}02711         \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02712}02712         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02713}02713 \}}
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02714}02714 }
\DoxyCodeLine{\Hypertarget{md__intel_8c_source_l02715}\mbox{\hyperlink{md__intel_8c_a3499b01ab4a2bc061ce2ac8ccdea8d97}{02715}} \mbox{\hyperlink{md__intel_8c_a3499b01ab4a2bc061ce2ac8ccdea8d97}{G\_RAID\_MD\_DECLARE}}(intel, \textcolor{stringliteral}{"{}Intel"{}});}

\end{DoxyCode}
