On Oct 11, 2006, at 6:52 AM, Michael Cashwell wrote: On Oct 11, 2006, at 3:36 AM, Michael Smith wrote:
On Oct 10, 2006, at 10:19 PM, Arvind Dalvi wrote:
how about developing I/O Media Filter? "An I/O Media Object acts as a channel for all I/O that goes to the storage underlying it"
http://lists.apple.com/archives/Darwin-development/2002/May/msg00382.html
Again, this puts you on the hot path for potentially thousands of operations a second, to update a UI at a fraction of that rate. Unless you are trying to gather statistics that aren't otherwise available, not a good idea.
Granted, if the info were otherwise available then adding anything to the hot-path would be wasteful.
IOBlockStorageDriver already does this and that information is readable via the ioregistry.
QuadG5:~ shawnce$ ioreg -c IOBlockStorageDriver -w 0 .... | | | +-o k2-sata@1 <class AppleK2SATADevice, registered, matched, active, busy 0, retain count 12> | | | +-o AppleK2SATA <class AppleK2SATA, registered, matched, active, busy 0, retain count 5> | | | +-o ATADeviceNub@0 <class ATADeviceNub, registered, matched, active, busy 0, retain count 5> | | | +-o IOATABlockStorageDriver <class IOATABlockStorageDriver, registered, matched, active, busy 0, retain count 7> | | | +-o IOATABlockStorageDevice <class IOATABlockStorageDevice, registered, matched, active, busy 0, retain count 5> | | | +-o IOBlockStorageDriver <class IOBlockStorageDriver, registered, matched, active, busy 0, retain count 7> | | | | { | | | | "IOMatchCategory" = "IODefaultMatchCategory" | | | | "IOGeneralInterest" = "IOCommand is not serializable" | | | | "IOClass" = "IOBlockStorageDriver" | | | | "Statistics" = {"Errors (Read)"=0,"Total Time (Write)"=8497783902,"Latency Time (Read)"=0,"Bytes (Read)"=337169408,"Latency Time (Write)"=0,"Retries (Read)"=0,"Bytes (Write)"=3428864,"Errors (Write)"=0,"Operations (Read)"=11014,"Retries (Write)"=0,"Operations (Write)"=247,"Total Time (Read)"=57111640725} | | | | "IOProviderClass" = "IOBlockStorageDevice" | | | | "IOPropertyMatch" = {"device-type"="Generic"} | | | | "CFBundleIdentifier" = "com.apple.iokit.IOStorageFamily" | | | | "IOProbeScore" = 0 | | | | } | | | | | | | +-o Maxtor 6Y250M0 Media <class IOMedia, registered, matched, active, busy 0, retain count 10> | | | +-o IOMediaBSDClient <class IOMediaBSDClient, registered, matched, active, busy 0, retain count 5> | | | +-o IOApplePartitionScheme <class IOApplePartitionScheme, !registered, !matched, active, busy 0, retain count 9> | | | +-o Apple@1 <class IOMedia, registered, matched, active, busy 0, retain count 8> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient, registered, matched, active, busy 0, retain count 5> | | | +-o Apple_HFS_Untitled_1@3 <class IOMedia, registered, matched, active, busy 0, retain count 9> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient, registered, matched, active, busy 0, retain count 6> | | | +-o Apple_HFS_Untitled_2@5 <class IOMedia, registered, matched, active, busy 0, retain count 9> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient, registered, matched, active, busy 0, retain count 6> | | | +-o Apple_HFS_Untitled_3@7 <class IOMedia, registered, matched, active, busy 0, retain count 9> | | | +-o IOMediaBSDClient <class IOMediaBSDClient, registered, matched, active, busy 0, retain count 6> ....
-Shawn |