<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<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">Yeah, that's possible, though I don't think people are regularly running in to this.  FWIW, I think the intention was to allow extension of layouts component by component.  An incomplete layout can have components added
 to it.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I can conceive of someone using an incomplete layout to enforce a file size limit, but that's about it.</p>
<p style="margin-top:0;margin-bottom:0"></p>
<p style="margin-top:0;margin-bottom:0"></p>
<p style="margin-top:0;margin-bottom:0"></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">- Patrick</p>
<p style="margin-top:0;margin-bottom:0"></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> LEIBOVICI Thomas <thomas.leibovici@cea.fr><br>
<b>Sent:</b> Friday, February 22, 2019 11:09:03 AM<br>
<b>To:</b> Patrick Farrell; lustre-discuss@lists.lustre.org<br>
<b>Subject:</b> Re: [lustre-discuss] EINVAL error when writing to a PFL file (lustre 2.12.0)</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<div class="x_moz-cite-prefix">Hello Patrick,</div>
<div class="x_moz-cite-prefix"><br>
</div>
<div class="x_moz-cite-prefix">Thank you for the quick reply.</div>
<div class="x_moz-cite-prefix">No, I have no particular use-case in mind, I'm just playing around with PFL.</div>
<div class="x_moz-cite-prefix"><br>
</div>
<div class="x_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="x_moz-cite-prefix"><br>
</div>
<div class="x_moz-cite-prefix">Regards,</div>
<div class="x_moz-cite-prefix">Thomas<br>
</div>
<div class="x_moz-cite-prefix"><br>
</div>
<div class="x_moz-cite-prefix">On 2/22/19 5:33 PM, Patrick Farrell wrote:<br>
</div>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<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="">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 tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> lustre-discuss
<a class="x_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="x_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="x_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="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_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="x_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">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
</div>
</span></font></div>
</blockquote>
<p><br>
</p>
</div>
</body>
</html>