<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Patrick,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Thank you for the quick reply.</div>
    <div class="moz-cite-prefix">No, I have no particular use-case in
      mind, I'm just playing around with PFL.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">If this is currently not properly
      supported, a quick fix could be to prevent the user from creating
      such incomplete layouts?</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Regards,</div>
    <div class="moz-cite-prefix">Thomas<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 2/22/19 5:33 PM, Patrick Farrell
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DM6PR19MB2508FAC00E9A2DC93C19B170C57F0@DM6PR19MB2508.namprd19.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
        dir="ltr">
        <p style="margin-top:0;margin-bottom:0">Thomas,</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">This is expected, but
          it's also something we'd like to fix - See LU-9341.</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0"><span
            style="font-family: Calibri, Helvetica, sans-serif,
            EmojiFont, "Apple Color Emoji", "Segoe UI
            Emoji", NotoColorEmoji, "Segoe UI Symbol",
            "Android Emoji", EmojiSymbols; font-size: 16px;">Basically,
            append tries to instantiate the layout from 0 to infinity,
            and it fails because your layout is incomplete (ie doesn't
            go to infinity).</span><br>
        </p>
        <p style="margin-top:0;margin-bottom:0"><br>
          May I ask why you're creating a file with an incomplete
          layout?  Do you have a use case in mind?</p>
        <p style="margin-top:0;margin-bottom:0"><br>
        </p>
        <p style="margin-top:0;margin-bottom:0">- Patrick</p>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b>
          lustre-discuss <a class="moz-txt-link-rfc2396E" href="mailto:lustre-discuss-bounces@lists.lustre.org"><lustre-discuss-bounces@lists.lustre.org></a>
          on behalf of LEIBOVICI Thomas <a class="moz-txt-link-rfc2396E" href="mailto:thomas.leibovici@cea.fr"><thomas.leibovici@cea.fr></a><br>
          <b>Sent:</b> Friday, February 22, 2019 10:27:48 AM<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a><br>
          <b>Subject:</b> [lustre-discuss] EINVAL error when writing to
          a PFL file (lustre 2.12.0)</font>
        <div> </div>
      </div>
      <div class="BodyFragment"><font size="2"><span
            style="font-size:11pt;">
            <div class="PlainText">Hello,<br>
              <br>
              Is it expected to get an error when appending a PFL file
              made of 2 <br>
              regions [0 - 1M] and [1M to 6M]<br>
              even if writing in this range?<br>
              <br>
              I get an error when appending it, even when writting in
              the very first <br>
              bytes:<br>
              <br>
              [root@vm0]# lfs setstripe  -E 1M -c 1 -E 6M -c 2
              /mnt/lustre/m_fou3<br>
              <br>
              [root@vm0]# lfs getstripe /mnt/lustre/m_fou3<br>
              /mnt/lustre/m_fou3<br>
                 lcm_layout_gen:    2<br>
                 lcm_mirror_count:  1<br>
                 lcm_entry_count:   2<br>
                   lcme_id:             1<br>
                   lcme_mirror_id:      0<br>
                   lcme_flags:          init<br>
                   lcme_extent.e_start: 0<br>
                   lcme_extent.e_end:   1048576<br>
                     lmm_stripe_count:  1<br>
                     lmm_stripe_size:   1048576<br>
                     lmm_pattern:       raid0<br>
                     lmm_layout_gen:    0<br>
                     lmm_stripe_offset: 3<br>
                     lmm_objects:<br>
                     - 0: { l_ost_idx: 3, l_fid: [0x100030000:0x9cf:0x0]
              }<br>
              <br>
                   lcme_id:             2<br>
                   lcme_mirror_id:      0<br>
                   lcme_flags:          0<br>
                   lcme_extent.e_start: 1048576<br>
                   lcme_extent.e_end:   6291456<br>
                     lmm_stripe_count:  2<br>
                     lmm_stripe_size:   1048576<br>
                     lmm_pattern:       raid0<br>
                     lmm_layout_gen:    0<br>
                     lmm_stripe_offset: -1<br>
              <br>
              [root@vm0]# stat -c %s /mnt/lustre/m_fou3<br>
              14<br>
              <br>
              * append fails:<br>
              <br>
              [root@vm0]# echo qsdkjqslkdjkj >> /mnt/lustre/m_fou3<br>
              bash: echo: write error: Invalid argument<br>
              <br>
              # strace indicates that write() gets the error:<br>
              <br>
              write(1, "qsdkjqslkdjkj\n", 14)         = -1 EINVAL
              (Invalid argument)<br>
              <br>
              * no error in case of an open/truncate:<br>
              <br>
              [root@vm0]# echo qsdkjqslkdjkj > /mnt/lustre/m_fou3<br>
              <br>
              OK<br>
              <br>
              Is it expected or should I open a ticket?<br>
              <br>
              Thomas<br>
              <br>
              _______________________________________________<br>
              lustre-discuss mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a><br>
              <a
                href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org"
                moz-do-not-send="true">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
            </div>
          </span></font></div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>