I'm working on doing I/O working with only the DMU and ZIL interfaces from the ZFS-FUSE source. I think I've got things working except for ZIL replays. For large writes and when slogging is not available, the itx write state is set to WR_INDIRECT. If I understand the ZIL correctly, this means that the actual data to be written isn't a part of the object's associated ZIL entry until the ZIL is being flushed through a zil_commit() call. In the WR_INDIRECT case, a blkptr is retrieved through a zfs_get_data() -> dmu_sync() call and stored in the ZIL entry on disk..
When I force a crash and try to run through a replay, the zfs_replay_write() call does this: 'char *data = (char *)(lr + 1); /* data follows lr_write_t */' It seems to me that this only works when the WR_COPIED state is used since the data should be pointed to by lr->lr_blkptr in the WR_INDIRECT case. Indeed, when running a replay of WR_INDIRECT txs, all the write data is missing. Do WR_COPIED and WR_INDIRECT use different code paths during replay? -- This messages posted from opensolaris.org