lkml.org 
[lkml]   [2005]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectgetdents, unlink and tmpfs vs otherFS
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-27 18:21    [W:0.120 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site