Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
recovery.c File Reference
#include "jfs_user.h"

Go to the source code of this file.

Data Structures

struct  recovery_info
 

Macros

#define wrap(journal, var)
 

Enumerations

enum  passtype {
  PASS_SCAN, PASS_REVOKE, PASS_REPLAY, PASS_SCAN,
  PASS_REVOKE, PASS_REPLAY
}
 

Functions

int journal_recover (journal_t *journal)
 
int journal_skip_recovery (journal_t *journal)
 

Macro Definition Documentation

#define wrap (   journal,
  var 
)
Value:
do { \
if (var >= (journal)->j_last) \
var -= ((journal)->j_last - (journal)->j_first); \
} while (0)

Definition at line 206 of file recovery.c.

Enumeration Type Documentation

enum passtype
Enumerator:
PASS_SCAN 
PASS_REVOKE 
PASS_REPLAY 
PASS_SCAN 
PASS_REVOKE 
PASS_REPLAY 

Definition at line 40 of file recovery.c.

Function Documentation

int journal_recover ( journal_t *  journal)

journal_recover - recovers a on-disk journal : the journal to recover

The primary function for recovering the log contents when mounting a journaled device.

Recovery is done in three passes. In the first pass, we look for the end of the log. In the second, we assemble the list of revoke blocks. In the third and final pass, we replay any un-revoked blocks in the log.

Definition at line 224 of file recovery.c.

int journal_skip_recovery ( journal_t *  journal)

journal_skip_recovery - Start journal and wipe exiting records : journal to startup

Locate any valid recovery information from the journal and set up the journal structures in memory to ignore it (presumably because the caller has evidence that it is out of date). This function does'nt appear to be exorted..

We perform one pass over the journal to allow us to tell the user how much recovery information is being erased, and to let us initialise the journal transaction sequence numbers to the next unused ID.

Definition at line 290 of file recovery.c.