bug-parted
[Top][All Lists]
Advanced

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

Re: A parted bug ??


From: Andrew Clausen
Subject: Re: A parted bug ??
Date: Fri, 19 Nov 2004 08:33:49 +1100
User-agent: Mutt/1.5.6+20040722i

On Thu, Nov 11, 2004 at 06:25:10PM -0800, Edward wrote:
> Parted seem modify some bytes of BPB.
> Such as "Reserved Sectors", "Sectors Per Track",
> "Number of Heads"...:p

"Reserved sectors" is modified so as to preserve cluster alignment.

Let X be the address of the first cluster in the old file system,
counting in 512 byte units from the very start of the disk.
Suppose the cluster size is 4k = 8 sectors.

If X = 3 (mod 8), then we want to keep it that way - otherwise
we have to move *everything* in the file system, which is very
slow.

If the file system size changes, then the position of the first cluster
will always change (because the FATs will change size).  Modifying
"reserved sectors" allows us to compensate for the change to keep
X = 3 (mod 8).

So, it's a hack, but a very useful one :)

Cheers,
Andrew





reply via email to

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