>From: jrc@xxxxxxxxxxxxxxxxxx
>Does the DMAPI provide a mechanism to access the about to be written
>data from within the event handler for a write event?
>
>I have looked at the XDSM API documentation and the sample DMAPI code
>in the xfstests but didn't find anything suitable.
A WRITE event will tell you the file's handle, the starting offset for the
write, and the length in bytes for the write. The spec does not provide a way
for the HSM to see the data before it is written.
>DMAPI is new to me. Any suggestions for further reading or example
>code would be appreciated.
It sounds like you've already read everything that I know about--the XDSM doc,
and the dmapi tests.
The defunct OpenXDSM project does have some notes, too.
http://openxdsm.sourceforge.net/
The HSM's job is not to prevent the data from making its way to the disk
(DMAPI is not an access control or privilege mechanism). Its job is to manage
the movement of the data between primary and secondary storage devices,
allowing the primary storage device to appear "bottomless".
If you're writing a new HSM, let me give you this tip: Get comfortable with
filehandles. Do not rely on pathnames. An HSM can do almost everything via
filehandles. (Remember, dm_path_to_handle is good; dm_handle_to_path is bad.)
Dean
|