I'm looking into the possibility of snapshots on a hfs+ volume. I've got a duplicate HFS+ filesystem loaded as a kext, now i need to intercept writes to the filesystem. while i guess i could use a filter scheme, i'm going to have to hook a number of other places in the hfs+ source anyway, so if possible i'd rather keep the changes to a single kext for now, and intercept the writes prior to them leaving the hfs+ source (ie. write a wrapper cluster_write function which does its own stuff and then calls through to the real thing.) cluster_write(vp, uio, oldEOF, newEOF, headOff, tailOff, devblocksize, flags) okay, as far as i see it (i'm still not used to reading kernel source ;-) what we're doing here is writing some data [uio] to some offset [uio->uio_offset] and possibly padding before and after [headOff], [tailOff]. I'm not sure why it needs the vnode pointer at this level, i'm assuming this has something to do with the UBC, but since i've yet to see any decent docs on that either... ;-) If you've got any further info on the parameters to cluster_write() then i'd appreciate a quick summary. Otherwise i guess i'll have to keep going the hard way. Or if you still think that filters are the way to go then by all means say so and i'll go play with them instead :-) thx, chris On 02/12/2003, at 20:35, Quinn wrote:
At 20:20 +1000 2/12/03, Chris Bergmann wrote:
Anyone know where i could find docs/details on these:
cluster_read()
cluster_write()
They're currently not documented. The only details are in the source.
(I'm trying to intercept the lowest-level calls from the hfs+ source
to the underlying partition- are these the right functions to be
looking at? this is for my own purposes with a custom-built hfs+
kext, not for shipping code...)
Hmmm, are you looking for the pattern of block reads/writes? If so,
you may be better off working at the IOMedia level. This is discussed
in the "Developing a Filter Scheme" section of "Inside Mac OS X:
Writing Drivers for Mass Storage Devices".
<http://developer.apple.com/documentation/DeviceDrivers/Conceptual/
MassStorage/07_Media_Example/chapter_7_section_1.html>
S+E
--
Quinn "The Eskimo!"
Apple Developer Technical Support * Networking, Communications,
Hardware
_______________________________________________
darwin-kernel mailing list | darwin-kernel@lists.apple.com
Help/Unsubscribe/Archives:
Do not post admin requests to the list. They will be ignored.
_______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.