[LTP] [PATCH] fallocate05: increase FALLOCATE_SIZE

Jan Stancek jstancek@redhat.com
Tue Nov 19 11:02:34 CET 2019



----- Original Message -----
> > ----- Original Message -----
> > fallocate05 seems to be the only test using it, but in general I think we
> > can do that too. Assuming this alone would be reliable, is there any
> > advantage of running test with small FALLOCATE_SIZE?
> 
> Note that simply increasing FALLOCATE_SIZE will not fix an incorrect
> pass when the file system wasn't completely full. Here's the code that
> checks whether some blocks were properly fallocate()d:
> 
> tst_fill_fs(MNTPOINT, 1);
> ret = write(fd, buf, sizeof(buf));
> if (ret < 0)
> 	tst_res(TFAIL | TERRNO, "write() failed unexpectedly");
> else
> 	tst_res(TPASS, "write() wrote %zu bytes", ret);
> 
> If the file system somehow finds a few free blocks after tst_fill_fs()
> returns, short write() will still count as a pass.

That is good point, but that seems like issue that existed even with
8k FALLOCATE_SIZE, right?



More information about the ltp mailing list