bug-parted
[Top][All Lists]
Advanced

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

RE: Parted, IA64 and ReiserFS


From: Matt_Domsch
Subject: RE: Parted, IA64 and ReiserFS
Date: Wed, 19 Sep 2001 13:36:02 -0500

> OK, well, that should work now, so I'm applying the patch... :)

Yea!

> The problem is some information is stored in PedPartition 
> (start/end for
> example), and other information is stored in the on-disk 
> struct.  So, when
> it comes to writing, you have to sync PARTS of the on-disk 
> struct.  This
> is very ugly, but I guess it's no disaster.  The alternative 
> is to only
> store information you care about in the partitions (yet 
> another struct,
> but this makes sense, since it's private partition data... 
> i.e. stuff that
> isn't common to all partition table types), and when you 
> create the on-disk
> stuff, you convert everything.  This is nicer because it's consistent,
> and it's clear which direction the information flows...

Actually, (and maybe this is better done in 1.5.x), I'd prefer to see things
like the partition flags be kept in PedPartition rather than in each disk
type as they need them.  Likewise, ped_partition_{get/set}_flag() functions
in disk.c can then operate on the PedPartition members (after calling
partition_is_flag_available which is still needed).  Removes two functions
from each disk label type, and forces the *_write() functions to do as you
think and sync those into their on-disk structs.

Each ped_partition_new() can clear all the flags, *_partition_{new,read}()
would change the flags to match what the disk type needs, and *_write()
writes them out.

> A bigger problem is gpt_create().  In 1.5.x, I changed the 
> semantics for
> this a fair bit, so you can create new partition tables "in 
> memory" without
> touching the disk.  (so, there should be gpt_alloc() in 1.5.x that
> returns a blank table)

Naah, not harder really.  gpt_alloc() allocates the pgpt, agpt, and ptes,
zeros them, and fills in the normal header stuff.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions
www.dell.com/linux
#2 Linux Server provider with 17% in the US and 14% Worldwide (IDC)!
#3 Unix provider with 18% in the US (Dataquest)!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]