Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
util.c File Reference
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/crc32.h>
#include <linux/gfs2_ondisk.h>
#include <asm/uaccess.h>
#include "gfs2.h"
#include "incore.h"
#include "glock.h"
#include "util.h"

Go to the source code of this file.

Functions

void gfs2_assert_i (struct gfs2_sbd *sdp)
 
int gfs2_lm_withdraw (struct gfs2_sbd *sdp, char *fmt,...)
 
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)
 

Variables

struct kmem_cache
*gfs2_glock_cachep 
__read_mostly
 

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

mempool_t* gfs2_page_pool __read_mostly

Definition at line 22 of file util.c.