Re: Corrupt file-system(s) leads to crash

Albert D. Cahalan (acahalan@cs.uml.edu)
Wed, 8 Apr 1998 02:25:48 -0400 (EDT)


>> Partition access are bounds checked. The problem was that the
>> partition bounds were incorrect. We could say that the kernel
>> partition code should have done that sanity check, but there
>> are even potentially times when overlapping partitions is the
>> right thing.
>
> But it never makes sense to mount two overlapping partitions
> at the same time, as far as I know. Which implies mount
> should have a sanity check.

Excuse me if all this is crazy, but I've always thought things
were kind of weird.

Maybe it is best to just have filesystems lock regions of the
hard disk. The partition code itself would get read locks on
all the partition table blocks. The swap code could get a write
lock, filesystems would get either type as desired, etc.

More serious changes:

The partition devices could become just an easy way to get a
lock and start offset on the physical device. That seems like
it would solve another old problem, the pessimal disk access
when partition numbers run backwards.

That seems to force the more direct use of sectors, since the
"blocks" on various filesystems may not be aligned. I think that
is good. We still have aliasing problems, right?

Sector-aligned mmap direct to the whole disk device seems desirable,
and necessary with the above scheme. Pages that overlap by a sector
can be handled with minor page faults between the accesses.
(the kernel copies a few sectors to keep the pages consistent
as seen from user-space)

I hope that's not too crazy, because it seems like a way to get
rid of all sorts of problems with aliasing. It is also part of
one solution to mmap on huge files.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu