lkml.org 
[lkml]   [2001]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[BUG] smbfs: caching problems
Hello,

there is something wrong with smbfs caching which makes my
applications fail. The behaviour happens with
linux-2.4.3-pre4 and linux-2.4.3-final.

Consider following shell script: (where /mnt/n is a
smbmounted smb share from a Win98SE box)

router|/mnt/n/temp/smbfs> I=0; while test $I -lt 127; do
echo "abc" >>/tmp/test.abc; I=$((I+1)); done # create a 508
bytes file
router|/mnt/n/temp/smbfs> I=0; while test $I -lt 129; do
echo "xyz" >>/tmp/test.xyz; I=$((I+1)); done # create a 516
bytes file
router|/mnt/n/temp/smbfs> while true; do cp /tmp/test.abc
testfile; tail -1 testfile; cp /tmp/test.xyz testfile; tail
-1 testfile; done # copy the files alternatingly and read
the destination file after it has bean overwritten
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
abc
[...Ctrl-C...]
router|/mnt/n/temp/smbfs> cd /tmp # the same on reiserfs
router|/tmp> while true; do cp /tmp/test.abc testfile; tail
-1 testfile; cp /tmp/test.xyz testfile; tail -1 testfile;
done # here it works
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
xyz
abc
[...Ctrl-C...]
router|/tmp> uname -a
Linux router 2.4.3 #5 Fri Mar 30 14:02:24 CEST 2001 i586
unknown
router|/tmp>

Obviously, the smbfs behaviour is wrong. Interstingly, the
change in the filesize of the file overwritten seems to need
to cross a 512-block-boundary in order to show the bug.

Contact me if you need more info.

Xuân.


-
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-03-22 13:22    [W:0.075 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site