public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* getdents, unlink and tmpfs vs otherFS
@ 2005-06-27 14:46 Michael Tokarev
  0 siblings, 0 replies; only message in thread
From: Michael Tokarev @ 2005-06-27 14:46 UTC (permalink / raw)
  To: Kernel Mailing List

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-27 16:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-27 14:46 getdents, unlink and tmpfs vs otherFS Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox