write
Declaration
virtual void write(
IOService *client,
UInt64byteStart,
IOMemoryDescriptor *buffer,
IOStorageAttributes *attributes,
IOStorageCompletion *completion);Parameters
- client:
Client requesting the write.
- byteStart:
Starting byte offset for the data transfer.
- buffer:
Buffer for the data transfer. The size of the buffer implies the size of the data transfer.
- attributes:
Attributes of the data transfer. See IOStorageAttributes. It is the responsibility of the callee to maintain the information for the duration of the data transfer, as necessary.
- completion:
Completion routine to call once the data transfer is complete. It is the responsibility of the callee to maintain the information for the duration of the data transfer, as necessary.
Overview
The write method is the receiving end for all write requests from the storage framework (through the media object created by this driver).
This method initiates a sequence of methods (stages) for each read/write request. The first is prepareRequest, which allocates and prepares some context for the transfer; the second is deblockRequest, which aligns the transfer at the media's block boundaries; third is breakUpRequest, which breaks up the transfer into multiple sub-transfers when certain hardware constraints are exceeded; fourth is executeRequest, which implements the actual transfer from the block storage device.
This method's implementation is not typically overridden.
See Also
Miscellaneous
acceptNewMediaaddToBytesTransferredallocateContextbreakUpRequestcheckForMediaconstrainByteCountcopyPhysicalExtentdeblockRequestdecommissionMediadeleteContextejectMediaexecuteRequestformatMediagetDeviceTypeNamegetFormatCapacitiesgetMediaBlockSizegetMediaStategetStatisticgetStatisticshandleClosehandleIsOpenhandleOpenhandleStartincrementErrorsincrementRetriesinitMediaStateinstantiateDesiredMediaObjectinstantiateMediaObjectisMediaEjectableisMediaRemovableisMediaWritablelockPhysicalExtentsmediaStateHasChangedprepareRequestreadrecordMediaParametersrejectMediarequestIdlesynchronizeCacheunlockPhysicalExtentsunmapvalidateNewMedia