Subject: kern/2068: msdos file system mishandles rename("foobar.xxx", "foobar.xxx.~1~")
To: None <gnats-bugs@NetBSD.ORG>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 02/11/1996 13:14:22
>Number: 2068
>Category: kern
>Synopsis: msdos file system mishandles rename("foobar.xxx", "foobar.xxx.~1~")
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 11 13:35:01 1996
>Last-Modified:
>Originator: John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release: 1.1
>Environment:
System: NetBSD pattern 1.1A NetBSD 1.1A (PATTERN) #23: Sun Feb 11 10:40:16 EST 1996 jtk@pattern:/u3/NetBSD-current/src/sys/arch/i386/compile/PATTERN i386
>Description:
The msdos file system is mishandling directory entries when
renaming in non-Win'95 mode. It seems to leave the old name behind,
unfortunately.
>How-To-Repeat:
% grep msdos /etc/fstab
/dev/sd0g /msdos msdos rw,-s 1 2
% pwd
/msdos/tmp
% ls -li
total 4
223543299 -rwxr-xr-x 1 jtk staff 0 Feb 11 13:10 foobar.xxx
223543298 -rwxr-xr-x 1 jtk staff 2847 Feb 11 06:31 system.xxx
% mv foobar.xxx foobar.xxx.~1~
% ls -li
total 4
223543299 -rwxr-xr-x 1 jtk staff 0 Feb 11 13:10 foobar.xxx
223543300 -rwxr-xr-x 1 jtk staff 0 Feb 11 13:10 foobar~1.~1~
223543298 -rwxr-xr-x 1 jtk staff 2847 Feb 11 06:31 system.xxx
When I do this, to clean up I run scandisk under MS-DOS 6.22 and it
complains about screwed-up directory entries.
If the file actually has contents, it will also complain about duplicate
file cluster allocation.
>Fix:
???
>Audit-Trail:
>Unformatted: