Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
journal.c File Reference
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/kthread.h>
#include <linux/time.h>
#include <linux/random.h>
#include <cluster/masklog.h>
#include "ocfs2.h"
#include "alloc.h"
#include "blockcheck.h"
#include "dir.h"
#include "dlmglue.h"
#include "extent_map.h"
#include "heartbeat.h"
#include "inode.h"
#include "journal.h"
#include "localalloc.h"
#include "slot_map.h"
#include "super.h"
#include "sysfile.h"
#include "uptodate.h"
#include "quota.h"
#include "buffer_head_io.h"
#include "ocfs2_trace.h"

Go to the source code of this file.

Data Structures

struct  ocfs2_replay_map
 
struct  ocfs2_triggers
 
struct  ocfs2_la_recovery_item
 
struct  ocfs2_orphan_filldir_priv
 

Macros

#define ORPHAN_SCAN_SCHEDULE_TIMEOUT   300000
 
#define OCFS2_DEFAULT_COMMIT_INTERVAL   (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)
 
#define CONCURRENT_JOURNAL_FILL   32ULL
 

Enumerations

enum  ocfs2_replay_state { REPLAY_UNNEEDED = 0, REPLAY_NEEDED, REPLAY_DONE }
 

Functions

 DEFINE_SPINLOCK (trans_inc_lock)
 
void ocfs2_replay_map_set_state (struct ocfs2_super *osb, int state)
 
int ocfs2_compute_replay_slots (struct ocfs2_super *osb)
 
void ocfs2_queue_replay_slots (struct ocfs2_super *osb)
 
void ocfs2_free_replay_slots (struct ocfs2_super *osb)
 
int ocfs2_recovery_init (struct ocfs2_super *osb)
 
void ocfs2_recovery_exit (struct ocfs2_super *osb)
 
handle_t * ocfs2_start_trans (struct ocfs2_super *osb, int max_buffs)
 
int ocfs2_commit_trans (struct ocfs2_super *osb, handle_t *handle)
 
int ocfs2_extend_trans (handle_t *handle, int nblocks)
 
