Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
xfs_log.c File Reference
#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_types.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_error.h"
#include "xfs_log_priv.h"
#include "xfs_buf_item.h"
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
#include "xfs_log_recover.h"
#include "xfs_trans_priv.h"
#include "xfs_dinode.h"
#include "xfs_inode.h"
#include "xfs_trace.h"

Go to the source code of this file.

Macros

#define xlog_verify_dest_ptr(a, b)
 
#define xlog_verify_grant_tail(a)
 
#define xlog_verify_iclog(a, b, c, d)
 
#define xlog_verify_tail_lsn(a, b, c)
 

Functions

STATIC int xlog_commit_record (struct xlog *log, struct xlog_ticket *ticket, struct xlog_in_core **iclog, xfs_lsn_t *commitlsnp)
 
STATIC struct xlog * xlog_alloc_log (struct xfs_mount *mp, struct xfs_buftarg *log_target, xfs_daddr_t blk_offset, int num_bblks)
 
STATIC int xlog_space_left (struct xlog *log, atomic64_t *head)
 
STATIC int xlog_sync (struct xlog *log, struct xlog_in_core *iclog)
 
STATIC void xlog_dealloc_log (struct xlog *log)
 
STATIC void xlog_state_done_syncing (xlog_in_core_t *iclog, int)
 
STATIC void xlog_state_do_callback (struct xlog *log, int aborted, struct xlog_in_core *iclog)
 
STATIC int xlog_state_get_iclog_space (struct xlog *log, int len, struct xlog_in_core **iclog, struct xlog_ticket *ticket, int *continued_write, int *logoffsetp)
 
STATIC int xlog_state_release_iclog (struct xlog *log, struct xlog_in_core *iclog)
 
STATIC void xlog_state_switch_iclogs (struct xlog *log, struct xlog_in_core *iclog, int eventual_size)
 
STATIC void xlog_state_want_sync (struct xlog *log, struct xlog_in_core *iclog)
 
STATIC void xlog_grant_push_ail (struct xlog *log, int need_bytes)
 
STATIC void xlog_regrant_reserve_log_space (struct xlog *log, struct xlog_ticket *ticket)
 
STATIC void xlog_ungrant_log_space (struct xlog *log, struct xlog_ticket *ticket)
 
STATIC int xlog_iclogs_empty (struct xlog *log)
 
STATIC void xlog_grant_head_init (struct xlog_grant_head *head)
 
STATIC void xlog_grant_head_wake_all (struct xlog_grant_head *head)
 
STATIC bool xlog_grant_head_wake (struct xlog *log, struct xlog_grant_head *head, int *free_bytes)
 
STATIC int xlog_grant_head_wait (struct xlog *log, struct xlog_grant_head *head, struct xlog_ticket *tic, int need_bytes)
 
STATIC int xlog_grant_head_check (struct xlog *log, struct xlog_grant_head *head, struct xlog_ticket *tic, int *need_bytes)
 
int xfs_log_regrant (struct xfs_mount *mp, struct xlog_ticket *tic)
 
int xfs_log_reserve (struct xfs_mount *mp, int unit_bytes, int cnt, struct xlog_ticket **ticp, __uint8_t client, bool permanent, uint t_type)
 
xfs_lsn_t xfs_log_done (struct xfs_mount *mp, struct xlog_ticket *ticket, struct xlog_in_core **iclog, uint flags)
 
int xfs_log_notify (struct xfs_mount *mp, struct xlog_in_core *iclog, xfs_log_callback_t *cb)
 
int xfs_log_release_iclog (struct xfs_mount *mp, struct xlog_in_core *iclog)
 
int xfs_log_mount (xfs_mount_t *mp, xfs_buftarg_t *log_target, xfs_daddr_t blk_offset, int num_bblks)
 
int xfs_log_mount_finish (xfs_mount_t *mp)
 
int xfs_log_unmount_write (xfs_mount_t *mp)
 
void xfs_log_unmount (xfs_mount_t *mp)
 
void xfs_log_item_init (struct xfs_mount *mp, struct xfs_log_item *item, int type, const struct xfs_item_ops *ops)
 
void xfs_log_space_wake (struct xfs_mount *mp)
 
int xfs_log_need_covered (xfs_mount_t *mp)
 
xfs_lsn_t xlog_assign_tail_lsn_locked (struct xfs_mount *mp)
 
xfs_lsn_t xlog_assign_tail_lsn (struct xfs_mount *mp)
 
void xlog_iodone (xfs_buf_t *bp)
 
STATIC void xlog_get_iclog_buffer_size (struct xfs_mount *mp, struct xlog *log)
 
STATIC int xlog_bdstrat (struct xfs_buf *bp)
 
void xlog_print_tic_res (struct xfs_mount *mp, struct xlog_ticket *ticket)
 
int xlog_write (struct xlog *log, struct xfs_log_vec *log_vector, struct xlog_ticket *ticket, xfs_lsn_t *start_lsn, struct xlog_in_core **commit_iclog, uint flags)
 
STATIC void xlog_state_clean_log (struct xlog *log)
 
