From: unDEFER <undefer@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: FileSystem, "." and "..", rmdir
Date: Sun, 06 Nov 2005 18:05:03 +0300 [thread overview]
Message-ID: <op.sztqupcjty9wl4@undecomp> (raw)
Hello,
I'm newbie in kernel programming and try to write filesystem, and have two problems.
1) There are not "<mount-point>/.", "<mount-point>/..", and "<mount-point>/<any_dir>/.." entries,
for example:
# ls -a
dir link text_file
# ls -a dir/
. level_2
# ls -a dir/level_2/
. ..
I make
filldir(dirent, ".", 1, i, ino, DT_DIR) and
filldir(dirent, "..", 2, i, parent_ino(filp->f_dentry))
in readdir() for all directories.
2) Problem with removing not empty directories:
# ls -l
total 135
drwxr-xr-x 3 root root 0 Nov 6 17:48 dir
lr-xr-xr-x 1 root root 1024 Nov 2 11:13 link -> /home/undefer
-r-xr-xr-x 1 root root 274944 Nov 2 11:13 text_file
# rmdir dir
rmdir: `dir': Directory not empty
# ls -l
total 135
?--------- 0 root root 0 Jan 1 1970 dir
lr-xr-xr-x 1 root root 1024 Nov 2 11:13 link -> /home/undefer
-r-xr-xr-x 1 root root 274944 Nov 2 11:13 text_file
So anything call "delete_inode" for directory and it's entries but it is not empty! What is? Why? What I could made not so?
Thanks,
Sorry for bad english.
--
registered Linux user #360474
Don't worry, I can read OpenOffice.org
next reply other threads:[~2005-11-06 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-06 15:05 unDEFER [this message]
2005-11-07 0:05 ` FileSystem, "." and "..", rmdir unDEFER
2005-11-07 7:35 ` unDEFER
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=op.sztqupcjty9wl4@undecomp \
--to=undefer@gmail.com \
--cc=linux-kernel@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