\hypertarget{nvme__ns__cmd_8c_source}{}\doxysection{nvme\+\_\+ns\+\_\+cmd.\+c}
\label{nvme__ns__cmd_8c_source}\index{dev/nvme/nvme\_ns\_cmd.c@{dev/nvme/nvme\_ns\_cmd.c}}
\mbox{\hyperlink{nvme__ns__cmd_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (C) 2012 Intel Corporation}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00030}\mbox{\hyperlink{nvme__ns__cmd_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{nvme__ns__cmd_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00032}00032 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{nvme__private_8h}{nvme\_private.h}}"{}}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00034}00034 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00035}\mbox{\hyperlink{nvme_8h_a4c8cb5fb5d0f458260ddb4af7fc27a15}{00035}} \mbox{\hyperlink{nvme__ns__cmd_8c_a4c8cb5fb5d0f458260ddb4af7fc27a15}{nvme\_ns\_cmd\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keywordtype}{void} *payload, uint64\_t \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00036}00036     uint32\_t lba\_count, \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} cb\_fn, \textcolor{keywordtype}{void} *cb\_arg)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00037}00037 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00038}00038         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00040}00040         req = \mbox{\hyperlink{nvme__private_8h_a8d4836565f4f17bf67d7db4432fa3350}{nvme\_allocate\_request\_vaddr}}(\mbox{\hyperlink{structnvme__request_a70c7138c10191cc2e7d06bb40d1aaa0d}{payload}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00041}00041             lba\_count*\mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}), \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00043}00043         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00044}00044                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00046}00046         \mbox{\hyperlink{nvme_8h_aabc0b43d7e8d13f265f0bcf2b30be799}{nvme\_ns\_read\_cmd}}(\&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id, \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00048}00048         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00050}00050         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00051}00051 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00053}00053 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00054}\mbox{\hyperlink{nvme_8h_a882899ae456dded81a4f3aca9cbc551b}{00054}} \mbox{\hyperlink{nvme__ns__cmd_8c_a882899ae456dded81a4f3aca9cbc551b}{nvme\_ns\_cmd\_read\_bio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__request_a282cd4a823799983f3e85e463d1313c5}{bio}} *bp,}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00055}00055     \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}})}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00056}00056 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00057}00057         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00058}00058         uint64\_t                \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00059}00059         uint64\_t                lba\_count;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00061}00061         req = \mbox{\hyperlink{nvme__private_8h_a7b968a69d577905f1e841127a84b6064}{nvme\_allocate\_request\_bio}}(bp, \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00063}00063         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00064}00064                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00066}00066         \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}} = bp-\/>bio\_offset / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00067}00067         lba\_count = bp-\/>bio\_bcount / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00068}00068         \mbox{\hyperlink{nvme_8h_aabc0b43d7e8d13f265f0bcf2b30be799}{nvme\_ns\_read\_cmd}}(\&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id, \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00070}00070         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00072}00072         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00073}00073 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00075}00075 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00076}\mbox{\hyperlink{nvme_8h_a08200c74a175adaa68fdebd46a72df04}{00076}} \mbox{\hyperlink{nvme__ns__cmd_8c_a08200c74a175adaa68fdebd46a72df04}{nvme\_ns\_cmd\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a70c7138c10191cc2e7d06bb40d1aaa0d}{payload}}, uint64\_t \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00077}00077     uint32\_t lba\_count, \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}})}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00078}00078 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00079}00079         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00081}00081         req = \mbox{\hyperlink{nvme__private_8h_a8d4836565f4f17bf67d7db4432fa3350}{nvme\_allocate\_request\_vaddr}}(\mbox{\hyperlink{structnvme__request_a70c7138c10191cc2e7d06bb40d1aaa0d}{payload}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00082}00082             lba\_count*\mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}), \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00084}00084         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00085}00085                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00087}00087         \mbox{\hyperlink{nvme_8h_ad3d15e66ae7233f8145d51a290f74213}{nvme\_ns\_write\_cmd}}(\&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id, \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00089}00089         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00091}00091         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00092}00092 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00094}00094 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00095}\mbox{\hyperlink{nvme_8h_a5190d5a01df932e7c5bc892874f8287a}{00095}} \mbox{\hyperlink{nvme__ns__cmd_8c_a5190d5a01df932e7c5bc892874f8287a}{nvme\_ns\_cmd\_write\_bio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__request_a282cd4a823799983f3e85e463d1313c5}{bio}} *bp,}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00096}00096     \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}})}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00097}00097 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00098}00098         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00099}00099         uint64\_t                \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00100}00100         uint64\_t                lba\_count;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00102}00102         req = \mbox{\hyperlink{nvme__private_8h_a7b968a69d577905f1e841127a84b6064}{nvme\_allocate\_request\_bio}}(bp, \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00104}00104         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00105}00105                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00106}00106         \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}} = bp-\/>bio\_offset / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00107}00107         lba\_count = bp-\/>bio\_bcount / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00108}00108         \mbox{\hyperlink{nvme_8h_ad3d15e66ae7233f8145d51a290f74213}{nvme\_ns\_write\_cmd}}(\&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id, \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00110}00110         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00112}00112         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00113}00113 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00115}00115 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00116}\mbox{\hyperlink{nvme_8h_a6b034aeffc0386a9060e5f277723a2fe}{00116}} \mbox{\hyperlink{nvme__ns__cmd_8c_a6b034aeffc0386a9060e5f277723a2fe}{nvme\_ns\_cmd\_deallocate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a70c7138c10191cc2e7d06bb40d1aaa0d}{payload}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00117}00117     uint8\_t num\_ranges, \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} \mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}})}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00118}00118 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00119}00119         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00120}00120         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__command}{nvme\_command}} *\mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00122}00122         req = \mbox{\hyperlink{nvme__private_8h_a8d4836565f4f17bf67d7db4432fa3350}{nvme\_allocate\_request\_vaddr}}(payload,}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00123}00123             num\_ranges * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__dsm__range}{nvme\_dsm\_range}}), cb\_fn, cb\_arg);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00125}00125         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00126}00126                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00128}00128         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}} = \&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00129}00129         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}-\/>\mbox{\hyperlink{structnvme__command_a90223b2c71f796c51271ecfba563effa}{opc}} = \mbox{\hyperlink{nvme_8h_a5b4b9733507eff868c31fc8897df4b6ca481c2b45c5e010a7b56b07195db8095f}{NVME\_OPC\_DATASET\_MANAGEMENT}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00130}00130         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}-\/>\mbox{\hyperlink{structnvme__command_afc6fc91125be6eaa57f0d4d8b4f75532}{nsid}} = htole32(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00132}00132         \textcolor{comment}{/* TODO: create a delete command data structure */}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00133}00133         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}-\/>\mbox{\hyperlink{structnvme__command_a798361af1353f9b6b0f0984d6bd85250}{cdw10}} = htole32(num\_ranges -\/ 1);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00134}00134         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}-\/>\mbox{\hyperlink{structnvme__command_ab6989409b690a2a411adbb9d7f22ac87}{cdw11}} = htole32(\mbox{\hyperlink{nvme_8h_afec43deeecd6796c9014c87e7d973e55a1051ed6a67557c2986283dff322d80c1}{NVME\_DSM\_ATTR\_DEALLOCATE}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00136}00136         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00138}00138         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00139}00139 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00141}00141 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00142}\mbox{\hyperlink{nvme_8h_a756985b14e8cfddbdc61ed0d063f4619}{00142}} \mbox{\hyperlink{nvme__ns__cmd_8c_a756985b14e8cfddbdc61ed0d063f4619}{nvme\_ns\_cmd\_flush}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \mbox{\hyperlink{nvme_8h_a366d9c540a80d70e43c41ecfa28e6795}{nvme\_cb\_fn\_t}} cb\_fn, \textcolor{keywordtype}{void} *cb\_arg)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00143}00143 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00144}00144         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00146}00146         req = \mbox{\hyperlink{nvme__private_8h_a145ee1acb48081bdac5769298c6fb0d3}{nvme\_allocate\_request\_null}}(\mbox{\hyperlink{structnvme__request_a4608724f8477e2f0b8091b92fbd61725}{cb\_fn}}, \mbox{\hyperlink{structnvme__request_a21ee6c26abb927f409b296c21050e623}{cb\_arg}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00148}00148         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00149}00149                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00151}00151         \mbox{\hyperlink{nvme_8h_aaedce6565effead94f16d291a5b4ffe9}{nvme\_ns\_flush\_cmd}}(\&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00152}00152         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00154}00154         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00155}00155 \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00157}00157 \textcolor{comment}{/* Timeout = 1 sec */}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00158}\mbox{\hyperlink{nvme__ns__cmd_8c_aeb9f58e16517a78dbaaf8568c0352572}{00158}} \textcolor{preprocessor}{\#define NVD\_DUMP\_TIMEOUT        200000}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00160}00160 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00161}\mbox{\hyperlink{nvme_8h_a771258faeb9c82174588f241dcb03b1d}{00161}} \mbox{\hyperlink{nvme__ns__cmd_8c_a771258faeb9c82174588f241dcb03b1d}{nvme\_ns\_dump}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structnvme__namespace}{nvme\_namespace}} *\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}, \textcolor{keywordtype}{void} *virt, off\_t offset, \textcolor{keywordtype}{size\_t} len)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00162}00162 \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00163}00163         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__completion__poll__status}{nvme\_completion\_poll\_status}} \mbox{\hyperlink{nvme_8h_a5393c99e246925076b1dfd69a64177ef}{status}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00164}00164         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__request}{nvme\_request}} *req;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00165}00165         \textcolor{keyword}{struct }\mbox{\hyperlink{structnvme__command}{nvme\_command}} *\mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00166}00166         uint64\_t \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00167}00167         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00169}00169         \mbox{\hyperlink{nvme_8h_a5393c99e246925076b1dfd69a64177ef}{status}}.done = FALSE;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00170}00170         req = \mbox{\hyperlink{nvme__private_8h_a8d4836565f4f17bf67d7db4432fa3350}{nvme\_allocate\_request\_vaddr}}(virt, len, \mbox{\hyperlink{nvme_8c_a58b926f748b406ea387c1df469a7fb77}{nvme\_completion\_poll\_cb}},}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00171}00171             \&\mbox{\hyperlink{nvme_8h_a5393c99e246925076b1dfd69a64177ef}{status}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00172}00172         \textcolor{keywordflow}{if} (req == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00173}00173                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00175}00175         \mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}} = \&req-\/>\mbox{\hyperlink{structnvme__request_ab42d4feddbb8f0a86056e31bb2dc8ab1}{cmd}};}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00177}00177         \textcolor{keywordflow}{if} (len > 0) \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00178}00178                 \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}} = offset / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00179}00179                 lba\_count = len / \mbox{\hyperlink{nvme_8h_aad02939eb52c0875af47077d84801022}{nvme\_ns\_get\_sector\_size}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00180}00180                 \mbox{\hyperlink{nvme_8h_ad3d15e66ae7233f8145d51a290f74213}{nvme\_ns\_write\_cmd}}(\mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id, \mbox{\hyperlink{nvme_8h_aafa9f203f0abc59a4b08b3833f39b92c}{lba}}, lba\_count);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00181}00181         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00182}00182                 \mbox{\hyperlink{nvme_8h_aaedce6565effead94f16d291a5b4ffe9}{nvme\_ns\_flush\_cmd}}(\mbox{\hyperlink{nvme__private_8h_aa9d2256d8578c0dbcb175d00bbe9f814}{cmd}}, \mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>id);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00184}00184         \mbox{\hyperlink{nvme__ctrlr_8c_aa15d028e30282240c6378a7fe0ebc20b}{nvme\_ctrlr\_submit\_io\_request}}(\mbox{\hyperlink{nvme_8h_aa91cfd267426be70695fb4c055f99e84}{ns}}-\/>ctrlr, req);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00185}00185         \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structnvme__request_a67358ff62610c08c993befdbbe3321cf}{qpair}} == NULL)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00186}00186                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00188}00188         i = 0;}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00189}00189         \textcolor{keywordflow}{while} ((i++ < \mbox{\hyperlink{nvme__ns__cmd_8c_aeb9f58e16517a78dbaaf8568c0352572}{NVD\_DUMP\_TIMEOUT}}) \&\& (\mbox{\hyperlink{nvme_8h_a5393c99e246925076b1dfd69a64177ef}{status}}.done == FALSE)) \{}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00190}00190                 DELAY(5);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00191}00191                 \mbox{\hyperlink{nvme__private_8h_aad28f991c8ee6ca7c14979ff5d1467f1}{nvme\_qpair\_process\_completions}}(req-\/>\mbox{\hyperlink{structnvme__request_a67358ff62610c08c993befdbbe3321cf}{qpair}});}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00192}00192         \}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00194}00194         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00195}00195 \textcolor{comment}{         * Normally, when using the polling interface, we can't return a}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00196}00196 \textcolor{comment}{         * timeout error because we don't know when the completion routines}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00197}00197 \textcolor{comment}{         * will be called if the command later completes. However, in this}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00198}00198 \textcolor{comment}{         * case we're running a system dump, so all interrupts are turned}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00199}00199 \textcolor{comment}{         * off, the scheduler isn't running so there's nothing to complete}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00200}00200 \textcolor{comment}{         * the transaction.}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00201}00201 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00202}00202         \textcolor{keywordflow}{if} (\mbox{\hyperlink{nvme_8h_a5393c99e246925076b1dfd69a64177ef}{status}}.done == FALSE)}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00203}00203                 \textcolor{keywordflow}{return} (ETIMEDOUT);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00205}00205         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{nvme__ns__cmd_8c_source_l00206}00206 \}}

\end{DoxyCode}
