bug-parted
[Top][All Lists]
Advanced

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

Re: HFS and FAT FS-resizing returning soon (but to a separate library)


From: Chris Murphy
Subject: Re: HFS and FAT FS-resizing returning soon (but to a separate library)
Date: Tue, 24 Jan 2012 14:26:12 -0700

On Jan 24, 2012, at 2:45 AM, Jim Meyering wrote:
> Thanks.
> The code (I think I saw this in non-parted code, too) interprets jhdr_size
> as the disk's sector size.
> 
> Parted's HFS-resizing code was written for 512-byte sectors, with
> numerous stack and heap structures hard-coded to that assumption.
> That is why it rejects any attempt to resize a disk whose sector size
> appears to be different from 512.
> 


I just had a colleague try hfsdebug on an actual physical 2TB disk, with one 
HFSJ partition. The jhdr_size is 4096 bytes as well. The disk model is obscured 
because it's in a firewire enclosure. But the product packaging says it's a 
Seagate 32000641AS. This does not appear to be an AF disk. 

That the sector size is 512 bytes, but the jhdr_size is 4096 bytes, directly 
conflicts with Apple's technote on this:

http://developer.apple.com/legacy/mac/library/#technotes/tn/tn1150.html
jhdr_size
The size of the journal header, in bytes. The journal header always occupies 
exactly one sector so that it can be updated atomically. Therefore, this value 
is equal to the sector size (for example, 2048 on many types of optical         
    media).


So something has changed, and the jhdr_size, can apparently be 4096 bytes on a 
512 byte sector disk. Again, I don't know at what point Disk Utility chooses to 
go from a 512 byte to 4096 byte journal header, but it seems it's related to 
volume size. Not sector size.


Chris Murphy


reply via email to

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