Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
util.h File Reference
#include <linux/mempool.h>
#include "incore.h"

Go to the source code of this file.

Macros

#define fs_printk(level, fs, fmt, arg...)   printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg)
 
#define fs_info(fs, fmt, arg...)   fs_printk(KERN_INFO , fs , fmt , ## arg)
 
#define fs_warn(fs, fmt, arg...)   fs_printk(KERN_WARNING , fs , fmt , ## arg)
 
#define fs_err(fs, fmt, arg...)   fs_printk(KERN_ERR, fs , fmt , ## arg)
 
#define gfs2_assert(sdp, assertion)
 
#define gfs2_assert_withdraw(sdp, assertion)
 
#define gfs2_assert_warn(sdp, assertion)
 
#define gfs2_consist(sdp)   gfs2_consist_i((sdp), 0, __func__, __FILE__, __LINE__)
 
#define gfs2_consist_inode(ip)   gfs2_consist_inode_i((ip), 0, __func__, __FILE__, __LINE__)
 
#define gfs2_consist_rgrpd(rgd)   gfs2_consist_rgrpd_i((rgd), 0, __func__, __FILE__, __LINE__)
 
#define gfs2_metatype_check(sdp, bh, type)   gfs2_metatype_check_i((sdp), (bh), (type), __func__, __FILE__, __LINE__)
 
#define gfs2_io_error(sdp)   gfs2_io_error_i((sdp), __func__, __FILE__, __LINE__);
 
#define gfs2_io_error_bh(sdp, bh)   gfs2_io_error_bh_i((sdp), (bh), __func__, __FILE__, __LINE__);
 
#define gfs2_tune_get(sdp, field)   gfs2_tune_get_i(&(sdp)->sd_tune, &(sdp)->sd_tune.field)
 

Functions

void gfs2_assert_i (struct gfs2_sbd *sdp)
 
int gfs2_assert_withdraw_i (struct gfs2_sbd *sdp, char *assertion, const char *function, char *file, unsigned int line)
 
int gfs2_assert_warn_i (struct gfs2_sbd *sdp, char *assertion, const char *function, char *file, unsigned int line)
 
int gfs2_consist_i (struct gfs2_sbd *sdp, int cluster_wide, const char *function, char *file, unsigned int line)
 
int gfs2_consist_inode_i (struct gfs2_inode *ip, int cluster_wide, const char *function, char *file, unsigned int line)
 
int gfs2_consist_rgrpd_i (struct gfs2_rgrpd *rgd, int cluster_wide, const char *function, char *file, unsigned int line)
 
int gfs2_meta_check_ii (struct gfs2_sbd *sdp, struct buffer_head *bh, const char *type, const char *function, char *file, unsigned int line)
 
int gfs2_metatype_check_ii (struct gfs2_sbd *sdp, struct buffer_head *bh, u16 type, u16 t, const char *function, char *file, unsigned int line)
 
int gfs2_io_error_i (struct gfs2_sbd *sdp, const char *function, char *file, unsigned int line)
 
int gfs2_io_error_bh_i (struct gfs2_sbd *sdp, struct buffer_head *bh, const char *function, char *file, unsigned int line)
 
void gfs2_icbit_munge (struct gfs2_sbd *sdp, unsigned char **bitmap, unsigned int bit, int new_value)
 
int gfs2_lm_withdraw (struct gfs2_sbd *sdp, char *fmt,...)
 

Variables

struct kmem_cachegfs2_glock_cachep
 
struct kmem_cachegfs2_glock_aspace_cachep
 
struct kmem_cachegfs2_inode_cachep
 
struct kmem_cachegfs2_bufdata_cachep
 
struct kmem_cachegfs2_rgrpd_cachep
 
struct kmem_cachegfs2_quotad_cachep
 
struct kmem_cachegfs2_rsrv_cachep
 
mempool_tgfs2_page_pool
 

Macro Definition Documentation

#define fs_err (   fs,
  fmt,
  arg... 
)    fs_printk(KERN_ERR, fs , fmt , ## arg)

Definition at line 26 of file util.h.

#define fs_info (   fs,
  fmt,
  arg... 
)    fs_printk(KERN_INFO , fs , fmt , ## arg)

Definition at line 20 of file util.h.

#define fs_printk (   level,
  fs,
  fmt,
  arg... 
)    printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg)

Definition at line 17 of file util.h.

#define fs_warn (   fs,
  fmt,
  arg... 
)    fs_printk(KERN_WARNING , fs , fmt , ## arg)

Definition at line 23 of file util.h.

#define gfs2_assert (   sdp,
  assertion 
)
Value:
do { \
if (unlikely(!(assertion))) { \
gfs2_assert_i(sdp); \
BUG(); \
} \
} while (0)

Definition at line 32 of file util.h.

#define gfs2_assert_warn (   sdp,
  assertion 
)
Value:
((likely(assertion)) ? 0 : gfs2_assert_warn_i((sdp), #assertion, \
__func__, __FILE__, __LINE__))

Definition at line 52 of file util.h.

#define gfs2_assert_withdraw (   sdp,
  assertion 
)
Value:
((likely(assertion)) ? 0 : gfs2_assert_withdraw_i((sdp), #assertion, \
__func__, __FILE__, __LINE__))

