1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>bdev_read_page</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="other_functions.html" title="Other Functions"><link rel="prev" href="API-thaw-bdev.html" title="thaw_bdev"><link rel="next" href="API-bdev-write-page.html" title="bdev_write_page"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">bdev_read_page</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-thaw-bdev.html">Prev</a> </td><th width="60%" align="center">Other Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-bdev-write-page.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-bdev-read-page"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bdev_read_page — 2 Start reading a page from a block device 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">bdev_read_page </b>(</code></td><td>struct block_device * <var class="pdparam">bdev</var>, </td></tr><tr><td> </td><td>sector_t <var class="pdparam">sector</var>, </td></tr><tr><td> </td><td>struct page * <var class="pdparam">page</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1102852820"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>bdev</code></em></span></dt><dd><p> 4 The device to read the page from 5 </p></dd><dt><span class="term"><em class="parameter"><code>sector</code></em></span></dt><dd><p> 6 The offset on the device to read the page to (need not be aligned) 7 </p></dd><dt><span class="term"><em class="parameter"><code>page</code></em></span></dt><dd><p> 8 The page to read 9 </p></dd></dl></div></div><div class="refsect1"><a name="idp1102856532"></a><h2>Description</h2><p> 10 On entry, the page should be locked. It will be unlocked when the page 11 has been read. If the block driver implements rw_page synchronously, 12 that will be true on exit from this function, but it need not be. 13 </p><p> 14 15 Errors returned by this function are usually <span class="quote">“<span class="quote">soft</span>”</span>, eg out of memory, or 16 queue full; callers should try a different route to read this page rather 17 than propagate an error back up the stack. 18</p></div><div class="refsect1"><a name="idp1102857900"></a><h2>Return</h2><p> 19 negative errno if an error occurs, 0 if submission was successful. 20</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-thaw-bdev.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="other_functions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-bdev-write-page.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">thaw_bdev</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">bdev_write_page</span></td></tr></table></div></body></html> 21