From: Michael Tokarev <mjt@tls.msk.ru>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: getdents, unlink and tmpfs vs otherFS
Date: Mon, 27 Jun 2005 18:46:34 +0400 [thread overview]
Message-ID: <42C0114A.2000401@tls.msk.ru> (raw)
I've got a weird problem a while back - my initrd script
does not work when the root is on cciss device. It turned
out to be a problem with $SUBJ. /dev/cciss/ is quite large
(alot of disks and partitions), and when initrd is on tmpfs
(initramfs it really is), and run-init is executed, it tries
to remove /dev/cciss, it fails. And here's why.
uclibc does the following on readdir():
open(.., O_DIRECTORY) = 3
getdents(3, /* 197 entries */, 3933) = 3932
lseek(3, 2728, SEEK_SET) = 2728
unlink(..)
....
getdents(3, /* 85 entries */, 3933) = 1700
unlink()
....
getdents(3, /* 196 entries */, 3933) = 3920
lseek(3, 6816, SEEK_SET) = 6816
....
and finally rmdir() which fails with "Directory
not empty" error.
And eg glibc, or dietlibc, or klibc - it's all
the same but without all the lseek()s, and with
final rmdir() successeful.
It's on tmpfs.
On ext[23], final rmdir succed on both cases,
ie, with and without lseek.
Is it a bug in tmpfs, or in uclibc?
Thanks.
/mjt
reply other threads:[~2005-06-27 16:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42C0114A.2000401@tls.msk.ru \
--to=mjt@tls.msk.ru \
--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