<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 22, 2021 at 5:56 PM Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
> > Looking at the test I do not think there is a reason to allocate more<br>
> > than a two or four blocks for the buffer. We just need to write() to the<br>
> > fallocated area in a loop one block at a time until it's full. I do not<br>
> > think that it's a good idea to pass ~100MB buffer to a single write()<br>
> > and expect it to succeed anyways.<br>
> ><br>
> <br>
> Sounds practical.<br>
> <br>
> Btw, If we don't create such a larger buffer area, then we have to<br>
> count the loop times must as equal to bufsize/blocksize. Otherwise,<br>
> we can't guarantee the test behavior is correct.<br>
<br>
Strangely enough we allready do exactly that for the second part of the test.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">That try one by one block after filling full of the FS because nobody knows when fails. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">But as you suggested we can do that as well for the previous allocation :).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">So, will you create a patch, or I do that tomorrow?</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>