Problems with 2.6.10-rc2-bk12 and directory entries
From: Holger Kiehl (Holger.Kiehl_at_dwd.de)
Date: 11/30/04
- Previous message: Fabio Coatti: "Re: 2.6.10-rc2-mm2 usb storage still oopses"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 09:30:09 +0000 (GMT) To: linux-kernel <linux-kernel@vger.kernel.org>
Hello
Using 2.6.10-rc2-bk12 on a dual Xeon which serves files at a high rate
(>200 files/second), I noticed that when doing:
ptr = dirname + strlen(dirname);
dp = opendir(dirname);
while ((dirp = readdir(dp)) != NULL)
{
if ((dirp->d_name[0] == '.') && ((dirp->d_name[1] == '\0') ||
((dirp->d_name[1] == '.') && (dirp->d_name[2] == '\0'))))
{
continue;
}
strcpy(ptr, dirp->d_name);
if (unlink(dirname) == -1)
{
if (errno == ENOENT)
{
print some error
}
}
}
That under higher load it happens that the unlink fails with ENOENT. And
this is true because the file was unlinked by a previous call. So it seems
that readdir() returns some file name that has already been removed.
This is not the only place, I have other code pathes where this also happens,
for example where I move the files away instead of unlinking.
This did not happen with 2.6.7 or any kernels before that. Filesystem is
ext3 without any extensions.
Is this a known problem? What can I do to resolve this?
Thanks,
Holger
PS: Please CC me since I am not on the list.
-
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/
- Previous message: Fabio Coatti: "Re: 2.6.10-rc2-mm2 usb storage still oopses"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|