FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Zorro Lang <zlang@redhat.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Eryu Guan <eguan@redhat.com>, Zorro Lang <zlang@kernel.org>,
	fstests@vger.kernel.org,
	Kent Overstreet <kent.overstreet@linux.dev>
Subject: Re: [PATCH] generic/558: limit the number of spawned subprocesses
Date: Wed, 12 Jul 2023 21:44:35 -0400	[thread overview]
Message-ID: <20230713014435.GA3709197@mit.edu> (raw)
In-Reply-To: <20230712184051.6hwpdtuzjkuvcj4f@zlang-mailbox>

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

  reply	other threads:[~2023-07-13  1:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 15:51 [PATCH] generic/558: limit the number of spawned subprocesses Mikulas Patocka
2023-07-11 23:44 ` Darrick J. Wong
2023-07-12  1:09   ` Kent Overstreet
2023-07-12  5:15     ` Amir Goldstein
2023-07-12 10:10     ` Mikulas Patocka
2023-07-12 14:52       ` Kent Overstreet
2023-07-12 17:59         ` Mikulas Patocka
2023-07-12 18:35           ` Kent Overstreet
2023-07-12  9:57   ` Mikulas Patocka
2023-07-12 22:05     ` Darrick J. Wong
2023-07-12 18:40 ` Zorro Lang
2023-07-13  1:44   ` Theodore Ts'o [this message]
2023-07-13  1:48 ` Darrick J. Wong
2023-07-13 15:08   ` Mikulas Patocka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230713014435.GA3709197@mit.edu \
    --to=tytso@mit.edu \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=kent.overstreet@linux.dev \
    --cc=mpatocka@redhat.com \
    --cc=zlang@kernel.org \
    --cc=zlang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox