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

Li Wang liwang@redhat.com
Thu Nov 28 07:10:00 CET 2019


On Wed, Nov 27, 2019 at 10:29 PM Martin Doucha <mdoucha@suse.cz> wrote:

> Hello,
> here's something fun which I've discovered while playing with
> fallocate05 test on XFS:
> - fallocate(x blocks)
> - tst_fill_fs()
> - write(x blocks) - OK
> - write(1 block) - ENOSPC
> - fallocate(1 block) - OK
> - write(1 block) - OK
> - fallocate(1 block) - ENOSPC
>
> Somehow, fallocate() can find another free block on XFS which wasn't
> available to write() at first. But then that block becomes write()able.
>

That's interesting.

It does prove that an xfs filesystem can't be really fill full. As FS dev
says though a filesystem return -ENOSPC, after some internal bookkeeping,
flushing, then have space available again.

And that also means to increases FALLOCATE_SIZE is a wise way to avoid this
problem.


>
> --
> Martin Doucha   mdoucha@suse.cz
> QA Engineer for Software Maintenance
> SUSE LINUX, s.r.o.
> CORSO IIa
> Krizikova 148/34
> 186 00 Prague 8
> Czech Republic
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20191128/5a04406e/attachment-0001.htm>


More information about the ltp mailing list