int (*write) ( resmgr_context_t *ctp,
io_write_t *msg,
RESMGR_OCB_T *ocb )
struct _io_write {
uint16_t type;
uint16_t combine_len;
uint32_t nbytes;
uint32_t xtype;
uint32_t zero;
/* unsigned char data[nbytes]; */
};
struct _io_write64 {
uint16_t type;
uint16_t combine_len;
uint32_t nbytes;
uint32_t xtype;
uint32_t nbytes_hi;
/* unsigned char data[nbytes]; */
};
typedef union {
struct _io_write i;
struct _io_write i64;
/* nbytes is returned with MsgReply */
} io_write_t;
Note the following:
The default implementation iofunc_write_default() calls iofunc_write_verify() and then silently discards all data written. Because it is possible to open a file without read or write permissions, you must validate that the OCB was opened for write in each call. By default, this validation is done using iofunc_write_verify(). In addition, the resource manager should validate the extended type (xtype).