linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Potential Bug in NILFS2: Disk Space Not Freed After File Deletion
@ 2024-08-01 15:43 Yifei Liu
  2024-08-01 18:40 ` Ryusuke Konishi
  0 siblings, 1 reply; 5+ messages in thread
From: Yifei Liu @ 2024-08-01 15:43 UTC (permalink / raw)
  To: konishi.ryusuke, linux-nilfs; +Cc: Erez Zadok, Geoff Kuenning, Scott Smolka

Dear NILFS2 Maintainers,

I hope this message finds you well. I am writing to report a potential
bug we have encountered in NILFS2 related to disk space management
while testing it with our model checking tool, Metis. The issue arises
after performing the following operations:

Steps to Reproduce:
1. Mount the NILFS2 file system.
2. Continuously create files in the NILFS2 file system until the disk
space is completely used up (ENOSPC).
3. Delete all the files created in the previous step.
4. Sleep for 1 minute to allow the cleanerd to run.
5. Repeat steps 2-4 a few times.

Note: The protection_period parameter in nilfs_cleanerd.conf has been
changed from the default 3600 seconds to 10 seconds for quicker
observation of the bug.

Expected Behavior: After deleting all files, the disk usage should
decrease to zero or near zero, reflecting the freed space.

Observed Behavior: Occasionally, after deleting the files, the file
system remains stuck at a high usage (88% or 100% in our experiments)
and does not free any space. When we try to create another file, it
fails and reports "no space left on the device". We also tried
manually running the cleanerd once the system’s space usage was stuck
at high percentages; even though some of the segments appear to be not
protected and have 0% live blocks, according to the lssu output, the
space was still not cleaned. This issue occurs sporadically and is not
consistent across all tests (thus, we suspect it may be a race
condition).

We have created a GitHub repository containing a detailed README, the
script used to generate this problem, an example log generated in one
of our experiments, and the necessary files. Running this script and
obtaining all the outputs takes approximately 10 minutes. The script
sets up a ramdisk and mounts NILFS2 with the minimum possible size of
1028 KiB. Here is the link to the GitHub repository:
https://github.com/sbu-fsl/nilfs2-full-space.git.

I would appreciate any insights or assistance you could provide
regarding this issue. If you require any further information, logs, or
specific test cases, please let me know, and I will be happy to
provide them.

Best regards,

Yifei Liu
File systems and Storage Lab (Stony Brook University)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-14  1:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 15:43 Potential Bug in NILFS2: Disk Space Not Freed After File Deletion Yifei Liu
2024-08-01 18:40 ` Ryusuke Konishi
2024-08-05  4:30   ` Yifei Liu
2024-08-06  2:42     ` Ryusuke Konishi
2024-08-14  1:09       ` Yifei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).