Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sys.c File Reference
#include <linux/sched.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/module.h>
#include <linux/kobject.h>
#include <asm/uaccess.h>
#include <linux/gfs2_ondisk.h>
#include <linux/genhd.h>
#include "gfs2.h"
#include "incore.h"
#include "sys.h"
#include "super.h"
#include "glock.h"
#include "quota.h"
#include "util.h"
#include "glops.h"
#include "recovery.h"

Go to the source code of this file.

Data Structures

struct  gfs2_attr
 

Macros

#define GFS2_ATTR(name, mode, show, store)   static struct gfs2_attr gfs2_attr_##name = __ATTR(name, mode, show, store)
 
#define GDLM_ATTR(_name, _mode, _show, _store)   static struct gfs2_attr gdlm_attr_##_name = __ATTR(_name,_mode,_show,_store)
 
#define TUNE_ATTR_3(name, show, store)   static struct gfs2_attr tune_attr_##name = __ATTR(name, 0644, show, store)
 
#define TUNE_ATTR_2(name, store)
 
#define TUNE_ATTR(name, check_zero)
 

Functions

 GFS2_ATTR (id, 0444, id_show, NULL)
 
 GFS2_ATTR (fsname, 0444, fsname_show, NULL)
 
 GFS2_ATTR (uuid, 0444, uuid_show, NULL)
 
 GFS2_ATTR (freeze, 0644, freeze_show, freeze_store)
 
 GFS2_ATTR (withdraw, 0644, withdraw_show, withdraw_store)
 
 GFS2_ATTR (statfs_sync, 0200, NULL, statfs_sync_store)
 
 GFS2_ATTR (quota_sync, 0200, NULL, quota_sync_store)
 
 GFS2_ATTR (quota_refresh_user, 0200, NULL, quota_refresh_user_store)
 
 GFS2_ATTR (quota_refresh_group, 0200, NULL, quota_refresh_group_store)
 
 GFS2_ATTR (demote_rq, 0200, NULL, demote_rq_store)
 
int gfs2_recover_set (struct gfs2_sbd *sdp, unsigned jid)
 
 GDLM_ATTR (proto_name, 0444, proto_name_show, NULL)
 
 GDLM_ATTR (block, 0644, block_show, block_store)
 
 GDLM_ATTR (withdraw, 0644, withdraw_show, withdraw_store)
 
 GDLM_ATTR (jid, 0644, jid_show, jid_store)
 
 GDLM_ATTR (first, 0644, lkfirst_show, lkfirst_store)
 
 GDLM_ATTR (first_done, 0444, first_done_show, NULL)
 
 GDLM_ATTR (recover, 0600, NULL, recover_store)
 
 GDLM_ATTR (recover_done, 0444, recover_done_show, NULL)
 
 GDLM_ATTR (recover_status, 0444, recover_status_show, NULL)
 
 TUNE_ATTR (quota_warn_period, 0)
 
 TUNE_ATTR (quota_quantum, 0)
 
 TUNE_ATTR (max_readahead, 0)
 
 TUNE_ATTR (complain_secs, 0)
 
 TUNE_ATTR (statfs_slow, 0)
 
 TUNE_ATTR (new_files_jdata, 0)
 
 TUNE_ATTR (quota_simul_sync, 1)
 
 TUNE_ATTR (statfs_quantum, 1)
 
 TUNE_ATTR_3 (quota_scale, quota_scale_show, quota_scale_store)
 
int gfs2_sys_fs_add (struct gfs2_sbd *sdp)
 
void gfs2_sys_fs_del (struct gfs2_sbd *sdp)
 
int gfs2_sys_init (void)
 
void gfs2_sys_uninit (void)
 

Macro Definition Documentation

#define GDLM_ATTR (   _name,
  _mode,
  _show,
  _store 
)    static struct gfs2_attr gdlm_attr_##_name = __ATTR(_name,_mode,_show,_store)

Definition at line 461 of file sys.c.

#define GFS2_ATTR (   name,
  mode,
  show,
  store 
)    static struct gfs2_attr gfs2_attr_##name = __ATTR(name, mode, show, store)

Definition at line 251 of file sys.c.