int ocfs2_journal_access_di (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_eb (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_rb (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_gd (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_db (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_xb (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_dq (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_dr (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access_dl (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
int ocfs2_journal_access (handle_t *handle, struct ocfs2_caching_info *ci, struct buffer_head *bh, int type)
 
void ocfs2_journal_dirty (handle_t *handle, struct buffer_head *bh)
 
void ocfs2_set_journal_params (struct ocfs2_super *osb)
 
int ocfs2_journal_init (struct ocfs2_journal *journal, int *dirty)
 
void ocfs2_journal_shutdown (struct ocfs2_super *osb)
 
int ocfs2_journal_load (struct ocfs2_journal *journal, int local, int replayed)
 
int ocfs2_journal_wipe (struct ocfs2_journal *journal, int full)
 
void ocfs2_wait_for_recovery (struct ocfs2_super *osb)
 
void ocfs2_complete_recovery (struct work_struct *work)
 
void ocfs2_complete_mount_recovery (struct ocfs2_super *osb)
 
void ocfs2_complete_quota_recovery (struct ocfs2_super *osb)
 
void ocfs2_recovery_thread (struct ocfs2_super *osb, int node_num)
 
int ocfs2_mark_dead_nodes (struct ocfs2_super *osb)
 
void ocfs2_queue_orphan_scan (struct ocfs2_super *osb)
 
void ocfs2_orphan_scan_work (struct work_struct *work)
 
void ocfs2_orphan_scan_stop (struct ocfs2_super *osb)
 
void ocfs2_orphan_scan_init (struct ocfs2_super *osb)
 
void ocfs2_orphan_scan_start (struct ocfs2_super *osb)
 
int ocfs2_check_journals_nolocks (struct ocfs2_super *osb)
 

Macro Definition Documentation

#define CONCURRENT_JOURNAL_FILL   32ULL
#define OCFS2_DEFAULT_COMMIT_INTERVAL   (HZ * JBD2_DEFAULT_MAX_COMMIT_AGE)

Definition at line 739 of file journal.c.

#define ORPHAN_SCAN_SCHEDULE_TIMEOUT   300000

Definition at line 58 of file journal.c.

Enumeration Type Documentation

Enumerator:
REPLAY_UNNEEDED 
REPLAY_NEEDED 
REPLAY_DONE 

Definition at line 94 of file journal.c.

Function Documentation

DEFINE_SPINLOCK ( trans_inc_lock  )
int ocfs2_check_journals_nolocks ( struct ocfs2_super osb)

Definition at line 2182 of file journal.c.

int ocfs2_commit_trans ( struct ocfs2_super osb,
handle_t *  handle 
)

Definition at line 381 of file journal.c.

void ocfs2_complete_mount_recovery ( struct ocfs2_super osb)

Definition at line 1264 of file journal.c.

void ocfs2_complete_quota_recovery ( struct ocfs2_super osb)

Definition at line 1286 of file journal.c.

void ocfs2_complete_recovery ( struct work_struct work)

Definition at line 1153 of file journal.c.

int ocfs2_compute_replay_slots ( struct ocfs2_super osb)

Definition at line 118 of file journal.c.

int ocfs2_extend_trans ( handle_t *  handle,
int  nblocks 
)

Definition at line 419 of file journal.c.

void ocfs2_free_replay_slots ( struct ocfs2_super osb)

Definition at line 169 of file journal.c.

int ocfs2_journal_access ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 723 of file journal.c.

int ocfs2_journal_access_db ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 693 of file journal.c.

int ocfs2_journal_access_di ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 668 of file journal.c.

int ocfs2_journal_access_dl ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 717 of file journal.c.

int ocfs2_journal_access_dq ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 705 of file journal.c.

int ocfs2_journal_access_dr ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 711 of file journal.c.

int ocfs2_journal_access_eb ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 674 of file journal.c.

int ocfs2_journal_access_gd ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 687 of file journal.c.

int ocfs2_journal_access_rb ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 680 of file journal.c.

int ocfs2_journal_access_xb ( handle_t *  handle,
struct ocfs2_caching_info ci,
struct buffer_head *  bh,
int  type 
)

Definition at line 699 of file journal.c.

void ocfs2_journal_dirty ( handle_t *  handle,
struct buffer_head *  bh 
)

Definition at line 729 of file journal.c.

int ocfs2_journal_init ( struct ocfs2_journal journal,
int dirty 
)

Definition at line 758 of file journal.c.

int ocfs2_journal_load ( struct ocfs2_journal journal,
int  local,
int  replayed 
)

Definition at line 998 of file journal.c.

void ocfs2_journal_shutdown ( struct ocfs2_super osb)

Definition at line 899 of file journal.c.

int ocfs2_journal_wipe ( struct ocfs2_journal journal,
int  full 
)

Definition at line 1042 of file journal.c.

int ocfs2_mark_dead_nodes ( struct ocfs2_super osb)

Definition at line 1734 of file journal.c.

void ocfs2_orphan_scan_init ( struct ocfs2_super osb)

Definition at line 1920 of file journal.c.

void ocfs2_orphan_scan_start ( struct ocfs2_super osb)

Definition at line 1932 of file journal.c.

void ocfs2_orphan_scan_stop ( struct ocfs2_super osb)

Definition at line 1907 of file journal.c.

void ocfs2_orphan_scan_work ( struct work_struct work)

Definition at line 1890 of file journal.c.

void ocfs2_queue_orphan_scan ( struct ocfs2_super osb)

Definition at line 1841 of file journal.c.

void ocfs2_queue_replay_slots ( struct ocfs2_super osb)

Definition at line 151 of file journal.c.

void ocfs2_recovery_exit ( struct ocfs2_super osb)

Definition at line 213 of file journal.c.

int ocfs2_recovery_init ( struct ocfs2_super osb)

Definition at line 180 of file journal.c.

void ocfs2_recovery_thread ( struct ocfs2_super osb,
int  node_num 
)

Definition at line 1421 of file journal.c.

void ocfs2_replay_map_set_state ( struct ocfs2_super osb,
int  state 
)

Definition at line 106 of file journal.c.

void ocfs2_set_journal_params ( struct ocfs2_super osb)

Definition at line 741 of file journal.c.

handle_t* ocfs2_start_trans ( struct ocfs2_super osb,
int  max_buffs 
)

Definition at line 341 of file journal.c.

void ocfs2_wait_for_recovery ( struct ocfs2_super osb)

Definition at line 1074 of file journal.c.