From: "Anthony Chee" <anthony.chee@polyu.edu.hk>
To: "Matthew Wilcox" <willy@debian.org>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: Re: delete file entry and free space
Date: Sun, 19 May 2002 20:25:59 +0800 [thread overview]
Message-ID: <000501c1ff30$5679f1f0$0100a8c0@winxp> (raw)
In-Reply-To: 20020519014141.C16740@parcelfarce.linux.theplanet.co.uk
>
> Unlink probably isn't enough. On unix-like systems, space is only
> reclaimed once there are no references to the inode. If a task has
> that file open, it's still got a reference. You could unlink the file
> and then truncate it to zero size, but any task which still has it open
> could write to it, causing the file to be non-zero-sized.
>
> If you don't care about that, then see sys_ftruncate for how to proceed.
>
> --
> Revolutions do not require corporate support.
>
And does "rm" also involve ftruncate process?
>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?
Actually, I am quite confuse on d_delete(dentry) and dput(dentry). Thanks
next prev parent reply other threads:[~2002-05-19 12:25 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 [this message]
2002-05-19 14:47 ` Matthew Wilcox
-- 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='000501c1ff30$5679f1f0$0100a8c0@winxp' \
--to=anthony.chee@polyu.edu.hk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=willy@debian.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