[openbeosstorage] Re: Partitioning context

  • From: "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Sun, 06 Apr 2003 18:01:27 +0200 CEST

"Axel D=F6rfler"  <axeld@xxxxxxxxxxxxxxxx> wrote:
> 
> I've just two more (related) points to consider:
> 
> - we should probably add an option to recognize files as a hard disk 
> and be able to scan the partitions contained therein

I already thought about that some months ago, when we were designing 
the previous API. The issue I see is, where the devices are published. 
I would imagine it to work like this: There are syscalls to 
(un)register a file as virtual disk. On registration a device is 
published under /dev/disk/virtual/file/<filename>[uniqueness=5FID]/raw. 
The rest can work completely transparent for the disk=5Fdevice=5Fmanager.

> - it would be nice if we would recognize if one partitioning system 
> is 
> used inside of another

As I understand it, that is already built into the DiskDevice 2.x API.
I'm actually afraid, the current version handles this too 
transparently, since, unless I missed something, there is no way to 
find out, if you have indeed nesting partitioning systems or just a 
single partitioning system supporting hierarchies. E.g. in the intel 
case:

-----------------------------------------
|                device                 |
|---------------------------------------|
|    1    |    2    |    3    |    4    |
|---------|-----------------------------|
| 5  |  6 |                   | 7  |  8 |

1 being an extended partition, 4 and 5 contained logical and 2-4, 7, 
and 8 primary ones, the BDiskSystem for device and partitions 1 and 4 
are the same (intel), although 1 and 4 are quite different beasts 
(extended vs. true nesting). (That reminds me, that a 
BPartition::DiskSystem() or better GetDiskSystem() is missing.)

So, probably an additional BPartition::IsLeaf() (better name=3F) would be 
a good idea. It would indicate whether the partition is of a type that 
doesn't allow to create child partitions using the parent's system in a 
non-nesting manner.

BTW, DriveSetup users should be warned, when they are going to use 
nesting.

> both would be very convenient mostly for users of emulators (such as 
> Bochs or Amithlon, the former accesses files as hard drivers, the 
> latter has the standard amiga partitioning system inside an Intel 
> partition), but I could imagine other useful applications as well.
> What do you think=3D3F

Definitely a good idea.

CU, Ingo


Other related posts: