Re: How to map my filter scheme on to a disk partition?
Re: How to map my filter scheme on to a disk partition?
- Subject: Re: How to map my filter scheme on to a disk partition?
- From: Terry Lambert <email@hidden>
- Date: Thu, 30 Jul 2009 04:30:59 -0700
Are you still trying to grab Apple_HFS disks with this, or are you
only grabbing your own disk partition types?
When you use the example code the way it tells you to use it, do you
still have this problem?
The repeating suffix on the device name indicates that you are
probably grabbing the IOMedia object you yourself are exporting, which
is exactly what I told you to avoid in my last email. The errno 63 is
ENAMETOOLONG, which is exactly what you'd expect from doing that as
well, once you reached the limit for how long a BSD device name is
allowed to get.
-- Terry
On Jul 30, 2009, at 3:12 AM, Kalpana Maheswaram
<email@hidden> wrote:
Terry,
I went through "Introduction to Mass Storage Device Driver
Programming Guide", and driver stack.
As suggested I also worked, using UUID (i.e UUID value of the
partition from IORegistryExplorer), instead of "Apple_HFS".
On loading this using kextload, system got stuck. On restarting the
system, log lines from the kext are continuosly logged on to the
screen at boot time.
I think this into a never ending loop with
"devfs:disk0s1s1s1s1s1s1..... name slot allocation failed(Errno=63)"
error.
-----Original Message-----
From: Terry Lambert [mailto:email@hidden]
Sent: Wednesday, July 29, 2009 11:22 AM
To: Kalpana Maheswaram
Cc: 'Dan Markarian'; 'email@hidden'
Subject: Re: How to map my filter scheme on to a disk partition?
If those mailing lists threads are your reference material, there
are a couple things you/they are doing wrong.
The first is that you are trying to interpose a filter scheme driver
between the IOMedia object and the KEXT which normally claims this
object on behalf of the OS, which is AppleFileSystemDriver.kext.
You really can't do this. Matching is by the Content Hint, and that
KEXT gets to have first shot at claiming the IOMedia object based on
the Content Hint value, which is done in the
mediaNotificationHandler function (where the probe code lives). The
sample code that Dan pointed to goes way out of its way to
demonstrate how to use hdiutil so that you are not colliding with
another KEXT, like AppleFileSystemDriver.kext, by trying to claim
something that belongs to it (and not to your KEXT).
The second is that even if you were successful interposing yourself
there and stole the Content Hint of "Apple_HFS" away from the
AppleFileSystemDriver.kext, in order for the file system to later be
recognized by the system, you'd have to re-export an IOMedia object
with the same "Apple_HFS" Content Hint value so that the driver
that's actually supposed to be handling it handles it instead. At
that point, you'd probably blow up, since you'd try to claim that
device as well because you are going off the Content Hint, which
would be matching (again).
Basically, you are not really permitted to interpose that way;
instead, as the example code Dan pointed you at indicates, you need
to use a different Content Hint value, preferably unique to your
filter scheme, preferably a UUID value rather than a string like
"Apple_HFS". Then the IOMedia object your filter scheme driver
publishes needs to publish a block device that has the Content Hint
of "Apple_HFS" (or "48465300-0000-11AA-AA11-00306543ECAC", which is
the APPLE_HFS_UUID value).
In other words, if you want to take over a device at the IOMedia
layer, you need to label it as belonging to your KEXT in a way that
doesn't end up confusing the OS. This is not a Windows IFSMgr level
interface.
This is described in more detail at:
<http://developer.apple.com/documentation/DeviceDrivers/Conceptual/MassStorage/01_Introduction/Introduction.html#//apple_ref/doc/uid/TP30000733-TPXREF101
Which is the "Introduction to Mass Storage Device Driver Programming
Guide", but the most important part of that's going to be the last 5
paragraphs of the "Mass Storage Overview" and the stack pictures on
that page.
-- Terry
On Jul 28, 2009, at 9:51 PM, Kalpana Maheswaram wrote:
Hai Dan,
I had gone through the the example of SampleFilterScheme. It works
fine for the diskimage which i had created through hdiutil. Read/
write calls in sample filter scheme driver works fine when i write or
read on this partition.
But when i specify "Content Hint" property as Apple_HFS which i think
is the default content hint for the partitions created on MAC OS X
and
load my filter scheme driver which also has this property with the
value Apple_HFS i doesn't get the read/write IOLogs on the console
and
sees only start and init function IOLogs repeatedly.
I have four partitons with Apple_HFS partition content hint which i
had created during installation of MAC OS X.
I want to know what i need to change inorder to map the
SampleFilterScheme on to the four partitions.
Regards,
Kalpana.M
From: Dan Markarian [mailto:email@hidden]
Sent: Tuesday, July 28, 2009 10:17 PM
To: Kalpana Maheswaram
Cc: 'email@hidden'
Subject: Re: How to map my filter scheme on to a disk partition?
Hey Kalpana,
http://developer.apple.com/samplecode/SampleFilterScheme/index.html
Dan
On 27 Jul 2009, at 10:26 PM, Kalpana Maheswaram wrote:
Dear All,
I have my own filter scheme which i want to map on to the existing
disk partition.
I have went through below mail-listings but unable to work with the
provided info. Please help.
http://lists.apple.com/archives/darwin-kernel/2005/Jan/msg00043.html
http://lists.apple.com/archives/darwin-kernel/2005/Feb/msg00088.html
http://lists.apple.com/archives/darwin-kernel/2005/Feb/msg00089.html
With Regards,
DasariK
Ahead Together,
Kalpana Maheshwaram
Software Engineer | BlueAlly (A Megasoft Division) Megasoft
Limited|
6-3-1192/2/1| Kundanbagh| Begumpet| Hyderabad-16|
Phone: +91 40 4033 0000 Extension 8033
Mobile: +91 984 998 3755
Email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.
com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden