[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

floppy disk change (was Re: 1.15 kernel)



On Mon, May 18, 1998 at 07:51:33PM +0200, Konrad Kokoszkiewicz wrote:
> 
> BTW. I always had troubles understanding why there are so many problems
> with floppy disk change (or media change in general, but it beats me
> considering floppies) on ST/TT/Falcons. Is there any reason for not using
> the most simple solution, as re-reading the bootblock and updating the
> internal filesystem data strucres accordingly (like clearing FAT or inode
> caches for example), if the bootblock differs from what was read before?

No.

However, you should only do this if you think the disk *might* have changed.

The disk change on older STs works quite fine, and Falcon and newer machines
have hardware disk change detection which can tell you 100% sure if the disk
was removed from the drive (it can't tell you if the same disk was
re-inserted, so you should check and *not* clear open files etc. in that
case).

> Actually, any disk operation, like opening a file for read/write/update or
> reading directories could cause bootblock to be re-read by the system. 

Why?

This is absolutely unnecessary and will cause a lot of extra seeks to track
0. Just think about copying a lot of small files from floppy to harddisk
...

> Then we have the serial number there, the volume name and the number of
> free clusters to check if the diskette is still the same. Perhaps it will

Number of free clusters? In sector 0?

TOS uses a checksum for sector 0-6 (IIRC) to decide if the disk was really
changed or not. Sector 0 alone is not a sure indication, as it may be
identical on different disks.

> slow the file opening down a bit, but at least would solve the floppy
> change problem and would prevent the user/operator from bitching while
> Minix filesystem doesn't want to read new directory from a changed floppy
> disk.

Why not use the hardware to tell you if the disk drive door was opened or
not?

> a) floppies aren't the main storage media anymore (harddisks are)

Floppies are still used for data transfer - and they are slow already, so
there is no need to slow it down even more unnecessarily.

> b) this perfectly works for SpartaDOS on 8-bit Atari, though XL serial
>    drives are 10 times slower than our floppy drives. I have no reason
>    to not using a working solution from 8-bit computers, if such a
>    solution works.

It may work, but is it a good and efficient solution? I don't think so.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen