From: Henry N. <hen...@ar...> - 2008-12-30 17:14:54
|
Hello Tobbe, thank for your report. A very interesting bug with big risk losing data. I can reproduce it and I will warn all users, that this will corrupt Windows memory. I often got a BSOD with BAD_POOL_CALLER on shutting down Windows or on shutting down coLinux or opening new applications, after I have called this sequence in a bash: mkdir /cofs/TestDir mv /cofs/testdir From debugging, the Linux shell (bash) called such commands on cofs: stat /cofs/TestDir --> ntkernel returns success (file exist), cofs created inode=1 stat /cofs/testdir --> ntkernel returns success (file exist), cofs created inode=2 rename /cofs/TestDir /cofs/testdir/TestDir --> ntkernel returns success, but have deleted all The shell saw the "testdir" as existing and tryed to move TestDir to testdir/TestDir. That is a badly idea, because the parent can not rename itself. The attached patch is a workaround and prevents this situation. -- Henry Sam Moffatt wrote: > You've got to remember that cofs is backed onto the NTFS file system > which whilst being case preserving is by default not case sensitive on > Windows even though it can be (much fun). What has more than likely > happened that somewhere in one of the calls, Windows has behaved > strangely and ended up nuking the file. You can do weird stuff by > replicating this on Windows where you open a lower case file and cat > to one that isn't however it goes back to the same place. > > In effect the command is telling it to move to the same location, > consider the following from the Windows command line: > C:\WINDOWS\Temp>mkdir pie > C:\WINDOWS\Temp>cd pie > C:\WINDOWS\Temp\pie>mkdir TestDir > C:\WINDOWS\Temp\pie>move TestDir testdir > The process cannot access the file because it is being used by another process. > > > Its an interesting case of case sensitivities that I guess COFS should > handle better, however try enabling case sensitivity in Windows and > see if this makes a difference. I'm not entirely sure how you do this, > but Google should know the answer. > > Sam Moffatt > http://pasamio.id.au > > > > On Thu, Dec 25, 2008 at 2:14 AM, Tobbe Lundberg wrote: > >> Hi >> >> I'm running coLinux 20081217 and have C:\ mounted as /mnt/windows using cofs. >> >> Let's say I'm in /mnt/windows/someDir. This is the output of ls -lR >> >> tobbe@debian:/mnt/windows/someDir$ ls -lR >> .: >> total 0 >> drwxr-xr-x 1 tobbe tobbe 0 Dec 24 10:57 TestTest >> >> ./TestTest: >> total 0 >> -rw-r--r-- 1 tobbe tobbe 0 Dec 24 10:57 file1 >> -rw-r--r-- 1 tobbe tobbe 0 Dec 24 10:57 file2 >> -rw-r--r-- 1 tobbe tobbe 0 Dec 24 10:57 file3 >> >> now I do 'mv TestTest testtest' >> >> Doing ls -lR again gives me this: >> >> tobbe@debian:/mnt/windows/someDir$ ls -lR >> .: >> total 0 >> >> Where did my files and folder go? >> >> //Tobbe >> >> |