Definition at line 44 of file util.h.

#define gfs2_consist (   sdp)    gfs2_consist_i((sdp), 0, __func__, __FILE__, __LINE__)

Definition at line 60 of file util.h.

#define gfs2_consist_inode (   ip)    gfs2_consist_inode_i((ip), 0, __func__, __FILE__, __LINE__)

Definition at line 67 of file util.h.

#define gfs2_consist_rgrpd (   rgd)    gfs2_consist_rgrpd_i((rgd), 0, __func__, __FILE__, __LINE__)

Definition at line 74 of file util.h.

#define gfs2_io_error (   sdp)    gfs2_io_error_i((sdp), __func__, __FILE__, __LINE__);

Definition at line 134 of file util.h.

#define gfs2_io_error_bh (   sdp,
  bh 
)    gfs2_io_error_bh_i((sdp), (bh), __func__, __FILE__, __LINE__);

Definition at line 141 of file util.h.

#define gfs2_metatype_check (   sdp,
  bh,
  type 
)    gfs2_metatype_check_i((sdp), (bh), (type), __func__, __FILE__, __LINE__)

Definition at line 118 of file util.h.

#define gfs2_tune_get (   sdp,
  field 
)    gfs2_tune_get_i(&(sdp)->sd_tune, &(sdp)->sd_tune.field)

Definition at line 164 of file util.h.

Function Documentation

void gfs2_assert_i ( struct gfs2_sbd sdp)

Definition at line 31 of file util.c.

int gfs2_assert_warn_i ( struct gfs2_sbd sdp,
char assertion,
const char function,
char file,
unsigned int  line 
)

gfs2_assert_warn_i - Print a message to the console if is false Returns: -1 if we printed something -2 if we didn't

Definition at line 96 of file util.c.

int gfs2_assert_withdraw_i ( struct gfs2_sbd sdp,
char assertion,
const char function,
char file,
unsigned int  line 
)

gfs2_assert_withdraw_i - Cause the machine to withdraw if is false Returns: -1 if this call withdrew the machine, -2 if it was already withdrawn

Definition at line 77 of file util.c.

int gfs2_consist_i ( struct gfs2_sbd sdp,
int  cluster_wide,
const char function,
char file,
unsigned int  line 
)

gfs2_consist_i - Flag a filesystem consistency error and withdraw Returns: -1 if this call withdrew the machine, 0 if it was already withdrawn

Definition at line 133 of file util.c.

int gfs2_consist_inode_i ( struct gfs2_inode ip,
int  cluster_wide,
const char function,
char file,
unsigned int  line 
)

gfs2_consist_inode_i - Flag an inode consistency error and withdraw Returns: -1 if this call withdrew the machine, 0 if it was already withdrawn

Definition at line 151 of file util.c.

int gfs2_consist_rgrpd_i ( struct gfs2_rgrpd rgd,
int  cluster_wide,
const char function,
char file,
unsigned int  line 
)

gfs2_consist_rgrpd_i - Flag a RG consistency error and withdraw Returns: -1 if this call withdrew the machine, 0 if it was already withdrawn

Definition at line 173 of file util.c.

void gfs2_icbit_munge ( struct gfs2_sbd sdp,
unsigned char **  bitmap,
unsigned int  bit,
int  new_value 
)

Definition at line 268 of file util.c.

int gfs2_io_error_bh_i ( struct gfs2_sbd sdp,
struct buffer_head *  bh,
const char function,
char file,
unsigned int  line 
)

gfs2_io_error_bh_i - Flag a buffer I/O error and withdraw Returns: -1 if this call withdrew the machine, 0 if it was already withdrawn

Definition at line 254 of file util.c.

int gfs2_io_error_i ( struct gfs2_sbd sdp,
const char function,
char file,
unsigned int  line 
)

gfs2_io_error_i - Flag an I/O error and withdraw Returns: -1 if this call withdrew the machine, 0 if it was already withdrawn

Definition at line 236 of file util.c.

int gfs2_lm_withdraw ( struct gfs2_sbd sdp,
char fmt,
  ... 
)

Definition at line 37 of file util.c.

int gfs2_meta_check_ii ( struct gfs2_sbd sdp,
struct buffer_head *  bh,
const char type,
const char function,
char file,
unsigned int  line 
)

gfs2_meta_check_ii - Flag a magic number consistency error and withdraw Returns: -1 if this call withdrew the machine, -2 if it was already withdrawn

Definition at line 194 of file util.c.

int gfs2_metatype_check_ii ( struct gfs2_sbd sdp,
struct buffer_head *  bh,
u16  type,
u16  t,
const char function,
char file,
unsigned int  line 
)

gfs2_metatype_check_ii - Flag a metadata type consistency error and withdraw Returns: -1 if this call withdrew the machine, -2 if it was already withdrawn

Definition at line 215 of file util.c.

Variable Documentation

struct kmem_cache* gfs2_bufdata_cachep
struct kmem_cache* gfs2_glock_aspace_cachep
struct kmem_cache* gfs2_glock_cachep
struct kmem_cache* gfs2_inode_cachep
mempool_t* gfs2_page_pool
struct kmem_cache* gfs2_quotad_cachep
struct kmem_cache* gfs2_rgrpd_cachep
struct kmem_cache* gfs2_rsrv_cachep