diff options
author | assarbad <assarbad@users.noreply.github.com> | 2021-07-16 01:00:19 +0300 |
---|---|---|
committer | assarbad <assarbad@users.noreply.github.com> | 2021-07-16 01:00:19 +0300 |
commit | 96e050fe85aa3dbb860053ab3d581fb6b1e54f02 (patch) | |
tree | f353c15c203bb75673938a780dfa219c63d61a7c /classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html | |
parent | 8c45d7272c429a2c1992cced73ce3356fd7520b9 (diff) |
Deploying to gh-pages from @ 565f27555d13ce2a37346d838f32e03e1972aac1 🚀gh-pages
Diffstat (limited to 'classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html')
-rw-r--r-- | classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html | 140 |
1 files changed, 109 insertions, 31 deletions
diff --git a/classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html b/classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html index c0035e76..5ee3e95b 100644 --- a/classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html +++ b/classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html @@ -1,9 +1,9 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> -<meta name="generator" content="Doxygen 1.8.13"/> +<meta name="generator" content="Doxygen 1.8.17"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>LLFIO: llfio_v2_xxx::algorithm::shared_fs_mutex::memory_map< Hasher, HashIndexSize, SpinlockType > Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> @@ -13,9 +13,6 @@ <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> -<script type="text/javascript"> - $(document).ready(initResizable); -</script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> @@ -29,7 +26,7 @@ <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">LLFIO -  <span id="projectnumber">v2.00 late alpha</span> +  <span id="projectnumber">v2.00 late beta</span> </div> </td> </tr> @@ -37,18 +34,21 @@ </table> </div> <!-- end header part --> -<!-- Generated by Doxygen 1.8.13 --> +<!-- Generated by Doxygen 1.8.17 --> <script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); +/* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); -</script> +/* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> @@ -62,7 +62,9 @@ $(function() { </div> </div> <script type="text/javascript"> -$(document).ready(function(){initNavTree('classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html','');}); +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +$(document).ready(function(){initNavTree('classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html',''); initResizable(); }); +/* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> @@ -103,9 +105,9 @@ Inheritance diagram for llfio_v2_xxx::algorithm::shared_fs_mutex::memory_map< <div class="center"> <img src="classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.png" usemap="#llfio_5Fv2_5Fxxx::algorithm::shared_5Ffs_5Fmutex::memory_5Fmap_3C_20Hasher_2C_20HashIndexSize_2C_20SpinlockType_20_3E_map" alt=""/> <map id="llfio_5Fv2_5Fxxx::algorithm::shared_5Ffs_5Fmutex::memory_5Fmap_3C_20Hasher_2C_20HashIndexSize_2C_20SpinlockType_20_3E_map" name="llfio_5Fv2_5Fxxx::algorithm::shared_5Ffs_5Fmutex::memory_5Fmap_3C_20Hasher_2C_20HashIndexSize_2C_20SpinlockType_20_3E_map"> -<area href="classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1shared__fs__mutex.html" title="Abstract base class for an object which protects shared filing system resources. " alt="llfio_v2_xxx::algorithm::shared_fs_mutex::shared_fs_mutex" shape="rect" coords="0,0,558,24"/> -</map> - </div></div> +<area href="classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1shared__fs__mutex.html" title="Abstract base class for an object which protects shared filing system resources." alt="llfio_v2_xxx::algorithm::shared_fs_mutex::shared_fs_mutex" shape="rect" coords="0,0,558,24"/> + </map> +</div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> @@ -237,9 +239,10 @@ class llfio_v2_xxx::algorithm::shared_fs_mutex::memory_map< Hasher, HashIndex <li>Sometimes different entities hash to the same offset and collide with one another, causing very poor performance.</li> <li>Memory mapped files need to be cache unified with normal i/o in your OS kernel. Known OSs which don't use a unified cache for memory mapped and normal i/o are QNX, OpenBSD. Furthermore, doing normal i/o and memory mapped i/o to the same file needs to not corrupt the file. In the past, there have been editions of the Linux kernel and the OS X kernel which did this.</li> <li>If your OS doesn't have sane byte range locks (OS X, BSD, older Linuxes) and multiple objects in your process use the same lock file, misoperation will occur.</li> -<li>Requires <code>handle::current_path()</code> to be working.</li> -</ul> +<li><p class="startli">Requires <code>handle::current_path()</code> to be working.</p> <dl class="todo"><dt><b><a class="el" href="todo.html#_todo000009">Todo:</a></b></dt><dd>memory_map::_hash_entities needs to hash x16, x8 and x4 at a time to encourage auto vectorisation </dd></dl> +</li> +</ul> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a23750199fded35429d27ec4824b65c18"></a> <h2 class="memtitle"><span class="permalink"><a href="#a23750199fded35429d27ec4824b65c18">◆ </a></span>fs_mutex_map()</h2> @@ -276,22 +279,82 @@ template<template< class > class Hasher = QUICKCPPLIB_NAMESPACE::algori </tr> </table> </div><div class="memdoc"> -<p>Initialises a shared filing system mutex using the file at <em>lockfile</em>. </p><dl class="section user"><dt>Errors returnable</dt><dd>Awaiting the clang result<> AST parser which auto generates all the error codes which could occur, but a particularly important one is <code>errc::no_lock_available</code> which will be returned if the lock is in use by another computer on a network. </dd></dl> -<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  LLFIO_LOG_FUNCTION_CALL(0);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  {</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  OUTCOME_TRY(ret, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">file_handle::file</a>(base, lockfile, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">file_handle::mode::write</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d">file_handle::creation::if_needed</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1">file_handle::caching::reads</a>));</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  file_handle temph;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">// Am I the first person to this file? Lock everything exclusively</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">auto</span> lockinuse = ret.try_lock_range(_initialisingoffset, 2, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#aa25e3ab298152166fc387d8fcfb19a63aa4293995cfbfa9ce60ce71ade2ff75f7">file_handle::lock_kind::exclusive</a>);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span>(lockinuse.has_error())</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  {</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">if</span>(lockinuse.error() != errc::timed_out)</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  {</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">return</span> std::move(lockinuse).error();</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  }</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">// Somebody else is also using this file, so try to read the hash index file I ought to use</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  lockinuse = ret.lock_range(_lockinuseoffset, 1, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#aa25e3ab298152166fc387d8fcfb19a63a9e81e7b963c71363e2fb3eefcfecfc0e">file_handle::lock_kind::shared</a>); <span class="comment">// inuse shared access, blocking</span></div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">if</span>(!lockinuse)</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> std::move(lockinuse).error();</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  byte buffer[65536];</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  OUTCOME_TRYV(ret.read(0, {{buffer, 65535}}));</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  path_view temphpath(reinterpret_cast<filesystem::path::value_type *>(buffer));</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  result<file_handle> _temph(in_place_type<file_handle>);</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  _temph = <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">file_handle::file</a>({}, temphpath, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">file_handle::mode::write</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9">file_handle::creation::open_existing</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef">file_handle::caching::temporary</a>);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="comment">// If temp file doesn't exist, I am on a different machine</span></div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">if</span>(!_temph)</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Release the exclusive lock and tell caller that this lock is not available</span></div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">return</span> errc::no_lock_available;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  temph = std::move(_temph.value());</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="comment">// Map the hash index file into memory for read/write access</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  OUTCOME_TRY(temphsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(temph, HashIndexSize));</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  OUTCOME_TRY(temphmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(temphsection, HashIndexSize));</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// Map the path file into memory with its maximum possible size, read only</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  OUTCOME_TRY(hsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(ret, 65536, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  OUTCOME_TRY(hmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(hsection, 0, 0, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">return</span> memory_map(std::move(ret), std::move(temph), std::move(lockinuse.value()), std::move(hmap), std::move(temphmap));</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> </div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="comment">// I am the first person to be using this (stale?) file, so create a new hash index file in /tmp</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keyword">auto</span> &tempdirh = <a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">path_discovery::memory_backed_temporary_files_directory</a>().<a class="code" href="classllfio__v2__xxx_1_1handle.html#a5c7f6a0a8ffdea22763c75a9319ba0c2">is_valid</a>() ? <a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">path_discovery::memory_backed_temporary_files_directory</a>() : path_discovery::<a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#a2dd74ea752f3f511d58ccccdcac7f4fd">storage_backed_temporary_files_directory</a>();</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  OUTCOME_TRY(_temph, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a3141a85996e46a3cc6b238d321198e47">file_handle::random_file</a>(tempdirh));</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  temph = std::move(_temph);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="comment">// Truncate it out to the hash index size, and map it into memory for read/write access</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  OUTCOME_TRYV(temph.truncate(HashIndexSize));</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  OUTCOME_TRY(temphsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(temph, HashIndexSize));</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  OUTCOME_TRY(temphmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(temphsection, HashIndexSize));</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="comment">// Write the path of my new hash index file, padding zeros to the nearest page size</span></div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="comment">// multiple to work around a race condition in the Linux kernel</span></div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  OUTCOME_TRY(temppath, temph.current_path());</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordtype">char</span> buffer[4096];</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordtype">size_t</span> bytes = temppath.native().size() * <span class="keyword">sizeof</span>(*temppath.c_str());</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  file_handle::const_buffer_type buffers[] = {{<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span>byte *<span class="keyword">></span>(temppath.c_str()), bytes}, {<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span>byte *<span class="keyword">></span>(buffer), 4096 - (bytes % 4096)}};</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  OUTCOME_TRYV(ret.truncate(65536));</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  OUTCOME_TRYV(ret.write({buffers, 0}));</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="comment">// Map for read the maximum possible path file size, again to avoid race problems</span></div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  OUTCOME_TRY(hsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(ret, 65536, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  OUTCOME_TRY(hmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(hsection, 0, 0, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="comment">/* Take shared locks on inuse. Even if this implementation doesn't implement</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> atomic downgrade of exclusive range to shared range, we're fully prepared for other users</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="comment"> now. The _initialisingoffset remains exclusive to prevent double entry into this init routine.</span></div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span> <span class="comment"> */</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  OUTCOME_TRY(lockinuse2, ret.lock_range(_lockinuseoffset, 1, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#aa25e3ab298152166fc387d8fcfb19a63a9e81e7b963c71363e2fb3eefcfecfc0e">file_handle::lock_kind::shared</a>));</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  lockinuse = std::move(lockinuse2); <span class="comment">// releases exclusive lock on all three offsets</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">return</span> memory_map(std::move(ret), std::move(temph), std::move(lockinuse.value()), std::move(hmap), std::move(temphmap));</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  }</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">catch</span>(...)</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  {</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordflow">return</span> error_from_exception();</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  }</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  }</div><div class="ttc" id="classllfio__v2__xxx_1_1file__handle_html_aa25e3ab298152166fc387d8fcfb19a63a9e81e7b963c71363e2fb3eefcfecfc0e"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#aa25e3ab298152166fc387d8fcfb19a63a9e81e7b963c71363e2fb3eefcfecfc0e">llfio_v2_xxx::file_handle::lock_kind::shared</a></div><div class="ttdoc">Exclude only those requesting an exclusive lock on the same inode. </div></div> -<div class="ttc" id="namespacellfio__v2__xxx_html_af678f58d20e1f0962ff0744150342683"><div class="ttname"><a href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">llfio_v2_xxx::read</a></div><div class="ttdeci">file_handle::io_result< file_handle::size_type > read(file_handle &self, file_handle::extent_type offset, std::initializer_list< file_handle::buffer_type > lst, deadline d=deadline()) noexcept</div><div class="ttdef"><b>Definition:</b> file_handle.hpp:553</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1file__handle_html_a09e6b3e9806b328a687a55e955b885a3"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">llfio_v2_xxx::file_handle::file</a></div><div class="ttdeci">static result< file_handle > file(const path_handle &base, path_view_type path, mode _mode=mode::read, creation _creation=creation::open_existing, caching _caching=caching::all, flag flags=flag::none) noexcept</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1file__handle_html_aa25e3ab298152166fc387d8fcfb19a63aa4293995cfbfa9ce60ce71ade2ff75f7"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#aa25e3ab298152166fc387d8fcfb19a63aa4293995cfbfa9ce60ce71ade2ff75f7">llfio_v2_xxx::file_handle::lock_kind::exclusive</a></div><div class="ttdoc">Exclude those requesting any kind of lock on the same inode. </div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">llfio_v2_xxx::handle::mode::write</a></div><div class="ttdoc">Ability to read and write (READ_CONTROL|FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA|FILE_WRITE_D...</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1map__handle_html_adf0cad925c9d6accd5bd7fc3aa49884c"><div class="ttname"><a href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">llfio_v2_xxx::map_handle::map</a></div><div class="ttdeci">static result< map_handle > map(size_type bytes, bool zeroed=false, section_handle::flag _flag=section_handle::flag::readwrite) noexcept</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1file__handle_html_a3141a85996e46a3cc6b238d321198e47"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#a3141a85996e46a3cc6b238d321198e47">llfio_v2_xxx::file_handle::random_file</a></div><div class="ttdeci">static result< file_handle > random_file(const path_handle &dirpath, mode _mode=mode::write, caching _caching=caching::temporary, flag flags=flag::none) noexcept</div><div class="ttdef"><b>Definition:</b> file_handle.hpp:143</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_a5c7f6a0a8ffdea22763c75a9319ba0c2"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#a5c7f6a0a8ffdea22763c75a9319ba0c2">llfio_v2_xxx::handle::is_valid</a></div><div class="ttdeci">bool is_valid() const noexcept</div><div class="ttdoc">True if the handle is valid (and usually open) </div><div class="ttdef"><b>Definition:</b> handle.hpp:285</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1section__handle_html_a00db3d1bbffbdb4237401568c441da21"><div class="ttname"><a href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">llfio_v2_xxx::section_handle::section</a></div><div class="ttdeci">static result< section_handle > section(file_handle &backing, extent_type maximum_size, flag _flag) noexcept</div><div class="ttdoc">Create a memory section backed by a file. </div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef">llfio_v2_xxx::handle::caching::temporary</a></div><div class="ttdoc">Cache reads and writes of data and metadata so they complete immediately, only sending any updates to...</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1">llfio_v2_xxx::handle::caching::reads</a></div><div class="ttdoc">Cache reads only. Writes of data and metadata do not complete until reaching storage (O_SYNC)...</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d">llfio_v2_xxx::handle::creation::if_needed</a></div><div class="ttdoc">If filesystem entry exists that is used, else one is created. </div></div> -<div class="ttc" id="namespacellfio__v2__xxx_1_1path__discovery_html_a2dd74ea752f3f511d58ccccdcac7f4fd"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1path__discovery.html#a2dd74ea752f3f511d58ccccdcac7f4fd">llfio_v2_xxx::path_discovery::storage_backed_temporary_files_directory</a></div><div class="ttdeci">const path_handle & storage_backed_temporary_files_directory() noexcept</div><div class="ttdoc">Returns a reference to an open handle to a verified temporary directory where files created are store...</div></div> -<div class="ttc" id="namespacellfio__v2__xxx_1_1path__discovery_html_ade18f14d3ef37488e8967c87faa04d29"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">llfio_v2_xxx::path_discovery::memory_backed_temporary_files_directory</a></div><div class="ttdeci">const path_handle & memory_backed_temporary_files_directory() noexcept</div><div class="ttdoc">Returns a reference to an open handle to a verified temporary directory where files created are store...</div></div> -<div class="ttc" id="classllfio__v2__xxx_1_1handle_html_af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9">llfio_v2_xxx::handle::creation::open_existing</a></div><div class="ttdoc">Filesystem entry must already exist. </div></div> +<p>Initialises a shared filing system mutex using the file at <em>lockfile</em>. </p><dl class="section user"><dt>Errors returnable\n Awaiting the clang result<> AST parser which auto generates all the error codes which could occur,</dt><dd>but a particularly important one is <code>errc::no_lock_available</code> which will be returned if the lock is in use by another computer on a network. </dd></dl> +<div class="fragment"><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  {</div> +<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  LLFIO_LOG_FUNCTION_CALL(0);</div> +<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">try</span></div> +<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  {</div> +<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&ret, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">file_handle::file</a>(base, lockfile, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">file_handle::mode::write</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d">file_handle::creation::if_needed</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1">file_handle::caching::reads</a>));</div> +<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  file_handle temph;</div> +<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="comment">// Am I the first person to this file? Lock everything exclusively</span></div> +<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keyword">auto</span> lockinuse = ret.lock_file_range(_initialisingoffset, 2, <a class="code" href="namespacellfio__v2__xxx.html#ae79486289ff1386b26d1ce60bb797d33aa4293995cfbfa9ce60ce71ade2ff75f7">lock_kind::exclusive</a>, std::chrono::seconds(0));</div> +<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keywordflow">if</span>(lockinuse.has_error())</div> +<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  {</div> +<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span>(lockinuse.error() != errc::timed_out)</div> +<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  {</div> +<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> std::move(lockinuse).error();</div> +<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  }</div> +<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="comment">// Somebody else is also using this file, so try to read the hash index file I ought to use</span></div> +<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  lockinuse = ret.lock_file_range(_lockinuseoffset, 1, <a class="code" href="namespacellfio__v2__xxx.html#ae79486289ff1386b26d1ce60bb797d33a9e81e7b963c71363e2fb3eefcfecfc0e">lock_kind::shared</a>); <span class="comment">// inuse shared access, blocking</span></div> +<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">if</span>(!lockinuse)</div> +<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  {</div> +<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">return</span> std::move(lockinuse).error();</div> +<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  }</div> +<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordtype">byte</span> buffer[65536];</div> +<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div> +<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  OUTCOME_TRYV(ret.read(0, {{buffer, 65535}}));</div> +<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  path_view temphpath(<span class="keyword">reinterpret_cast<</span>filesystem::path::value_type *<span class="keyword">></span>(buffer));</div> +<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  result<file_handle> _temph(in_place_type<file_handle>);</div> +<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  _temph = <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">file_handle::file</a>({}, temphpath, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">file_handle::mode::write</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9">file_handle::creation::open_existing</a>, <a class="code" href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef">file_handle::caching::temporary</a>);</div> +<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="comment">// If temp file doesn't exist, I am on a different machine</span></div> +<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">if</span>(!_temph)</div> +<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  {</div> +<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="comment">// Release the exclusive lock and tell caller that this lock is not available</span></div> +<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> errc::no_lock_available;</div> +<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div> +<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  temph = std::move(_temph.value());</div> +<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="comment">// Map the hash index file into memory for read/write access</span></div> +<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&temphsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(temph, HashIndexSize));</div> +<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&temphmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(temphsection, HashIndexSize));</div> +<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="comment">// Map the path file into memory with its maximum possible size, read only</span></div> +<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&hsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(ret, 65536, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div> +<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&hmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(hsection, 0, 0, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div> +<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">return</span> memory_map(std::move(ret), std::move(temph), std::move(lockinuse.value()), std::move(hmap), std::move(temphmap));</div> +<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  }</div> +<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  </div> +<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="comment">// I am the first person to be using this (stale?) file, so create a new hash index file in /tmp</span></div> +<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keyword">auto</span> &tempdirh = <a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">path_discovery::memory_backed_temporary_files_directory</a>().<a class="code" href="classllfio__v2__xxx_1_1handle.html#a5c7f6a0a8ffdea22763c75a9319ba0c2">is_valid</a>() ? <a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">path_discovery::memory_backed_temporary_files_directory</a>() : path_discovery::<a class="code" href="namespacellfio__v2__xxx_1_1path__discovery.html#a2dd74ea752f3f511d58ccccdcac7f4fd">storage_backed_temporary_files_directory</a>();</div> +<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&_temph, <a class="code" href="classllfio__v2__xxx_1_1file__handle.html#a8b7aa986243527fe224425f61c179709">file_handle::uniquely_named_file</a>(tempdirh));</div> +<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  temph = std::move(_temph);</div> +<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="comment">// Truncate it out to the hash index size, and map it into memory for read/write access</span></div> +<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  OUTCOME_TRYV(temph.truncate(HashIndexSize));</div> +<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&temphsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(temph, HashIndexSize));</div> +<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&temphmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(temphsection, HashIndexSize));</div> +<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="comment">// Write the path of my new hash index file, padding zeros to the nearest page size</span></div> +<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="comment">// multiple to work around a race condition in the Linux kernel</span></div> +<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&temppath, temph.current_path());</div> +<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordtype">char</span> buffer[4096];</div> +<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  memset(buffer, 0, <span class="keyword">sizeof</span>(buffer));</div> +<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordtype">size_t</span> bytes = temppath.native().size() * <span class="keyword">sizeof</span>(*temppath.c_str());</div> +<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  file_handle::const_buffer_type buffers[] = {{<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">byte</span> *<span class="keyword">></span>(temppath.c_str()), bytes}, {<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">byte</span> *<span class="keyword">></span>(buffer), 4096 - (bytes % 4096)}};</div> +<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  OUTCOME_TRYV(ret.truncate(65536));</div> +<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  OUTCOME_TRYV(ret.write({buffers, 0}));</div> +<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="comment">// Map for read the maximum possible path file size, again to avoid race problems</span></div> +<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&hsection, <a class="code" href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">section_handle::section</a>(ret, 65536, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div> +<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&hmap, <a class="code" href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">map_handle::map</a>(hsection, 0, 0, <a class="code" href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">section_handle::flag::read</a>));</div> +<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="comment">/* Take shared locks on inuse. Even if this implementation doesn't implement</span></div> +<div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="comment"> atomic downgrade of exclusive range to shared range, we're fully prepared for other users</span></div> +<div class="line"><a name="l00260"></a><span class="lineno"> 260</span> <span class="comment"> now. The _initialisingoffset remains exclusive to prevent double entry into this init routine.</span></div> +<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> <span class="comment"> */</span></div> +<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  OUTCOME_TRY(<span class="keyword">auto</span> &&lockinuse2, ret.lock_file_range(_lockinuseoffset, 1, <a class="code" href="namespacellfio__v2__xxx.html#ae79486289ff1386b26d1ce60bb797d33a9e81e7b963c71363e2fb3eefcfecfc0e">lock_kind::shared</a>));</div> +<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  lockinuse = std::move(lockinuse2); <span class="comment">// releases exclusive lock on all three offsets</span></div> +<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordflow">return</span> memory_map(std::move(ret), std::move(temph), std::move(lockinuse.value()), std::move(hmap), std::move(temphmap));</div> +<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  }</div> +<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">catch</span>(...)</div> +<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  {</div> +<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">return</span> error_from_exception();</div> +<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  }</div> +<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  }</div> </div><!-- fragment --> </div> </div> @@ -300,13 +363,28 @@ template<template< class > class Hasher = QUICKCPPLIB_NAMESPACE::algori </ul> </div><!-- contents --> </div><!-- doc-content --> +<div class="ttc" id="anamespacellfio__v2__xxx_html_ae79486289ff1386b26d1ce60bb797d33aa4293995cfbfa9ce60ce71ade2ff75f7"><div class="ttname"><a href="namespacellfio__v2__xxx.html#ae79486289ff1386b26d1ce60bb797d33aa4293995cfbfa9ce60ce71ade2ff75f7">llfio_v2_xxx::lock_kind::exclusive</a></div><div class="ttdeci">@ exclusive</div><div class="ttdoc">Exclude those requesting any kind of lock on the same inode.</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1section__handle_html_a00db3d1bbffbdb4237401568c441da21"><div class="ttname"><a href="classllfio__v2__xxx_1_1section__handle.html#a00db3d1bbffbdb4237401568c441da21">llfio_v2_xxx::section_handle::section</a></div><div class="ttdeci">static result< section_handle > section(file_handle &backing, extent_type maximum_size, flag _flag) noexcept</div><div class="ttdoc">Create a memory section backed by a file.</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42a8f0339e854eb5321306a443ce9199e1d">llfio_v2_xxx::handle::creation::if_needed</a></div><div class="ttdeci">@ if_needed</div><div class="ttdoc">If filesystem entry exists that is used, else one is created.</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1map__handle_html_adf0cad925c9d6accd5bd7fc3aa49884c"><div class="ttname"><a href="classllfio__v2__xxx_1_1map__handle.html#adf0cad925c9d6accd5bd7fc3aa49884c">llfio_v2_xxx::map_handle::map</a></div><div class="ttdeci">static result< map_handle > map(size_type bytes, bool zeroed=false, section_handle::flag _flag=section_handle::flag::readwrite) noexcept</div></div> +<div class="ttc" id="anamespacellfio__v2__xxx_html_ae79486289ff1386b26d1ce60bb797d33a9e81e7b963c71363e2fb3eefcfecfc0e"><div class="ttname"><a href="namespacellfio__v2__xxx.html#ae79486289ff1386b26d1ce60bb797d33a9e81e7b963c71363e2fb3eefcfecfc0e">llfio_v2_xxx::lock_kind::shared</a></div><div class="ttdeci">@ shared</div><div class="ttdoc">Exclude only those requesting an exclusive lock on the same inode.</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1file__handle_html_a8b7aa986243527fe224425f61c179709"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#a8b7aa986243527fe224425f61c179709">llfio_v2_xxx::file_handle::uniquely_named_file</a></div><div class="ttdeci">static result< file_handle > uniquely_named_file(const path_handle &dirpath, mode _mode=mode::write, caching _caching=caching::temporary, flag flags=flag::none) noexcept</div><div class="ttdef"><b>Definition:</b> file_handle.hpp:163</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_a5c7f6a0a8ffdea22763c75a9319ba0c2"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#a5c7f6a0a8ffdea22763c75a9319ba0c2">llfio_v2_xxx::handle::is_valid</a></div><div class="ttdeci">bool is_valid() const noexcept</div><div class="ttdoc">True if the handle is valid (and usually open)</div><div class="ttdef"><b>Definition:</b> handle.hpp:337</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1file__handle_html_a09e6b3e9806b328a687a55e955b885a3"><div class="ttname"><a href="classllfio__v2__xxx_1_1file__handle.html#a09e6b3e9806b328a687a55e955b885a3">llfio_v2_xxx::file_handle::file</a></div><div class="ttdeci">static result< file_handle > file(const path_handle &base, path_view_type path, mode _mode=mode::read, creation _creation=creation::open_existing, caching _caching=caching::all, flag flags=flag::none) noexcept</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852a0fb9cf5f04f61bb6f1151da57ceb1ca1">llfio_v2_xxx::handle::caching::reads</a></div><div class="ttdeci">@ reads</div><div class="ttdoc">Cache reads only. Writes of data and metadata do not complete until reaching storage (O_SYNC)....</div></div> +<div class="ttc" id="anamespacellfio__v2__xxx_1_1path__discovery_html_a2dd74ea752f3f511d58ccccdcac7f4fd"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1path__discovery.html#a2dd74ea752f3f511d58ccccdcac7f4fd">llfio_v2_xxx::path_discovery::storage_backed_temporary_files_directory</a></div><div class="ttdeci">const path_handle & storage_backed_temporary_files_directory() noexcept</div><div class="ttdoc">Returns a reference to an open handle to a verified temporary directory where files created are store...</div></div> +<div class="ttc" id="anamespacellfio__v2__xxx_1_1path__discovery_html_ade18f14d3ef37488e8967c87faa04d29"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1path__discovery.html#ade18f14d3ef37488e8967c87faa04d29">llfio_v2_xxx::path_discovery::memory_backed_temporary_files_directory</a></div><div class="ttdeci">const path_handle & memory_backed_temporary_files_directory() noexcept</div><div class="ttdoc">Returns a reference to an open handle to a verified temporary directory where files created are store...</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aecd3a7db6cee3aec07d32fe6f99e6852ad5197d93c063a2b1e22d1630a39b7aef">llfio_v2_xxx::handle::caching::temporary</a></div><div class="ttdeci">@ temporary</div><div class="ttdoc">Cache reads and writes of data and metadata so they complete immediately, only sending any updates to...</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42aa200dcd6176417e93be2405188ae7cc9">llfio_v2_xxx::handle::creation::open_existing</a></div><div class="ttdeci">@ open_existing</div><div class="ttdoc">Filesystem entry must already exist.</div></div> +<div class="ttc" id="aclassllfio__v2__xxx_1_1handle_html_aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee"><div class="ttname"><a href="classllfio__v2__xxx_1_1handle.html#aa3930273a2d4cabbac309e0b75701dcaaefb2a684e4afb7d55e6147fbe5a332ee">llfio_v2_xxx::handle::mode::write</a></div><div class="ttdeci">@ write</div><div class="ttdoc">Ability to read and write (READ_CONTROL|FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA|FILE_WRITE_D...</div></div> +<div class="ttc" id="anamespacellfio__v2__xxx_html_af678f58d20e1f0962ff0744150342683"><div class="ttname"><a href="namespacellfio__v2__xxx.html#af678f58d20e1f0962ff0744150342683">llfio_v2_xxx::read</a></div><div class="ttdeci">file_handle::io_result< file_handle::size_type > read(file_handle &self, file_handle::extent_type offset, std::initializer_list< file_handle::buffer_type > lst, deadline d=deadline()) noexcept</div><div class="ttdoc">This is an overloaded member function, provided for convenience. It differs from the above function o...</div><div class="ttdef"><b>Definition:</b> file_handle.hpp:479</div></div> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="namespacellfio__v2__xxx.html">llfio_v2_xxx</a></li><li class="navelem"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html">algorithm</a></li><li class="navelem"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex.html">shared_fs_mutex</a></li><li class="navelem"><a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex_1_1memory__map.html">memory_map</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> - <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li> </ul> </div> </body> |