From: probreak@matt.ksu.ksu.edu (James Michael Chacon) Subject: Re: 2 files with the same name in single directory, 0.99pl3, extfs Date: 29 Jan 1993 09:57:56 -0600
markus@mwhh.hanse.de (Markus Witt) writes:
>probreak@matt.ksu.ksu.edu (James Michael Chacon) writes:
>[regarding two files with the same name in one directory]
>> This hasn't come up in a while, but it can happen. Linus posted a while
>> back that if you thrash the file system hard enough then multiple files
>> with the same names can be created like this. To get rid of them is easy
>> though.
>>
>> If you just type rm <filename>, then the first one it finds will be deleted,
>> and the second one left alone. If you want to save the first one, just mv
>> it to a different name, since again it will be the first one found.
>Is this a bug in the file systems, in the kernel or what?
>How likely is this to happen. What do you call "trash the fs hard enough?"
>--
This is a race condition in the kernel that is kinda difficult to overcome
from what I remember Linus saying.
Thrashing the file system hard enough could be any number of things.
Continually removing and adding files while swapping could do it for example.
It takes quite a bit to do this, so I wouldn't really worry to much about it.
James