#define TUNE_ATTR (   name,
  check_zero 
)
Value:
static ssize_t name##_store(struct gfs2_sbd *sdp, const char *buf, size_t len)\
{ \
return tune_set(sdp, &sdp->sd_tune.gt_##name, check_zero, buf, len); \
} \
TUNE_ATTR_2(name, name##_store)

Definition at line 547 of file sys.c.

#define TUNE_ATTR_2 (   name,
  store 
)
Value:
static ssize_t name##_show(struct gfs2_sbd *sdp, char *buf) \
{ \
return snprintf(buf, PAGE_SIZE, "%u\n", sdp->sd_tune.gt_##name); \
} \
TUNE_ATTR_3(name, name##_show, store)

Definition at line 540 of file sys.c.

#define TUNE_ATTR_3 (   name,
  show,
  store 
)    static struct gfs2_attr tune_attr_##name = __ATTR(name, 0644, show, store)

Definition at line 537 of file sys.c.

Function Documentation

GDLM_ATTR ( proto_name  ,
0444  ,
proto_name_show  ,
NULL   
)
GDLM_ATTR ( block  ,
0644  ,
block_show  ,
block_store   
)
GDLM_ATTR ( withdraw  ,
0644  ,
withdraw_show  ,
withdraw_store   
)
GDLM_ATTR ( jid  ,
0644  ,
jid_show  ,
jid_store   
)
GDLM_ATTR ( first  ,
0644  ,
lkfirst_show  ,
lkfirst_store   
)
GDLM_ATTR ( first_done  ,
0444  ,
first_done_show  ,
NULL   
)
GDLM_ATTR ( recover  ,
0600  ,
NULL  ,
recover_store   
)
GDLM_ATTR ( recover_done  ,
0444  ,
recover_done_show  ,
NULL   
)
GDLM_ATTR ( recover_status  ,
0444  ,
recover_status_show  ,
NULL   
)
GFS2_ATTR ( id  ,
0444  ,
id_show  ,
NULL   
)
GFS2_ATTR ( fsname  ,
0444  ,
fsname_show  ,
NULL   
)
GFS2_ATTR ( uuid  ,
0444  ,
uuid_show  ,
NULL   
)
GFS2_ATTR ( freeze  ,
0644  ,
freeze_show  ,
freeze_store   
)
GFS2_ATTR ( withdraw  ,
0644  ,
withdraw_show  ,
withdraw_store   
)
GFS2_ATTR ( statfs_sync  ,
0200  ,
NULL  ,
statfs_sync_store   
)
GFS2_ATTR ( quota_sync  ,
0200  ,
NULL  ,
quota_sync_store   
)
GFS2_ATTR ( quota_refresh_user  ,
0200  ,
NULL  ,
quota_refresh_user_store   
)
GFS2_ATTR ( quota_refresh_group  ,
0200  ,
NULL  ,
quota_refresh_group_store   
)
GFS2_ATTR ( demote_rq  ,
0200  ,
NULL  ,
demote_rq_store   
)
int gfs2_recover_set ( struct gfs2_sbd sdp,
unsigned  jid 
)

Definition at line 374 of file sys.c.

int gfs2_sys_fs_add ( struct gfs2_sbd sdp)

Definition at line 587 of file sys.c.

void gfs2_sys_fs_del ( struct gfs2_sbd sdp)

Definition at line 639 of file sys.c.

int gfs2_sys_init ( void  )

Definition at line 667 of file sys.c.

void gfs2_sys_uninit ( void  )

Definition at line 675 of file sys.c.

TUNE_ATTR ( quota_warn_period  ,
 
)
TUNE_ATTR ( quota_quantum  ,
 
)
TUNE_ATTR ( max_readahead  ,
 
)
TUNE_ATTR ( complain_secs  ,
 
)
TUNE_ATTR ( statfs_slow  ,
 
)
TUNE_ATTR ( new_files_jdata  ,
 
)
TUNE_ATTR ( quota_simul_sync  ,
 
)
TUNE_ATTR ( statfs_quantum  ,
 
)
TUNE_ATTR_3 ( quota_scale  ,
quota_scale_show  ,
quota_scale_store   
)