<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I am reviewing recent VZ7 libploop commits, in particular, this one:<br>
    <br>
      <a class="moz-txt-link-freetext" href="https://src.openvz.org/projects/OVZ/repos/ploop/commits/36df847b9">https://src.openvz.org/projects/OVZ/repos/ploop/commits/36df847b9</a><br>
    <br>
    I left a question there, let me repeat it here in a hope someone
    answers.<br>
    <br>
    <blockquote type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div class="changeset-badge-oneline" style="margin: 0px; padding:
        0px; display: inline-block; font-size: 14px; color: rgb(51, 51,
        51); font-family: Arial, sans-serif; font-style: normal;
        font-variant: normal; font-weight: normal; letter-spacing:
        normal; line-height: 20px; orphans: auto; text-align: left;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);"><span
          class="changeset-author" title="Igor Sukhih"
          style="font-weight: bold; margin-right: 5px; color: rgb(51,
          51, 51);">Igor Sukhih</span><span
          class="Apple-converted-space"> </span>committed<span
          class="Apple-converted-space"> </span><a class="changesetid"
href="https://src.openvz.org/projects/OVZ/repos/ploop/commits/36df847b99c92557c69255ebfb00d4cc74cb51ac"
          data-changeset-id="36df847b99c92557c69255ebfb00d4cc74cb51ac"
          original-title="" style="color: rgb(59, 115, 175);
          text-decoration: none; font-family: monospace; display:
          inline-block; vertical-align: baseline; margin-left: 5px;">36df847b99c</a><time
          title="13 April 2016 05:04 PM"
          datetime="2016-04-13T17:04:27+0000" style="margin-left: 5px;
          font-size: 12px; color: rgb(112, 112, 112);">Yesterday</time></div>
      <div class="commit-message" style="margin: 10px 0px 0px; padding:
        0px; color: rgb(51, 51, 51); font-family: Arial, sans-serif;
        font-size: 14px; font-style: normal; font-variant: normal;
        font-weight: normal; letter-spacing: normal; line-height: 20px;
        orphans: auto; text-align: left; text-indent: 0px;
        text-transform: none; white-space: normal; widows: 1;
        word-spacing: 0px; -webkit-text-stroke-width: 0px;
        background-color: rgb(255, 255, 255);">
        <pre style="margin: 0px; padding: 0px; white-space: pre-wrap;">ploop_copy_init(): open folder with O_DIRECTORY flag
</pre>
      </div>
      <br class="Apple-interchange-newline">
    </blockquote>
    ...<br>
    <blockquote type="cite"><tt>-        _h-&gt;mntfd = open(mnt,
        O_RDONLY);</tt><tt><br>
      </tt><tt>+</tt><tt>        _h-&gt;mntfd = open(mnt,
        O_RDONLY|O_NONBLOCK|O_DIRECTORY);</tt><tt><br>
      </tt></blockquote>
    <br>
    1. What's the reason for adding O_NONBLOCK here? As far as I can
    see, it doesn't<br>
    change anything at all (neither in this open(), nor in subsequent
    syncfs(), ioctl()<br>
    and close())? I went as far as the kernel sources to check that
    O_NONBLOCK<br>
    doesn't affect syncfs() call, but maybe I'm mistaken?<br>
    <br>
    2. What's the reason for adding O_DIRECTORY? Ideally, the changelog<br>
    should say why we're doing it, not what we do (as it's pretty clear<br>
    from the patch itself).<br>
    <br>
    Regards,<br>
      Kir.<br>
    <br>
    <br>
  </body>
</html>