On Jul 19, 2005, at 7:18 AM, santosh katvate wrote: i have built my driver by subclassing IOBLOCKSTORAGEDRIVER and able attach my driver appropriately.
i now want to do write and read operation on the file from my driver and to do this i need the blocks info of the data fork of the file.
You think you want to do this, but in fact you do not.
The blocks on disk that a file occupies are owned by the filesystem, and it is free to recycle those blocks at any time; there is no mechanism by which you can assert shared use of those blocks, and thus no way that you can avoid a filesystem from corrupting your data, or you its.
If you want to do I/O to a file you must do it through the interfaces provided by the filesystem. This means having a mounted instance of the filesystem and a vnode for the file, at the bare minimum.
It sounds to me as though you might be trying to replicate the functionality provided by the Disk Images infrastructure. Is this the case?
= Mike
|