<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 />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit b0a49dab7cfa431835620a1bd50d4826fa2db356 by Simeon Bird to branch master.</pre>
 <br />









<p>- Commit</p>


<br />
<p>On May 4th, 2013, 3:35 p.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, 3:35 p.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>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/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>