<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/106748/">http://git.reviewboard.kde.org/r/106748/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think this patch contains some other changes that are not required. You probably didn't generate it properly.

Anyway, nicely done. Please make sure to only commit the relevant parts.</pre>
 <br />







<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/106748/diff/4/?file=141964#file141964line47" style="color: black; font-weight: bold; text-decoration: underline;">cleaner/cleaningjob.h</a>
    <span style="font-weight: normal;">

     (Diff revision 4)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">47</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">class</span> <span class="n">NEPOMUK<span class="hl">_NEPOMUKCLEANER</span>_EXPORT</span> <span class="n">CleaningJob</span> <span class="o">:</span> <span class="n">public</span> <span class="n">KJob</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">34</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">class</span> <span class="n">NEPOMUK_EXPORT</span> <span class="n">CleaningJob</span> <span class="o">:</span> <span class="n">public</span> <span class="n">KJob</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">?</pre>
</div>
<br />



<p>- Vishesh</p>


<br />
<p>On May 4th, 2013, 2:48 a.m. UTC, Simeon Bird wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Nepomuk, Sebastian Trueg and Vishesh Handa.</div>
<div>By Simeon Bird.</div>


<p style="color: grey;"><i>Updated May 4, 2013, 2:48 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">FileWatch: Use KAuth to automatically raise the inotify watch limit if we run out of watches.

When we run out of watches, use a KAuth action to double the inotify
watch limit (by writing to /proc/sys/fs/inotify/max_user_watches).
At the same time, make the new setting persist across reboots by writing
/etc/sysctl.d/97-kde-nepomuk-filewatch-inotify.conf.

If for some reason raising the limit does not work, print a message to
syslog.

While the limit is being raised, no new watches will be added, only
queued.

==Potential issues==

1. At the moment there is no way to turn this off, except by not using nepomuk or denying the user the requisite kauth permissions. This is the sort of thing that people complain about, but I can't really see any reason to want to do that - you'd be running nepomuk in a "known broken" configuration, which makes no sense.

2. the action description string is "To avoid missing file changes, raise the folder watch limit", which could probably be improved.

3. The method of making the change persist across reboots is to write a file to /etc/sysctl.d, which is a bit anti-social. (note that if /etc is not writable, it simply does nothing). /etc/sysctl.d should work on all systemd distros, debian (including derivatives such as ubuntu) and gentoo.

Part of me wants to make this a separate action, but as I understand it this would require a second prompt and a second authorization, which would be a bit annoying. Also, the user's file system isn't going away - if they wanted a larger limit once, they almost certainly want it again, so there are limited reasons for not wanting it permanent. But finer grained permissions are a Good Thing, so I'm not so sure about this.

4. If the user has manually set the watch limit to a too-low number in sysctl.conf, it could potentially over-ride the file in /etc/sysctl.d, leading to the prompt appearing on every boot.

Also, I'd just like to mention that I was quite impressed at how easy to KAuth was to work with.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Compiled, ran, raised and lowered the limit a few times.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>cleaner/CMakeLists.txt <span style="color: grey">(87bae29f4dfa8eb9c1d5c0414e4661d7d461b726)</span></li>

 <li>cleaner/cleaningjob.h <span style="color: grey">(eb0548b06daaf07dc7ba4b2ede6fc0b3bc65acdb)</span></li>

 <li>cleaner/nepomukcleaner.desktop <span style="color: grey">(35136a0b50f4419dfc40c3c5bfa65e23887fd368)</span></li>

 <li>cleaner/nepomukcleaningjob.desktop <span style="color: grey">(6ebb1c96c5abb09c7d0048768729ab4252cde579)</span></li>

 <li>libnepomukcore/service/nepomukservice2.desktop <span style="color: grey">(0361017fdb519b2881d1be8151026bfbab917d88)</span></li>

 <li>services/fileindexer/indexer/extractorplugin.h <span style="color: grey">(8e264941bfa40ca6ac7d546740c9d6cea84f77ab)</span></li>

 <li>services/fileindexer/indexer/nepomukexiv2extractor.desktop <span style="color: grey">(aea0ec8b496c96eb853aa0426cc72a14b4eb505c)</span></li>

 <li>services/fileindexer/indexer/nepomukextractor.desktop <span style="color: grey">(8e8da0cc3b08b33bd2962b4dcd92207ac717d688)</span></li>

 <li>services/fileindexer/indexer/nepomukffmpegextractor.desktop <span style="color: grey">(b7b21a65e30a1df9bd6ab4d849ab609313e5d33c)</span></li>

 <li>services/fileindexer/indexer/nepomukplaintextextractor.desktop <span style="color: grey">(9653070e96e85d6a1b4def1f421e1a7d05ea61e0)</span></li>

 <li>services/fileindexer/indexer/nepomukpopplerextractor.desktop <span style="color: grey">(25aa375e72bbf9777d4d74728af853571d31f90e)</span></li>

 <li>services/fileindexer/indexer/nepomuktaglibextractor.desktop <span style="color: grey">(f5ca96b784d73fdebfda11762f0cd35280e90b70)</span></li>

 <li>services/fileindexer/indexer/test/CMakeLists.txt <span style="color: grey">(6422c895484a30722e882ecdb65beca917bf46df)</span></li>

 <li>services/filewatch/CMakeLists.txt <span style="color: grey">(338fe8c2b008b1c898d71934e4de3028c0078fca)</span></li>

 <li>services/filewatch/kinotify.h <span style="color: grey">(e795371d922d483bce29e9eea03c1eeb97738355)</span></li>

 <li>services/filewatch/kinotify.cpp <span style="color: grey">(94babfe437ddfa8c9318b8b29dd8c8a03a4e71b1)</span></li>

 <li>services/filewatch/nepomukfilewatch.h <span style="color: grey">(66e0112d909a2abefed48d0959323e7f32a5ff9b)</span></li>

 <li>services/filewatch/nepomukfilewatch.cpp <span style="color: grey">(fbbf3db619516e296bc1e4aa07f53808fbe4a4c0)</span></li>

 <li>services/filewatch/nepomukfilewatch.desktop <span style="color: grey">(a0710e3fd399123b23012faec25a5a687ca9eacb)</span></li>

 <li>services/filewatch/org.kde.nepomuk.filewatch.actions <span style="color: grey">(PRE-CREATION)</span></li>

 <li>services/filewatch/raiselimit.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>services/filewatch/raiselimit.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/106748/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>