Re: gpt caching?
Re: gpt caching?
- Subject: Re: gpt caching?
- From: Chris Suter <email@hidden>
- Date: Fri, 29 May 2009 08:23:49 +1000
Hi Andrei,
On Fri, May 29, 2009 at 1:46 AM, Freeman, Andrei
<email@hidden> wrote:
> Definitely referring to the GUID here. diskutil lists this in the Type column. Typically this lists the GUID in descriptive form: Apple_HFS, EFI, Apple_Boot. In cases where you are supplying your own driver with its own GPT GUID, the GUID displays at length.
>
> The issue in question comes when modifying the GPT info for a volume's GUID in the GPT (or in the MBR when dealing with legacy boot systems). The GUID is easily modified for a volume, but it would seem that this information is cached. Thus, if I try to convert from my driver's GUID to the HFS GUID, the drive is correct, but diskutil is working off of cached information. Thus if I want to call a resizeVolume on the disk (even if it is HFS) diskutil doesn't believe me or the stored GPT info on the drive.
>
> What I need to do is to tell the mechanism that reports to diskutil, "Hey, your info is out of date."
OK, I think I understand what you're saying a little more now. You're
talking about the GUID type in GPT schemes (which is different from
the partition GUID and the volume GUID). I'm slightly confused by your
reference to the MBR—there is no GPT info in MBR partition maps;
perhaps you're talking about changing the MBR partition type.
If you want to create your own custom partition type that contains HFS
filesystem and you want to be able to resize it, you should arrange
for your driver to set the Content property accordingly in your KEXT
(or if I remember correctly, you can use ContentMask). If you do that,
there will be no need to muck about changing partition types.
I'm not sure why diskutil might not be updating when you change the
type. I'm fairly certain diskutil gets its information from Disk
Arbitration which gets its information from the Kernel. The Kernel
should re-scan the partition map when you close a write handle.
Anyway, you can use IORegistryExplorer (or ioreg) to check to see if
the Kernel is refreshing.
Regards,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden