NetBSD Problem Report #8037
Received: (qmail 10144 invoked from network); 20 Jul 1999 13:15:33 -0000
Message-Id: <199905211823.LAA02033@holmes.physcip.uni-stuttgart.de>
Date: Fri, 21 May 1999 11:23:56 -0700 (PDT)
From: tobi@holmes.physcip.uni-stuttgart.de
Reply-To: tobi@physcip.uni-stuttgart.de
To: gnats-bugs@gnats.netbsd.org
Subject: Problems with MSDOSFS on DEC 3000 (port-alpha)
X-Send-Pr-Version: 3.95
>Number: 8037
>Category: kern
>Synopsis: msdosfs on DEC Alpha does not work correctly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 20 06:20:00 +0000 1999
>Closed-Date: Wed Mar 22 14:58:27 +0000 2000
>Last-Modified: Wed Mar 22 15:04:25 +0000 2000
>Originator: Tobias Ernst
>Release: NetBSD 1.4 Release
>Organization:
University of Stuttgart, Germany
>Environment:
DEC 3000, NetBSD 1.4 Release
System: NetBSD holmes 1.4 NetBSD 1.4 (HOLMES) #0: Mon May 10 17:03:43 PDT 1999 root@holmes:/usr/src/sys/arch/alpha/compile/HOLMES alpha
>Description:
We have a DEC 3000 with SCSI floppy and SCSI zip disk and want to mount
FAT / MSDOS formatted media into the filesystem. However, the NetBSD
msdos file system is not able to handle these volumes properly. It can read
the root directory and its contents, and we can copy off files from the
root directory.
However, all subdirectories on the disk are shown as empty, not even
containing "." and "..". In addition, we cannot copy anything onto the
disk, neither to the root directory nor to any subdirectories, nor can we
create subdirectories.
Here is what NetBSD probes on our hardware, in case it is important (in this
example, only the SCSI floppy was attached):
tcds0 at tc0 slot 2 offset 0x0: TurboChannel Dual SCSI (baseboard)
asc0 at tcds0 chip 0: NCR53C94, 25MHz, SCSI ID 7
scsibus0 at asc0: 8 targets, 8 luns per target
probe(asc0:3:0): max sync rate 5.00Mb/s
sd0 at scsibus0 targ 3 lun 0: <DEC, RZ26L (C) DEC, 440C> SCSI2 0/direct fixed
sd0: 1001MB, 3117 cyl, 8 head, 82 sec, 512 bytes/sect x 2050860 sectors
sd1 at scsibus0 targ 5 lun 0: <DEC, RX33 (C) DEC, 0070> SCSI1 0/direct remov
able
sd1: 1MB, 80 cyl, 2 head, 18 sec, 512 bytes/sect x 2880 sectors
>How-To-Repeat:
We use
mount -t msdos /dev/sd1c /mnt
to mount the SCSI diskette resp.
mbrlabel sd2
mount -t msdos /dev/sd2a /mnt
(or: mount -t msdos /dev/sd2d /mnt)
to mount the ZIP. Then,
ls /mnt
will show the contents of the root directory, but
ls /mnt/test
(given that test is a subdirectory that has been created and populated
with a DOS PC or with mtools) will show nothing at all, even if there are
files in the subdirectory. The following command:
cp testfile /mnt
will result in
cp: /mnt/testfile: Argument list too long
and an entry for testfile will be found in /mnt, but with 0 bytes length.
mkdir /mnt/test2
will yield
mkdir: /mnt/test2: Is a directory
and the subdiretory will be created, but with zero length and zero contents.
>Fix:
An experienced person would need to check the msdosfs source code for
64bit glitches or other alpha specific things. In case it is not Alpha
generic, but only happens on our machine, I could provide accounts if
necessary, as it is not yet in production.
>Release-Note:
>Audit-Trail:
From: cgd@netbsd.org (Chris G. Demetriou)
To: tobi@physcip.uni-stuttgart.de
Cc: gnats-bugs@gnats.netbsd.org, ross@netbsd.org
Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 25 Jul 1999 17:00:10 -0700
tobi@holmes.physcip.uni-stuttgart.de writes:
> An experienced person would need to check the msdosfs source code for
> 64bit glitches or other alpha specific things. In case it is not Alpha
> generic, but only happens on our machine, I could provide accounts if
> necessary, as it is not yet in production.
It appears to be a generic alpha problem; i've been able to replicate
it and (even better) fix it. (I run releases at home, so the fix is
against 1.4, even.)
The patch isn't quite ready to go into the sources yet, or be
published for general use (i'd like people with more experience with
msdosfs to look it over first) but i believe it's correct and can send
it to you if that'd be useful to you.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
State-Changed-From-To: open->analyzed
State-Changed-By: cgd
State-Changed-When: Sun Jul 25 17:10:19 PDT 1999
State-Changed-Why:
see above.
Responsible-Changed-From-To: port-alpha-maintainer->cgd
Responsible-Changed-By: cgd
Responsible-Changed-When: Sun Jul 25 17:10:19 PDT 1999
Responsible-Changed-Why:
see above
From: cgd@netbsd.org (Chris G. Demetriou)
To: tobi@physcip.uni-stuttgart.de
Cc: gnats-bugs@gnats.netbsd.org, ross@netbsd.org
Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 25 Jul 1999 17:06:52 -0700
Forgot to mention in my previous mail:
tobi@holmes.physcip.uni-stuttgart.de writes:
> will show the contents of the root directory, but
> ls /mnt/test
> (given that test is a subdirectory that has been created and populated
> with a DOS PC or with mtools) will show nothing at all, even if there are
> files in the subdirectory. The following command:
> cp testfile /mnt
> will result in
> cp: /mnt/testfile: Argument list too long
> and an entry for testfile will be found in /mnt, but with 0 bytes length.
These are symptoms of the LP64 bug that i've vixed...
> mkdir /mnt/test2
> will yield
> mkdir: /mnt/test2: Is a directory
> and the subdiretory will be created, but with zero length and zero contents.
As is the latter chunk of this (actually, it's created just fine, but
the filesystem doesn't understand that when it looks it up to stat it
or read its contents).
the "mkdir: /mnt/test2: Is a directory" error was caused by a
different problem, which was reported in PR 7630 and has already been
fixed in NetBSD-current and on the NetBSD 1.4.x branch.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
State-Changed-From-To: analyzed->feedback
State-Changed-By: cgd
State-Changed-When: Mon Jul 26 22:40:51 PDT 1999
State-Changed-Why:
fixes have been committed to -current, and submitter has been sent
patches which address the problems in 1.4.x.
From: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
To: "Chris G. Demetriou" <cgd@netbsd.org>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Tue, 27 Jul 1999 17:36:52 +0200
Hallo!
> A patch to solve the alpha msdosfs export problem is below. please
> try it out and tell me how it goes.
We made it work, finally. Thanks again for your work.
We had a lot of trouble with the NFS setup, though. I don't think they are
related with msdosfs in particular, but perhaps you are interested anyway:
At home, I have a Linux box with a ZIP disk that is shared via NFS to a
FreeBSD computer. I simply start nfsd and mountd on the Linux box and
startup, and nfs mount the share on FreeBSD, and later I can mount and
umount ZIP disks happily and FreeBSD will always see the ZIP contents (or
nothing, if no ZIP is in the drive).
Here in the lab, with the NetBSD server and DEC Unix clients, things were
more complicated:
The first thing that turned out is that if no ZIP is mounted when the NFS
mount is established, the DEC Unix clients will never see the contents of
the ZIP disk, even if later a ZIP disk is mounted. If the DEC Unix client
writes a file to the directory, it will turn up on the NetBSD FFS filesystem
in the mount points directory, rather than on the ZIP disk even though the
ZIP was mounted at that time.
Interestingly, if the NFS mount once is established in this way, we can
happily remove the ZIP and insert a different one, and the client will
reflect the changes immediately. The only problem is that the NFS mount
itself. We worked around this by shell script magic that dynamically
establishes the mount atthe right time if it is not established yet.
Another curiosity is that each time that we mount a new ZIP disk on the
NetBSD server, we have to HUP the NetBSD's mountd, or else the clients will
get "permission denied" when trying to mount or access the ZIP disk.
Yet another curiosity is that if we unmount the ZIP disk on NetBSD, the
mount point on the DEC clients simply vanishes (!). It does not show up in
ls -la, you cannot access it in any form, nothing. If then, a new ZIP is
inserted, mounted, and the NetBSD mountd is HUPped, the clients suddenly
show the mount point again, together with the correct contents.
Well, at least it works. I think I don't even want to know which OS is
responsible for which part of these strange effects :-). Thanks to your
patches, we have a working solution now and are very grateful for that.
Kind Regards,
Tobias.
From: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
To: "Chris G. Demetriou" <cgd@netbsd.org>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Tue, 27 Jul 1999 18:49:40 +0200
Hallo!
> Well, at least it works.
Well, nearly ... look at the following command sequence. It would qualify
for a Unix joke book, if ever one would be printed:
tobi@twinky /zip >ls -F
kp/
tobi@twinky /zip >mv kp k
tobi@twinky /zip >mv k KP
tobi@twinky /zip >mv KP kp
mv: rename KP to kp/KP: Invalid argument
tobi@twinky /zip >mv KP k
tobi@twinky /zip >mv k kp
mv: rename k to kp/k: Invalid argument
tobi@twinky /zip >rmdir kp
rmdir: kp: No such file or directory
tobi@twinky /zip >mv k kp
tobi@twinky /zip >
This happens both on the NFS clients as well as on the NetBSD system itself.
The problem is that the command "mv KP kp" seriously confuses the MSDOS file
system, so that later, it thinks that a "kp" directory still exists which
actually doesn't. We tried the same sequence on Linux, but there it worked
OK.
The filesystem was mounted with -l, if that matters.
Kind Regards,
Tobias.
From: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
To: "Chris G. Demetriou" <cgd@netbsd.org>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Tue, 27 Jul 1999 19:38:21 +0200
Hallo!
> > Well, at least it works.
Still a major problem :-(
tobi@twinky /zip/kp/korr >cp -R /home/tobi/kp/korr/protokoll .
cp: /home/tobi/kp/korr/protokoll/exp.tex: No space left on device
cp: ./protokoll/trara2.tif: I/O error
cp: ./protokoll/trara3.tif: I/O error
cp: ./protokoll/fermi.eps: I/O error
tobi@twinky /zip/kp/korr >ll /home/tobi/kp/korr/protokoll/exp.tex
-rw-r--r-- 1 tobi assists 10773 Jul 26 11:51
/home/tobi/kp/korr/protokoll/exp.tex
tobi@twinky /zip/kp/korr >df -k
Filesystem 1024-blocks Used Available
Capacity Mounted on
[...]
holmes:/zip 98090 60264 37826
62% /zip
tobi@twinky /zip/kp/korr >ls -la
total 10
drwx------ 1 tobi system 2048 Jul 27 19:15 ./
drwx------ 1 tobi system 2048 Jul 14 16:55 ../
drwx------ 1 tobi system 2048 Jul 27 19:16 bilder/
drwx------ 1 tobi system 2048 Jul 27 19:15 messung/
drwx------ 1 tobi system 2048 Jul 27 19:30 protokoll/
tobi@twinky /zip/kp/korr >ls -la protokoll
total 4195598
-rwx------ 1 tobi system 614611 Jul 27 19:31 dual.eps*
-rwx------ 1 tobi system 4294901760 Jul 26 11:51 exp.tex*
-rwx------ 1 tobi system 139872 Jul 27 19:31 fermi.eps*
-rwx------ 1 tobi system 491184 Jul 27 19:31 trara2.tif*
-rwx------ 1 tobi system 139892 Jul 27 19:31 trara3.tif*
tobi@twinky /zip/kp/korr >cd protokoll
tobi@twinky /zip/kp/korr/protokoll >ls -la
. not found
tobi@twinky /zip/kp/korr/protokoll >
Of course I can copy exp.tex alone and everything works great. Only the cp
-R call will blow up the exp.tex file that much. Another 64 bit problem?
twinky is one of the DEC clients, BTW.
Kind Regards,
Tobias.
From: cgd@netbsd.org (Chris G. Demetriou)
To: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 16 Aug 1999 21:48:08 -0700
Tobias Ernst <tobi@physcip.uni-stuttgart.de> writes:
> > > Well, at least it works.
>
> Still a major problem :-(
> [ ... ]
Sorry i've not had time to look at this recently, but i've been really
busy at work. (Of course, if you'd given me permission to copy your
mail to the PR, or had cc'd it there yourself, others might have been
able to help you out, too...)
Anyway, i've now found a little time look into the problem again...
i'll tell you what i find.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: tobi@physcip.uni-stuttgart.de (UUCP)
To: cgd@netbsd.org (Chris G. Demetriou)
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Tue, 17 Aug 1999 10:32:24 +0200
Hallo Chris!
CGD> Sorry i've not had time to look at this recently, but i've been
CGD> really busy at work. (Of course, if you'd given me permission to copy
CGD> your mail to the PR, or had cc'd it there yourself, others might have
CGD> been able to help you out, too...)
I'm really sorry if this has caused trouble. Of course you are allowed to
forward all my mails concerning this topic to everybody that might be able to
help. I thought this would be implicitly clear because I declared the original
PR as non-confidential.
Well, I will try to reproduce the problem with copying subdirectory trees as
you suggested, you'll hear from me soon. (I'll have to find my plastic gloves
<grin> and reinstall my Windows NT at home to do the clean format, this might
take some time.)
Viele Gr=FC=DFe,
Tobias
From: cgd@netbsd.org (Chris G. Demetriou)
To: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 16 Aug 1999 22:21:33 -0700
Tobias Ernst <tobi@physcip.uni-stuttgart.de> writes:
> Well, nearly ... look at the following command sequence. It would qualify
> for a Unix joke book, if ever one would be printed:
bad and sad jokes. 8-)
> The problem is that the command "mv KP kp" seriously confuses the MSDOS file
> system, so that later, it thinks that a "kp" directory still exists which
> actually doesn't.
I believe this is related to/the same as the problems detailed in PRs
5468 and/or 6130.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: cgd@netbsd.org (Chris G. Demetriou)
To: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 16 Aug 1999 22:15:47 -0700
Tobias Ernst <tobi@physcip.uni-stuttgart.de> writes:
> At home, I have a Linux box with a ZIP disk that is shared via NFS to a
> FreeBSD computer. I simply start nfsd and mountd on the Linux box and
> startup, and nfs mount the share on FreeBSD, and later I can mount and
> umount ZIP disks happily and FreeBSD will always see the ZIP contents (or
> nothing, if no ZIP is in the drive).
>
> Here in the lab, with the NetBSD server and DEC Unix clients, things were
> more complicated:
> [ ... ]
It sounds like, in a nutshell, the linux NFS server is broken with
respect to traditional ("correct") NFS mount point semantics.
two different file systems mounted on the same location (or none)
should not be considered the same as far as clients are concerned.
It's dangerous, among other things.
> Interestingly, if the NFS mount once is established in this way, we can
> happily remove the ZIP and insert a different one, and the client will
> reflect the changes immediately.
This is actually more bug than feature. There's no sane way to
distinguish between two different file systems in DOS (other than
perhaps the volume label, but that's not so reliable iirc).
If you were using FFSes on those zips, i don't think you've have the
"success" that you're having. (generation numbers on the root inode.)
> Another curiosity is that each time that we mount a new ZIP disk on the
> NetBSD server, we have to HUP the NetBSD's mountd, or else the clients will
> get "permission denied" when trying to mount or access the ZIP disk.
Not surprising.
> Yet another curiosity is that if we unmount the ZIP disk on NetBSD, the
> mount point on the DEC clients simply vanishes (!). It does not show up in
> ls -la, you cannot access it in any form, nothing. If then, a new ZIP is
> inserted, mounted, and the NetBSD mountd is HUPped, the clients suddenly
> show the mount point again, together with the correct contents.
This is a client bug, and i think the NetBSD client suffers from the
same bug, actually.
chris
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
To: cgd@netbsd.org
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Fri, 6 Aug 1999 13:25:45 +0200
Hello Chris!
Some days ago I received a mail from the gnats robot, reminding me that my bug
report was still unresolved. Well, indeed it is ...
Did you receive my last mails? Well, the minor issues the first two mails
mentioned are not really important, but the third one is. To sum it up
again: I copied a subdirectory tree recursively to the ZIP, and one certain
file out of the subdirectory tree made the process abort with "disk full".
Then, the directory listing of the destination disks shows that file with a
size greater than the ZIP disks size, or alternatively the destination
directory becomes unreadable at all.
If you want, I can try to reproduce the problem with as few files involved
as possible, and send you a dd of the ZIP disk before the process, and the
set of files that have to be copied to it to trigger the problem.
Kind Regards,
Tobias.
--
From: cgd@netbsd.org (Chris G. Demetriou)
To: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: 16 Aug 1999 22:27:42 -0700
Tobias Ernst <tobi@physcip.uni-stuttgart.de> writes:
> If you want, I can try to reproduce the problem with as few files involved
> as possible, and send you a dd of the ZIP disk before the process, and the
> set of files that have to be copied to it to trigger the problem.
I was not able to replicate the problem here.
If you could:
* make sure the disk is either 'clean' (i.e. fresh 'format' on a
dos/windows box), or passes dos/windows chkdsk/scandisk, then
* send me a before and after image of the disk when you trigger the
problem, along with the actual files that triggered it,
I can look into it. It seems likely to me that unless you know the FS
was cleanly formatted or clean according to DOS/windows that what
you're seeing might be the result of previous corruption.
chris
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
To: "Chris G. Demetriou" <cgd@netbsd.org>
Cc: Subject: Re: port-alpha/8037: Problems with MSDOSFS on DEC 3000 (port-alpha)
Date: Thu, 2 Sep 1999 20:20:08 +0200
Hallo Chris!
Finally, I found time to analyze the problem. There definitely is a problem,
and it has nothing to do with prior corruption of the disk. I was not able
to reproduce the problem with the "exploding" file, but another one which
also is typical, where a file on disk is "transformed" into a directory on
the ZIP while copying. Here is what I did:
- Wiped out a disk (another one!) with
dd bs=512 if=/dev/zero of=/dev/sd1c
- Recreated the filesystem with
mformat -t 96 -h 64 -s 32 -H 32 z:
An image of the disk at this state is in before.dd.gz
- Mounted the disk with
mount_msdos -l /dev/sd1a /zip
- Untarred the files from betacompton.tar.gz into a directory on hard disk
- Copied those files to the zip with
cp -R beta compton /zip
The messages that were generated with the copy process are in the file
cplog, an image of the disk after this action is in after.dd.gz.
You can grab all files that I mentioned from
http://www.physcip.uni-stuttgart.de/tobi/zipproblem
I did not want to send these amounts via e-mail.
Thansk for your efforts, and kind regards,
Tobias.
From: cgd@netbsd.org (Chris G. Demetriou)
To: Tobias Ernst <tobi@physcip.uni-stuttgart.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-alpha/8037
Date: 31 Oct 1999 00:08:31 -0700
Tobias Ernst <tobi@physcip.uni-stuttgart.de> writes:
> Did you get anywhere with the MSDOS filesystem problem? Have you received
> the dumps of the ZIP disk and any idea what the problem is? It is really
> easy to reproduce, our users have started complaining about it. Just copy a
> huge number of small files recursively, and you will see the bug sooner or
> later.
Unfortunately, i've had ~no time to look into it. As noted
previously, i believe this is related to several other open PRs.
We're having a "bug fix week" this ~week, trying to get some of the
older and/or more serious PRs solved, i'll see if i can get somebody
with more time to look at this issue.
Thanks very much for your patience...
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
State-Changed-From-To: feedback->open
State-Changed-By: cgd
State-Changed-When: Sun Oct 31 00:15:30 PDT 1999
State-Changed-Why:
it seems that there are still open issues here (though not the one originally
mentioned).
State-Changed-From-To: open->analyzed
State-Changed-By: jdolecek
State-Changed-When: Sat Nov 6 14:07:01 PST 1999
State-Changed-Why:
I managed to repeat the directory shuffling bug on i386 and I'm going to fix it.
Responsible-Changed-From-To: cgd->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Sat Nov 6 14:07:01 PST 1999
Responsible-Changed-Why:
I'll take care about the MI bug.
Date: Wed, 22 Dec 1999 23:26:39 +0100 (MET)
From: Jaromir Dolecek <dolecek@ics.muni.cz>
Hi,
could you please check out this patch if it solves
your problem ? I tested it on machine I don't have
access at the moment, so I don't have the exact sources
I tested the patch with, hopefully I didn't do any typo.
I didn't send you the patch since I discussed it with some other
developers ... anyway, even if it's not 100% correct,
should make your go :)
Index: msdosfs_vnops.c
===================================================================
RCS file: /cvsroot/syssrc/sys/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.89
diff -u -r1.89 msdosfs_vnops.c
--- msdosfs_vnops.c 1999/11/15 18:49:11 1.89
+++ msdosfs_vnops.c 1999/12/22 22:03:34
@@ -964,6 +964,14 @@
goto abortit;
}
+ /*
+ * Do not attempt to move directory into itself.
+ */
+ if (!tvp && fvp == tdvp) {
+ error = EINVAL;
+ goto abortit;
+ }
+
/* */
if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0)
goto abortit;
Please let me know about any problems you might encounter.
Best regards
Jaromir
--
Jaromir Dolecek <dolecek@ics.muni.cz> http://www.ics.muni.cz/~dolecek/
-------------------------------------------------------------------------
It is better never to have been born. But who among us has such luck?
One in a million, perhaps.
From: Jaromir Dolecek <dolecek@ics.muni.cz>
To: tobi@holmes.physcip.uni-stuttgart.de, gnats-bugs@netbsd.org
Cc: Subject: Re: kern/8037 - msdosfs on DEC Alpha does not work correctly
Date: Tue, 1 Feb 2000 15:32:52 +0100 (MET)
Hi,
I've just come up with real solution to the problem. The problem was
that name cache didn't aggree with the filesystem over existence
of some files.
Can you please try following patch, if it solves your problem ?
I was not able to reproduce it with this change. Hopefully
it won't create any new problem ...
XXXXX
Index: msdosfs_vnops.c
===================================================================
RCS file: /cvsroot/syssrc/sys/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.90
diff -u -p -r1.90 msdosfs_vnops.c
--- msdosfs_vnops.c 2000/02/01 10:33:19 1.90
+++ msdosfs_vnops.c 2000/02/01 14:06:50
@@ -1055,13 +1055,13 @@ abortit:
error = ENOTDIR;
goto bad;
}
- cache_purge(tdvp);
} else if (doingdirectory) {
error = EISDIR;
goto bad;
}
if ((error = removede(dp, xp)) != 0)
goto bad;
+ cache_purge(tvp);
vput(tvp);
xp = NULL;
}
@@ -1150,6 +1150,7 @@ abortit:
VOP_UNLOCK(fvp, 0);
goto bad;
}
+ cache_purge(fvp);
if (!doingdirectory) {
error = pcbmap(dp, de_cluster(pmp, to_diroffset), 0,
&ip->de_dirclust, 0);
XXXXX
Best regards
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@
State-Changed-From-To: analyzed->feedback
State-Changed-By: jdolecek
State-Changed-When: Tue Feb 1 06:42:01 PST 2000
State-Changed-Why:
Patch to the MI problem sent for testing.
State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek
State-Changed-When: Sat Feb 19 15:58:26 PST 2000
State-Changed-Why:
Since the submitter didn't reply to the mail sent on 2000/02/01 and
the bug was easily reproducible and fixed, there is no reason to keep
the PR open.
State-Changed-From-To: closed->analyzed
State-Changed-By: jdolecek
State-Changed-When: Tue Mar 7 10:11:37 PST 2000
State-Changed-Why:
*blush* Only the directory renaming bug was fixed, the one with copying lot's
of files to ZIP not. Stay tuned.
State-Changed-From-To: analyzed->feedback
State-Changed-By: jdolecek
State-Changed-When: Mon Mar 20 00:24:08 PST 2000
State-Changed-Why:
The patch should fix the remaining problem.
From: Jaromir Dolecek <dolecek@ics.muni.cz>
To: tobi@physcip.uni-stuttgart.de, gnats-bugs@netbsd.org
Cc: Subject: Re: kern/8037: msdosfs on DEC Alpha does not work correctly
Date: Mon, 20 Mar 2000 09:24:45 +0100 (MET)
Hi,
can you please try out this patch if it improves the situation,
and let me know ?
Thanks
Jaromir
XXXX
--- msdosfs_fat.c.orig Mon Mar 20 09:12:24 2000
+++ msdosfs_fat.c Mon Mar 20 09:13:15 2000
@@ -274,14 +274,14 @@ fc_lookup(dep, findcn, frcnp, fsrcnp)
{
int i;
u_long cn;
- struct fatcache *closest = 0;
+ struct fatcache *closest = NULL, *fc = dep->de_fc;
- for (i = 0; i < FC_SIZE; i++) {
- cn = dep->de_fc[i].fc_frcn;
- if (cn != FCE_EMPTY && cn <= findcn) {
- if (closest == 0 || cn > closest->fc_frcn)
- closest = &dep->de_fc[i];
- }
+ for (i = 0; i < FC_SIZE; i++, fc++) {
+ cn = fc->fc_frcn;
+ if (cn != FCE_EMPTY && cn <= findcn
+ && fc->fc_fsrcn != (0xffffffff&dep->de_pmp->pm_fatmask)
+ && (closest == NULL || cn > closest->fc_frcn))
+ closest = fc;
}
if (closest) {
*frcnp = closest->fc_frcn;
XXXX
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
@@@@ Wanna a real operating system ? Go and get NetBSD, damn! @@@@
State-Changed-From-To: feedback->closed
State-Changed-By: jdolecek
State-Changed-When: Wed Mar 22 06:58:27 PST 2000
State-Changed-Why:
The bug is fixed. It was an bogus LP64 fix which broke msdosfs.
You need:
$NetBSD: fat.h,v 1.14 2000/03/22 14:33:25 jdolecek Exp $
$NetBSD: msdosfs_lookup.c,v 1.47 2000/03/22 14:56:56 jdolecek Exp $
Thanks for report :)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.