STATIC xfs_lsn_t xlog_get_lowest_lsn (struct xlog *log)
 
int _xfs_log_force (struct xfs_mount *mp, uint flags, int *log_flushed)
 
void xfs_log_force (xfs_mount_t *mp, uint flags)
 
int _xfs_log_force_lsn (struct xfs_mount *mp, xfs_lsn_t lsn, uint flags, int *log_flushed)
 
void xfs_log_force_lsn (xfs_mount_t *mp, xfs_lsn_t lsn, uint flags)
 
void xfs_log_ticket_put (xlog_ticket_t *ticket)
 
xlog_ticket_t * xfs_log_ticket_get (xlog_ticket_t *ticket)
 
struct xlog_ticket * xlog_ticket_alloc (struct xlog *log, int unit_bytes, int cnt, char client, bool permanent, xfs_km_flags_t alloc_flags)
 
STATIC int xlog_state_ioerror (struct xlog *log)
 
int xfs_log_force_umount (struct xfs_mount *mp, int logerror)
 

Variables

kmem_zone_txfs_log_ticket_zone
 

Macro Definition Documentation

#define xlog_verify_dest_ptr (   a,
  b 
)

Definition at line 128 of file xfs_log.c.

#define xlog_verify_grant_tail (   a)

Definition at line 129 of file xfs_log.c.

#define xlog_verify_iclog (   a,
  b,
  c,
  d 
)

Definition at line 130 of file xfs_log.c.

#define xlog_verify_tail_lsn (   a,
  b,
  c 
)

Definition at line 131 of file xfs_log.c.

Function Documentation

int _xfs_log_force ( struct xfs_mount *  mp,
uint  flags,
int log_flushed 
)

Definition at line 2891 of file xfs_log.c.

int _xfs_log_force_lsn ( struct xfs_mount *  mp,
xfs_lsn_t  lsn,
uint  flags,
int log_flushed 
)

Definition at line 3038 of file xfs_log.c.

xfs_lsn_t xfs_log_done ( struct xfs_mount *  mp,
struct xlog_ticket *  ticket,
struct xlog_in_core **  iclog,
uint  flags 
)

Definition at line 510 of file xfs_log.c.

void xfs_log_force ( xfs_mount_t *  mp,
uint  flags 
)

Definition at line 3010 of file xfs_log.c.

void xfs_log_force_lsn ( xfs_mount_t *  mp,
xfs_lsn_t  lsn,
uint  flags 
)

Definition at line 3158 of file xfs_log.c.

int xfs_log_force_umount ( struct xfs_mount *  mp,
int  logerror 
)

Definition at line 3589 of file xfs_log.c.

void xfs_log_item_init ( struct xfs_mount *  mp,
struct xfs_log_item *  item,
int  type,
const struct xfs_item_ops *  ops 
)

Definition at line 867 of file xfs_log.c.

int xfs_log_mount ( xfs_mount_t *  mp,
xfs_buftarg_t log_target,
xfs_daddr_t  blk_offset,
int  num_bblks 
)

Definition at line 608 of file xfs_log.c.

int xfs_log_mount_finish ( xfs_mount_t *  mp)

Definition at line 690 of file xfs_log.c.

int xfs_log_need_covered ( xfs_mount_t *  mp)

Definition at line 929 of file xfs_log.c.

int xfs_log_notify ( struct xfs_mount *  mp,
struct xlog_in_core *  iclog,
xfs_log_callback_t cb 
)

Definition at line 564 of file xfs_log.c.

int xfs_log_regrant ( struct xfs_mount *  mp,
struct xlog_ticket *  tic 
)

Definition at line 370 of file xfs_log.c.

int xfs_log_release_iclog ( struct xfs_mount *  mp,
struct xlog_in_core *  iclog 
)

Definition at line 585 of file xfs_log.c.

int xfs_log_reserve ( struct xfs_mount *  mp,
int  unit_bytes,
int  cnt,
struct xlog_ticket **  ticp,
__uint8_t  client,
bool  permanent,
uint  t_type 
)

Definition at line 431 of file xfs_log.c.

void xfs_log_space_wake ( struct xfs_mount *  mp)

Definition at line 887 of file xfs_log.c.

xlog_ticket_t* xfs_log_ticket_get ( xlog_ticket_t *  ticket)

Definition at line 3211 of file xfs_log.c.

void xfs_log_ticket_put ( xlog_ticket_t *  ticket)

Definition at line 3202 of file xfs_log.c.

void xfs_log_unmount ( xfs_mount_t *  mp)

Definition at line 859 of file xfs_log.c.

int xfs_log_unmount_write ( xfs_mount_t *  mp)

Definition at line 721 of file xfs_log.c.

STATIC struct xlog * xlog_alloc_log ( struct xfs_mount *  mp,
struct xfs_buftarg log_target,
xfs_daddr_t  blk_offset,
int  num_bblks 
)
read

Definition at line 1170 of file xfs_log.c.

xfs_lsn_t xlog_assign_tail_lsn ( struct xfs_mount *  mp)

