[LTP] [PATCH] tst_fill_fs: enhance the filesystem filling routine

Li Wang liwang@redhat.com
Wed Nov 20 03:19:15 CET 2019


On Tue, Nov 19, 2019 at 10:24 PM Martin Doucha <mdoucha@suse.cz> wrote:

> On 11/19/19 3:03 PM, Li Wang wrote:
> > On Tue, Nov 19, 2019 at 7:07 PM Jan Stancek <jstancek@redhat.com
> > <mailto:jstancek@redhat.com>> wrote:
> >
> >     ----- Original Message -----
> >     > -             while (len) {
> >     > +             while (len >= fi.f_bsize) {
> >
> >     Let's say f_bsize is 512, and len is 1023. We hit ENOSPC for 1023,
> >     len for next round is 511. Loop ends, but we never tried write with
> >     f_bsize or smaller value.
> >
> >     I think we should try len < fi.f_bsize at least once.
> >
> >
> > Good point. At least for len = fi.f_bsize.
>
> You don't need to reduce the write size in the first place. Kernel will
> happily do short writes for you if the file system somehow finds some
>

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.


> free blocks. The more important question is how to trigger garbage
> collection of internal file system book-keeping data.
>

Okay. I'm not good at FS issues. Or, do you have a better idea for that?

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191120/12246ea0/attachment.htm>


More information about the ltp mailing list