Lines Matching defs:journal

77 struct journal;
95 off_t journal_start; // where in the journal this transaction starts
96 off_t journal_end; // where in the journal this transaction ends
97 struct journal *jnl; // ptr back to the journal structure
106 * This is written to block zero of the journal and it
107 * maintains overall state about the journal.
114 off_t size; // size in bytes of the entire journal
115 int32_t blhdr_size; // size in bytes of each block_list_header in the journal
117 int32_t jhdr_size; // block size (in bytes) of the journal header
136 * In memory structure about the journal.
138 typedef struct journal {
139 lck_mtx_t jlock; // protects the struct journal data
140 lck_mtx_t flock; // serializes flushing of journal
144 struct vnode *jdev; // vnode of the device where the journal lives
145 off_t jdev_offset; // byte offset to the start of the journal
165 char *header_buf; // in-memory copy of the journal header
188 } journal;
190 /* internal-only journal flags (top 16 bits) */
213 * Call journal_create() to create a new journal. You only
216 * The "jvp" argument is the vnode where the journal is written.
217 * The journal starts at "offset" and is "journal_size" bytes long.
232 * used by the journal. If you specify zero, the journal code
236 * Returns a valid journal pointer or NULL if one could not
239 journal *journal_create(struct vnode *jvp,
251 * that has a previously created journal. It will take care
252 * of validating the journal and replaying it if necessary.
256 * Returns a valid journal pointer of NULL if it runs into
257 * trouble reading/playing back the journal.
259 journal *journal_open(struct vnode *jvp,
270 * Test whether the journal is clean or not. This is intended
271 * to be used when you're mounting read-only. If the journal
285 * journal is in a consistent state.
287 void journal_close(journal *journalp);
313 * that the journal does not play it back (effectively
319 * will be trimmed when the transaction is flushed to the on-disk journal.
321 int journal_start_transaction(journal *jnl);
322 int journal_modify_block_start(journal *jnl, struct buf *bp);
323 int journal_modify_block_abort(journal *jnl, struct buf *bp);
324 int journal_modify_block_end(journal *jnl, struct buf *bp, void (*func)(struct buf *bp, void *arg), void *arg);
325 int journal_kill_block(journal *jnl, struct buf *bp);
327 int journal_trim_add_extent(journal *jnl, uint64_t offset, uint64_t length);
328 int journal_trim_remove_extent(journal *jnl, uint64_t offset, uint64_t length);
329 void journal_trim_set_callback(journal *jnl, jnl_trim_callback_t callback, void *arg);
331 int journal_end_transaction(journal *jnl);
333 int journal_active(journal *jnl);
334 int journal_flush(journal *jnl, boolean_t wait_for_IO);
335 void *journal_owner(journal *jnl); // compare against current_thread()
336 int journal_uses_fua(journal *jnl);
340 * Relocate the journal.
342 * You provide the new starting offset and size for the journal. You may
344 * changing the tbuffer size except as needed to fit within the new journal
348 * modified blocks (such as those needed to deallocate the old journal,
349 * allocate the new journal, and update the location and size of the journal
351 * transaction will be flushed to the old journal. The new journal will be
353 * the new journal. The caller will need to update the structures that
354 * identify the location and size of the journal from the callback routine.
356 int journal_relocate(journal *jnl, off_t offset, off_t journal_size, int32_t tbuffer_size,