<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 Tue, Nov 19, 2019 at 10:24 PM Martin Doucha <<a href="mailto:mdoucha@suse.cz">mdoucha@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">On 11/19/19 3:03 PM, Li Wang wrote:<br>
> On Tue, Nov 19, 2019 at 7:07 PM Jan Stancek <<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a><br>
> <mailto:<a href="mailto:jstancek@redhat.com" target="_blank">jstancek@redhat.com</a>>> wrote:<br>
> <br>
>     ----- Original Message -----<br>
>     > -             while (len) {<br>
>     > +             while (len >= fi.f_bsize) {<br>
> <br>
>     Let's say f_bsize is 512, and len is 1023. We hit ENOSPC for 1023,<br>
>     len for next round is 511. Loop ends, but we never tried write with<br>
>     f_bsize or smaller value.<br>
> <br>
>     I think we should try len < fi.f_bsize at least once.<br>
> <br>
> <br>
> Good point. At least for len = fi.f_bsize.<br>
<br>
You don't need to reduce the write size in the first place. Kernel will<br>
happily do short writes for you if the file system somehow finds some<br></blockquote><div><br></div><div><div class="gmail_default" style="">You're probably right, but here I just want to enhance the tst_fill_fs routine, it obviously couldn't  be guaranteed way to perfectly fill a filesystem, this action from userspace is what I can think of.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
free blocks. The more important question is how to trigger garbage<br>
collection of internal file system book-keeping data.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Okay. I'm not good at FS issues. Or, do you have a better idea for that?</div></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>