linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sid Moore <learnmost@gmail.com>
To: linux-nfs@vger.kernel.org
Subject: Report bug: space not released when file deleted.
Date: Mon, 23 May 2011 13:42:41 +0800	[thread overview]
Message-ID: <BANLkTikCdr6P-WFBdshPwiBQ5_LK-qobLQ@mail.gmail.com> (raw)

Hi,

On Linux NFS, I found a file deleted but its space not released in
NFSv3. It is on 2.6.32.

The steps for reproducing are listed below.
1) create a ext3 filesystem on a device, mount it to local dir
/exports/fs1_ext3/, export /exports/fs1_ext3/ with no_subtree_check to
a NFS client. this client mount this exported dir with infinite
retrans.
2) on the ext3 fs, create a large regular file  (say: 600MB)
3) on NFS client, starts several processes who reading this file in 2)
in parallel
4) during step 3), kill all nfsd threads, umount this ext3 fs; then
mount this ext3 to /exports/fs1_ext3; start 8 nfsd threads.
5) after processes finished reading, delete this file. then, I found
the space occupied but this file not released.

during step 4), I think an anonymous dentry of this file was created
after fh_verify(). in step 5), a named dentry of this file also
created. So, there are two dentry on this inode. but when deleting,
only the named dentry deleted. only restart this ext3 fs or dcache
shrinked, the anonymous dentry will not be released and it referenced
the inode of this file. so its space not freed.

is my analysis correct?  anyone has encountered this issue before? or,
this issue was fixed by someone? Thanks.

--
Sid

             reply	other threads:[~2011-05-23  5:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23  5:42 Sid Moore [this message]
2011-05-23 11:30 ` Report bug: space not released when file deleted Jeff Layton
2011-05-23 14:02   ` J. Bruce Fields
2011-05-24  1:40     ` Sid Moore

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=BANLkTikCdr6P-WFBdshPwiBQ5_LK-qobLQ@mail.gmail.com \
    --to=learnmost@gmail.com \
    --cc=linux-nfs@vger.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;
as well as URLs for NNTP newsgroup(s).