1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>inode_congested</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-wbc-account-io.html" title="wbc_account_io"><link rel="next" href="API---mark-inode-dirty.html" title="__mark_inode_dirty"></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">inode_congested</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-wbc-account-io.html">Prev</a> </td><th width="60%" align="center">Other Functions</th><td width="20%" align="right"> <a accesskey="n" href="API---mark-inode-dirty.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-inode-congested"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>inode_congested — 2 test whether an inode is congested 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">inode_congested </b>(</code></td><td>struct inode * <var class="pdparam">inode</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">cong_bits</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.3.7.66.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>inode</code></em></span></dt><dd><p> 4 inode to test for congestion (may be NULL) 5 </p></dd><dt><span class="term"><em class="parameter"><code>cong_bits</code></em></span></dt><dd><p> 6 mask of WB_[a]sync_congested bits to test 7 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.7.66.6"></a><h2>Description</h2><p> 8 Tests whether <em class="parameter"><code>inode</code></em> is congested. <em class="parameter"><code>cong_bits</code></em> is the mask of congestion 9 bits to test and the return value is the mask of set bits. 10 </p><p> 11 12 If cgroup writeback is enabled for <em class="parameter"><code>inode</code></em>, the congestion state is 13 determined by whether the cgwb (cgroup bdi_writeback) for the blkcg 14 associated with <em class="parameter"><code>inode</code></em> is congested; otherwise, the root wb's congestion 15 state is used. 16 </p><p> 17 18 <em class="parameter"><code>inode</code></em> is allowed to be NULL as this function is often called on 19 mapping->host which is NULL for the swapper space. 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-wbc-account-io.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---mark-inode-dirty.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">wbc_account_io</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">__mark_inode_dirty</span></td></tr></table></div></body></html> 21