[LTP] [PATCH v3 15/16] fs/fs_fill: Add a test to fill a FS in a few threads

Li Wang liwang@redhat.com
Thu Nov 9 11:58:57 CET 2017


On Thu, Nov 9, 2017 at 6:50 PM, Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
>> > The correct fix is to use open() instead of SAFE_OPEN() in the
>> > tst_fill_fs() and just return from the function when we get ENOSPC. I
>> > can fix that, or you can send the patch. Either way thanks for pointing
>> > out the mistake.
>>
>> The broken are not only in tst_fills_fs() function but also come from
>> SAFE_MKDIR(w->dir, 0700),
>
> Ok, we have to create the directories in the testrun() function before
> we attempt to run the threads, that should fix this particular problem.
>
>> SAFE_OPENDIR(w->dir) and SAFE_UNLINK(file).
>
> The opendir() should not fail with ENOSPC since that only reads the
> directory content.
>
> And the unlink() should not fail with ENOSPC as well. Since unlink()
> actually deletes a file, if that breaks because filesystem is full
> you lost since you cannot free any space by removing files...
>
> So fixing the tst_fill_fs() and doing the mkdir() before we start these
> threads should IMHO fix the test.

OK, Thanks for your analysis. Let me try to fix the mistake and test
on my system.

Will send a new patch if I can confirm the issue being fully fixed like this.


-- 
Li Wang
liwang@redhat.com


More information about the ltp mailing list