journal.h File Reference

#include <stdint.h>
#include "libjio.h"

Include dependency graph for journal.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  journal_op

Typedefs

typedef struct journal_op jop_t

Functions

struct journal_opjournal_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 Documentation

typedef struct journal_op jop_t

Definition at line 18 of file journal.h.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int journal_commit ( struct journal_op jop  ) 

Commit the journal operation.

Definition at line 380 of file journal.c.

Referenced by jtrans_commit().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
0 on success, -1 if the file was broken, -2 if the checksums didn't match

Definition at line 476 of file journal.c.

Referenced by jfsck().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sat Sep 12 13:33:33 2009 for libjio (internal) by  doxygen 1.5.8