#include <stdint.h>
#include "libjio.h"
Go to the source code of this file.
Data Structures | |
struct | journal_op |
Typedefs | |
typedef struct journal_op | jop_t |
Functions | |
struct journal_op * | journal_new (struct jfs *fs, unsigned int flags) |
Create a new transaction in the journal. | |
int | journal_add_op (struct journal_op *jop, unsigned char *buf, size_t len, off_t offset) |
Save a single operation in the journal file. | |
void | journal_pre_commit (struct journal_op *jop) |
Prepares to commit the operation. | |
int | journal_commit (struct journal_op *jop) |
Commit the journal operation. | |
int | journal_free (struct journal_op *jop, int do_unlink) |
Free a journal operation. | |
int | fill_trans (unsigned char *map, off_t len, struct jtrans *ts) |
Fill a transaction structure from a mmapped transaction file. |
typedef struct journal_op jop_t |
struct journal_op* journal_new | ( | struct jfs * | fs, | |
unsigned int | flags | |||
) | [read] |
Create a new transaction in the journal.
Returns a pointer to an opaque jop_t (that is freed using journal_free), or NULL if there was an error.
Definition at line 260 of file journal.c.
Referenced by jtrans_commit().
int journal_add_op | ( | struct journal_op * | jop, | |
unsigned char * | buf, | |||
size_t | len, | |||
off_t | offset | |||
) |
Save a single operation in the journal file.
Definition at line 334 of file journal.c.
Referenced by jtrans_commit().
void journal_pre_commit | ( | struct journal_op * | jop | ) |
Prepares to commit the operation.
Can be omitted.
Definition at line 371 of file journal.c.
Referenced by jtrans_commit().
int journal_commit | ( | struct journal_op * | jop | ) |
Commit the journal operation.
Definition at line 380 of file journal.c.
Referenced by jtrans_commit().
int journal_free | ( | struct journal_op * | jop, | |
int | do_unlink | |||
) |
Free a journal operation.
NOTE: It can't assume the save completed successfuly, so we can call it when journal_save() fails.
Definition at line 428 of file journal.c.
Referenced by jsync(), and jtrans_commit().
int fill_trans | ( | unsigned char * | map, | |
off_t | len, | |||
struct jtrans * | ts | |||
) |
Fill a transaction structure from a mmapped transaction file.
Useful for checking purposes.
Definition at line 476 of file journal.c.
Referenced by jfsck().