Deleted Added
full compact
44a45
> #include <sys/dsl_dataset.h>
45a47,54
> #define ZFS_HANDLE_REPLAY(zilog, tx) \
> if (zilog->zl_replay) { \
> dsl_dataset_dirty(dmu_objset_ds(zilog->zl_os), tx); \
> zilog->zl_replayed_seq[dmu_tx_get_txg(tx) & TXG_MASK] = \
> zilog->zl_replaying_seq; \
> return; \
> }
>
47,51c56,71
< * All the functions in this file are used to construct the log entries
< * to record transactions. They allocate * an intent log transaction
< * structure (itx_t) and save within it all the information necessary to
< * possibly replay the transaction. The itx is then assigned a sequence
< * number and inserted in the in-memory list anchored in the zilog.
---
> * These zfs_log_* functions must be called within a dmu tx, in one
> * of 2 contexts depending on zilog->z_replay:
> *
> * Non replay mode
> * ---------------
> * We need to record the transaction so that if it is committed to
> * the Intent Log then it can be replayed. An intent log transaction
> * structure (itx_t) is allocated and all the information necessary to
> * possibly replay the transaction is saved in it. The itx is then assigned
> * a sequence number and inserted in the in-memory list anchored in the zilog.
> *
> * Replay mode
> * -----------
> * We need to mark the intent log record as replayed in the log header.
> * This is done in the same transaction as the replay so that they
> * commit atomically.
238a259,260
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
341a364,365
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
365a390,391
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
392a419,420
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
426a455,456
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
458a489,490
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
511c543
< zp->z_id, off, len, lr + 1) != 0) {
---
> zp->z_id, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) {
556a589,590
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
585a620,621
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>
651a688,689
> ZFS_HANDLE_REPLAY(zilog, tx); /* exits if replay */
>