From: Matthew Wilcox <willy@debian.org>
To: Anthony Chee <anthony.chee@polyu.edu.hk>
Cc: Matthew Wilcox <willy@debian.org>, linux-fsdevel@vger.kernel.org
Subject: Re: delete file entry and free space
Date: Sun, 19 May 2002 15:47:44 +0100 [thread overview]
Message-ID: <20020519154744.A14534@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <000501c1ff30$5679f1f0$0100a8c0@winxp>; from anthony.chee@polyu.edu.hk on Sun, May 19, 2002 at 08:25:59PM +0800
On Sun, May 19, 2002 at 08:25:59PM +0800, Anthony Chee wrote:
> And does "rm" also involve ftruncate process?
No.
> >From manual of unlink system call, it said the space will be resused no more
> process reference to it.
> How can I know any process reference to the file, and does it reflect in
> dentry structure? Is it dentry->d_count?
it's dentry->d_inode->i_nlink. Read the code for iput(). Note that the
calling chain is d_delete() -> dentry_iput() -> iput(). dentry->d_count
is `how many people have a reference to this dentry', which is very
different from how many people have a reference to this inode.
> Actually, I am quite confuse on d_delete(dentry) and dput(dentry). Thanks
dput is `i have finished using this dentry now', d_delete is `i have
deleted the name this dentry refers to'.
--
Revolutions do not require corporate support.
next prev parent reply other threads:[~2002-05-19 14:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-18 22:56 delete file entry and free space Anthony Chee
2002-05-19 0:41 ` Matthew Wilcox
2002-05-19 12:25 ` Anthony Chee
2002-05-19 14:47 ` Matthew Wilcox [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-05-20 23:28 Bryan Henderson
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=20020519154744.A14534@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=anthony.chee@polyu.edu.hk \
--cc=linux-fsdevel@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