>From: Ben Myers <dative@xxxxxxxxxxx>
>Hi,
>
>I'm working on a small data migration app. I'm getting DM_EVENT_WRITE
>events, responding with DM_RESP_CONTINUE, and wanting to immediately
>turn a round and dm_read_invis() on that handle from de_offset to
>de_length and spit it out (with some other info) towards my tape
>drive.
>
>Can I assume that a dm_read_invis will get me only the change affected
>by the write event i responded to? What behavior should I expect for
>overlapping writes, and how can I tell when a write is finished and it's
>ok to copy the data out to tape?
The dm_read_invis will see what was written by the write(2), provided the
write has occured. The write(2) won't actually happen until sometime after
your call to dm_respond_event.
Your data migration app cannot know when the write(2) (that goes with the
DM_EVENT_WRITE) is finished. There's nothing in the DMAPI spec, anyway, that
would provide for this--there's no such thing as DM_EVENT_POSTWRITE.
If mirroring or snapshotting is what you want, then maybe a volume manager
would be a better solution?
Dean
|