Definition at line 989 of file xfs_log.c.

xfs_lsn_t xlog_assign_tail_lsn_locked ( struct xfs_mount *  mp)

Definition at line 965 of file xfs_log.c.

STATIC int xlog_bdstrat ( struct xfs_buf bp)

Definition at line 1428 of file xfs_log.c.

STATIC int xlog_commit_record ( struct xlog *  log,
struct xlog_ticket *  ticket,
struct xlog_in_core **  iclog,
xfs_lsn_t commitlsnp 
)

Definition at line 1330 of file xfs_log.c.

STATIC void xlog_dealloc_log ( struct xlog *  log)

Definition at line 1626 of file xfs_log.c.

STATIC void xlog_get_iclog_buffer_size ( struct xfs_mount *  mp,
struct xlog *  log 
)

Definition at line 1106 of file xfs_log.c.

STATIC xfs_lsn_t xlog_get_lowest_lsn ( struct xlog *  log)

Definition at line 2266 of file xfs_log.c.

STATIC int xlog_grant_head_check ( struct xlog *  log,
struct xlog_grant_head *  head,
struct xlog_ticket *  tic,
int need_bytes 
)

Definition at line 306 of file xfs_log.c.

STATIC void xlog_grant_head_init ( struct xlog_grant_head *  head)

Definition at line 194 of file xfs_log.c.

STATIC int xlog_grant_head_wait ( struct xlog *  log,
struct xlog_grant_head *  head,
struct xlog_ticket *  tic,
int  need_bytes 
)

Definition at line 254 of file xfs_log.c.

STATIC bool xlog_grant_head_wake ( struct xlog *  log,
struct xlog_grant_head *  head,
int free_bytes 
)

Definition at line 232 of file xfs_log.c.

STATIC void xlog_grant_head_wake_all ( struct xlog_grant_head *  head)

Definition at line 203 of file xfs_log.c.

STATIC void xlog_grant_push_ail ( struct xlog *  log,
int  need_bytes 
)

Definition at line 1364 of file xfs_log.c.

STATIC int xlog_iclogs_empty ( struct xlog *  log)

Definition at line 3700 of file xfs_log.c.

void xlog_iodone ( xfs_buf_t bp)

Definition at line 1061 of file xfs_log.c.

void xlog_print_tic_res ( struct xfs_mount *  mp,
struct xlog_ticket *  ticket 
)

Definition at line 1681 of file xfs_log.c.

STATIC void xlog_regrant_reserve_log_space ( struct xlog *  log,
struct xlog_ticket *  ticket 
)

Definition at line 2690 of file xfs_log.c.

STATIC int xlog_space_left ( struct xlog *  log,
atomic64_t head 
)

Definition at line 1016 of file xfs_log.c.

STATIC void xlog_state_clean_log ( struct xlog *  log)

Definition at line 2186 of file xfs_log.c.

STATIC void xlog_state_do_callback ( struct xlog *  log,
int  aborted,
struct xlog_in_core *  iclog 
)

Definition at line 2289 of file xfs_log.c.

STATIC void xlog_state_done_syncing ( xlog_in_core_t *  iclog,
int  aborted 
)

Definition at line 2521 of file xfs_log.c.

STATIC int xlog_state_get_iclog_space ( struct xlog *  log,
int  len,
struct xlog_in_core **  iclog,
struct xlog_ticket *  ticket,
int continued_write,
int logoffsetp 
)

Definition at line 2579 of file xfs_log.c.

STATIC int xlog_state_ioerror ( struct xlog *  log)

Definition at line 3547 of file xfs_log.c.

STATIC int xlog_state_release_iclog ( struct xlog *  log,
struct xlog_in_core *  iclog 
)

Definition at line 2777 of file xfs_log.c.

STATIC void xlog_state_switch_iclogs ( struct xlog *  log,
struct xlog_in_core *  iclog,
int  eventual_size 
)

Definition at line 2829 of file xfs_log.c.

STATIC void xlog_state_want_sync ( struct xlog *  log,
struct xlog_in_core *  iclog 
)

Definition at line 3176 of file xfs_log.c.

STATIC int xlog_sync ( struct xlog *  log,
struct xlog_in_core *  iclog 
)

Definition at line 1475 of file xfs_log.c.

struct xlog_ticket* xlog_ticket_alloc ( struct xlog *  log,
int  unit_bytes,
int  cnt,
char  client,
bool  permanent,
xfs_km_flags_t  alloc_flags 
)
read

Definition at line 3223 of file xfs_log.c.

STATIC void xlog_ungrant_log_space ( struct xlog *  log,
struct xlog_ticket *  ticket 
)

Definition at line 2737 of file xfs_log.c.

int xlog_write ( struct xlog *  log,
struct xfs_log_vec log_vector,
struct xlog_ticket *  ticket,
xfs_lsn_t start_lsn,
struct xlog_in_core **  commit_iclog,
uint  flags 
)

Definition at line 2014 of file xfs_log.c.

Variable Documentation

kmem_zone_t* xfs_log_ticket_zone

Definition at line 38 of file xfs_log.c.