From: Joanne Chang <joannechien@google.com>
To: Zorro Lang <zlang@kernel.org>, fstests@vger.kernel.org
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net,
Chao Yu <chao@kernel.org>, Joanne Chang <joannechien@google.com>
Subject: [PATCH v2] f2fs/011: use random data to avoid file compression
Date: Thu, 30 Oct 2025 05:45:40 +0000 [thread overview]
Message-ID: <20251030054540.278518-1-joannechien@google.com> (raw)
Currently, the created files are filled with 0. When filesystem level
compression is used, they take up much less space than expected. So
the final fallocate does not show an error.
The created files are filled by /dev/urandom instead to ensure they
are not compressed. This way the files take up the same space whether
compression is used or not.
Signed-off-by: Joanne Chang <joannechien@google.com>
---
v2:
- changed dd to $XFS_IO_PROG as suggested by Chao Yu
tests/f2fs/011 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/f2fs/011 b/tests/f2fs/011
index c21cb586..07c94d8c 100755
--- a/tests/f2fs/011
+++ b/tests/f2fs/011
@@ -36,7 +36,7 @@ pinfile=$SCRATCH_MNT/file
# simulate fragment status in f2fs
for ((i=0;i<256;i++)) do
- $XFS_IO_PROG -f -c "pwrite 0 1m" $SCRATCH_MNT/$i >>$seqres.full
+ $XFS_IO_PROG -f -c "pwrite -i /dev/urandom 0 1m" $SCRATCH_MNT/$i >>$seqres.full
done
sync
--
2.51.1.930.gacf6e81ea2-goog
next reply other threads:[~2025-10-30 5:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 5:45 Joanne Chang [this message]
2025-10-30 6:50 ` [PATCH v2] f2fs/011: use random data to avoid file compression Chao Yu
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=20251030054540.278518-1-joannechien@google.com \
--to=joannechien@google.com \
--cc=chao@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=zlang@kernel.org \
/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