public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrei Gherzan <andrei.gherzan@canonical.com>
To: ltp@lists.linux.it
Subject: [LTP] LTP fs_fill test on vfat - ENOSPC
Date: Wed, 15 Feb 2023 13:22:50 +0000	[thread overview]
Message-ID: <Y+zcqqNE01cNcm1Y@qwirkle> (raw)

Hi all,

tl;dr fs_fill test broken for vfat on systems with more than 256 CPUs.

The fs_fill test runs a fill test on all the supported filesystems. One
of them being vfat. This filesystem is configured dynamically or through
flags/arguments for its file allocation table type (12/16/32).

The size of the test device (which is a loop mounted fs) is 300MB. When
not instructed, mkfs will "automatically select between 12, 16 and 32
bit, whatever fits better for the filesystem size"[1]. For the case of
a 300Mb that wwould end up as FAT16:

# sudo file -s /dev/loop0
/dev/loop0: DOS/MBR boot sector, code offset 0x3c+2, OEM-ID "mkfs.fat",
sectors/cluster 16, reserved sectors 16, root entries 512, Media
descriptor 0xf8, sectors/FAT 160, sectors/track 32, heads 64, sectors
600000 (volumes > 32 MB), serial number 0x5de1e96b, unlabeled, FAT (16
bit)

This is pretty well known, but it's important to start with because it is
linked with another configuration that is the actual impact on this
issue and that is the maximum number of directories in the root of the
filesystem.  FAT12 and FAT16 uses a special system region for "Root
Directory Region". And by default (there is also an argument to
configure this at mkfs-time) this ends up being 256 when no custom
arguments are provided.

On the other hand, the test sets up the filesystem with a
"tst_ncpus_conf + 2" number of directories in the root which can break
the limit explained above on systems that take the value over the
default 256 limit of root directories.

There a couple of ways to deal with this:

1. Force the filesystem creation in FAT32. This would be the best way
forward in my opinion, but I can't see anything that supports doing so on
a per-filesystem basis in LTP.
2. Increase the minimal numbers of entries available in the root
directory via "-r ROOT-DIR-ENTRIES"[1]. This would only push the crash
on fewer systems.
3. Use a subdirectory in the test setup. Something like /subdir/threadX.
If I'm not missing any support to do 1, this would probably be the
easiest to do.

I'm happy to go forward with a PR to fix this properly but looking
forward to your feedback on how to steer this.

[1] MKFS.FAT(8)

-- 
Andrei Gherzan

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2023-02-15 13:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 13:22 Andrei Gherzan [this message]
2023-02-16  9:51 ` [LTP] LTP fs_fill test on vfat - ENOSPC Cyril Hrubis
2023-02-16 10:31   ` Andrei Gherzan
2023-02-16 10:49     ` Cyril Hrubis
2023-02-16 11:09       ` Andrei Gherzan
2023-02-16 11:44         ` Cyril Hrubis
2023-02-16 11:50           ` Andrei Gherzan

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=Y+zcqqNE01cNcm1Y@qwirkle \
    --to=andrei.gherzan@canonical.com \
    --cc=ltp@lists.linux.it \
    /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