linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yifei Liu <yifeliu@cs.stonybrook.edu>
To: konishi.ryusuke@gmail.com, linux-nilfs@vger.kernel.org
Cc: Erez Zadok <ezk@cs.stonybrook.edu>,
	Geoff Kuenning <geoff@cs.hmc.edu>,
	 Scott Smolka <sas@cs.stonybrook.edu>
Subject: Potential Bug in NILFS2: Disk Space Not Freed After File Deletion
Date: Thu, 1 Aug 2024 11:43:50 -0400	[thread overview]
Message-ID: <CABHrer3rrUS8x+te16eXF7HMdyYCRcoj+CS6c2T-5EmxjKO-7g@mail.gmail.com> (raw)

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)

             reply	other threads:[~2024-08-01 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 15:43 Yifei Liu [this message]
2024-08-01 18:40 ` Potential Bug in NILFS2: Disk Space Not Freed After File Deletion Ryusuke Konishi
2024-08-05  4:30   ` Yifei Liu
2024-08-06  2:42     ` Ryusuke Konishi
2024-08-14  1:09       ` Yifei Liu

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=CABHrer3rrUS8x+te16eXF7HMdyYCRcoj+CS6c2T-5EmxjKO-7g@mail.gmail.com \
    --to=yifeliu@cs.stonybrook.edu \
    --cc=ezk@cs.stonybrook.edu \
    --cc=geoff@cs.hmc.edu \
    --cc=konishi.ryusuke@gmail.com \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=sas@cs.stonybrook.edu \
    /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;
as well as URLs for NNTP newsgroup(s).