On Thu, Jul 13, 2023 at 02:40:51AM +0800, Zorro Lang wrote: > The generic/558 was shared/006, it was written for specific fs (e.g. xfs), then > shared with other similar localfs. > > After we changed it to a generic test case, the `_scratch_mkfs_sized` helps to > avoid running this case on nfs/cifs and any other fs which can't be mkfs sized. > Originally we thought a fs has a small specific size generally has limited > free inodes. It works for long time, but now bcachefs looks like an exception :) > > I think we must limit the number of processes, then let each process create more > files if it need more inodes, that helps to avoid the forkbomb problem, and helps > this case to work with bcachefs and other fs have lots of free inodes in 1G space. > > But we'd better to limit the number of free inodes too, we don't want to run this > case too long time. If a fs shows too many free inodes, _notrun "The 1G $FSTYP has > too many free inodes!". Alternatively we could have some fs-specific code which uses a different sized scratch file system depending on the file system. So for bcachefs, maybe it should only be, say, 1 MiB (or whatever the smallest file system bcachefs can support). This test is designed to test what happens when the file system is filled 100% with inodes, to make sure the file system passes fsck at 100%, and then after deleting all of the inodes, the file system should be self-consistent afterwards as well. That's a pretty straightforward test, and for a file system where inodes can be anywhere and are variably sized, it's certainly a completely valid thing to do. And if it turns out that "too many free inodes", then maybe the test should have some special case sizes for different file systems. ` - Ted