Date: Fri, 25 Aug 2000 00:27:07 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: nick@accelica.com (Nick Popoff) Cc: freebsd-fs@FreeBSD.ORG Subject: Re: Strange MSDOS fs behavior Message-ID: <200008250027.RAA27526@usr01.primenet.com> In-Reply-To: <Pine.BSF.4.21.0008211942560.42137-100000@localhost> from "Nick Popoff" at Aug 21, 2000 09:16:09 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> What I'm seeing is that a Win98 partition I've mounted is garbling MP3 > files I'm storing there when they are played. The file is unchanged, but > when I play the file it always cuts off with about 1 minute left to > play. > > If I copy that file out of the Win98 partition to my Unix home directory, > it plays fine. If I FTP it to my Windows box it plays fine. However, if > I mount that Win98 partition with Samba on that Windows box, an play it on > the Windows box, it screws up. The only conclusion I can draw is that the > FreeBSD fs driver for the msdos partition is corrupting data as it reads > it for applications... and in a predictable way for each file, since the > song will cut off at the same place every time I play it. An alternative is that it is mmap'ing the file as it attempts to play it, and there is a bug in the MSDOSFS getpages. To test this theory, copy the file to a normal partition (where it will normally not screw up); then: dd if=my.mp3 bs=4096 of=/dev/null If it doesn't give you an even number of buffers copies, then it is not exactly an even number of pages long. Example: dd if=my.mpg bs=4096 of=/dev/null 478+1 records in 478+1 records out 1959713 bytes transferred in 0.263275 secs (7443600 bytes/sec) Then, given the remainder above, give the same block count to truncate the file to a page boundary: dd if=my.mp3 bs=4096 count=478 of=new_my.mp3 Then take the new file, and play it off the normal partition... does it cut off in the same place? If so, you've identified the problem as a page boundary error. If not, you have verified that page boundaries are not the problem. Try with FS block size boundaries instead (1k, 512b, etc.) to see if it's the disk I/O rather than the mmap code. Further debugging is left as an exercise for the reader. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008250027.RAA27526>