getdents64 problem in 2.6.23

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Oct 24 09:47:40 EDT 2007


started to use 2.6.23 in our development system a few days ago and
now I got problems when deleting files from a large directory structure.
A rm -rf does not delete all files.

Did a strace and found that some files does not appear in the
strace, the same ones that doesn't get deleted.

The files that remain are in two directories:

./doc/images:
enm_topleft.gif*
h_10g.gif*
h_cu.gif*
h_cuSfp.gif*
h_fpuym.gif*
h_mdu4T2F.gif*
h_mxp16.gif*
h_oaMon.gif*
h_oiu50.gif*
h_qmr.gif*
h_unexp_half.gif*
saveHoover.gif*
saveHooverWarn.gif*
showNormal.gif*
tab_sel.gif*
top-bar.jpg*
v_d10gbe.gif*
v_empty.gif*
v_gbemxp.gif*
v_mdu40.gif*
v_mdu4E.gif*
v_mdu4T.gif*
v_mdu8E.gif*
v_mdu8T.gif*
v_oa2Mon.gif*
v_sync.gif*
v_unexp.gif*
v_voa.gif*
wizard_logo.gif*

./lib:
liblum_mib_help_text_if.so.1@
libmgmt_mibserver_if.so.1@
libtsiif.so.1.0.0

looking at the strace a bit futher reveals:

open("cuappl02a-r10a-071024_yyy/doc/images", O_RDONLY|O_NONBLOCK|
O_LARGEFILE|O_DIRECTORY) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
getdents64(5, /* 119 entries */, 4096)  = 4064
lstat64("cuappl02a-r10a-071024_yyy/doc/images/v_roadm.gif",
{st_mode=S_IFREG|0755, st_size=2717, ...}) = 0
unlink("cuappl02a-r10a-071024_yyy/doc/images/v_roadm.gif") = 0
lstat64("cuappl02a-r10a-071024_yyy/doc/images/h_du.gif",
{st_mode=S_IFREG|0755, st_size=1632, ...}) = 0
unlink("cuappl02a-r10a-071024_yyy/doc/images/h_du.gif") = 0
....
getdents64(5, /* 0 entries */, 4096)    = 0
close(5)                                = 0

Notice the last getdents64 returning 0, I think this is wrong as there
is more the 119 files in this directory.

 Jocke




More information about the linux-mtd mailing list