Blame view

fs/gfs2/rgrp.h 2.8 KB
b3b94faa5   David Teigland   [GFS2] The core o...
1
2
  /*
   * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
fe6c991c5   Bob Peterson   [GFS2] Get rid of...
3
   * Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
b3b94faa5   David Teigland   [GFS2] The core o...
4
5
6
   *
   * This copyrighted material is made available to anyone wishing to use,
   * modify, copy, or redistribute it subject to the terms and conditions
e9fc2aa09   Steven Whitehouse   [GFS2] Update cop...
7
   * of the GNU General Public License version 2.
b3b94faa5   David Teigland   [GFS2] The core o...
8
9
10
11
   */
  
  #ifndef __RGRP_DOT_H__
  #define __RGRP_DOT_H__
5a0e3ad6a   Tejun Heo   include cleanup: ...
12
  #include <linux/slab.h>
f2f7ba523   Steven Whitehouse   [GFS2] Make heade...
13
14
15
  struct gfs2_rgrpd;
  struct gfs2_sbd;
  struct gfs2_holder;
090109783   Steven Whitehouse   GFS2: Improve res...
16
  extern void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
b3b94faa5   David Teigland   [GFS2] The core o...
17

cd915493f   Steven Whitehouse   [GFS2] Change all...
18
  struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
b3b94faa5   David Teigland   [GFS2] The core o...
19
20
  struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp);
  struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd);
090109783   Steven Whitehouse   GFS2: Improve res...
21
22
  extern void gfs2_clear_rgrpd(struct gfs2_sbd *sdp);
  extern int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh);
b3b94faa5   David Teigland   [GFS2] The core o...
23

090109783   Steven Whitehouse   GFS2: Improve res...
24
25
26
  extern int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd);
  extern void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd);
  extern void gfs2_rgrp_bh_put(struct gfs2_rgrpd *rgd);
b3b94faa5   David Teigland   [GFS2] The core o...
27

090109783   Steven Whitehouse   GFS2: Improve res...
28
  extern void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
b3b94faa5   David Teigland   [GFS2] The core o...
29

090109783   Steven Whitehouse   GFS2: Improve res...
30
  extern struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
2c1e52aa9   Steven Whitehouse   [GFS2] More style...
31
32
  static inline void gfs2_alloc_put(struct gfs2_inode *ip)
  {
6dbd82248   Steven Whitehouse   [GFS2] Reduce ino...
33
34
35
  	BUG_ON(ip->i_alloc == NULL);
  	kfree(ip->i_alloc);
  	ip->i_alloc = NULL;
2c1e52aa9   Steven Whitehouse   [GFS2] More style...
36
  }
b3b94faa5   David Teigland   [GFS2] The core o...
37

46290341c   Bob Peterson   GFS2 fatal: files...
38
39
  extern int gfs2_inplace_reserve_i(struct gfs2_inode *ip, int hold_rindex,
  				  char *file, unsigned int line);
b3b94faa5   David Teigland   [GFS2] The core o...
40
  #define gfs2_inplace_reserve(ip) \
46290341c   Bob Peterson   GFS2 fatal: files...
41
42
43
  	gfs2_inplace_reserve_i((ip), 1, __FILE__, __LINE__)
  #define gfs2_inplace_reserve_ri(ip) \
  	gfs2_inplace_reserve_i((ip), 0, __FILE__, __LINE__)
b3b94faa5   David Teigland   [GFS2] The core o...
44

090109783   Steven Whitehouse   GFS2: Improve res...
45
  extern void gfs2_inplace_release(struct gfs2_inode *ip);
b3b94faa5   David Teigland   [GFS2] The core o...
46

086d8334c   Benjamin Marzinski   GFS2: fix recursi...
47
  extern int gfs2_ri_update(struct gfs2_inode *ip);
090109783   Steven Whitehouse   GFS2: Improve res...
48
  extern int gfs2_alloc_block(struct gfs2_inode *ip, u64 *bn, unsigned int *n);
6050b9c74   Steven Whitehouse   GFS2: Improve err...
49
  extern int gfs2_alloc_di(struct gfs2_inode *ip, u64 *bn, u64 *generation);
b3b94faa5   David Teigland   [GFS2] The core o...
50

4c16c36ad   Bob Peterson   GFS2: deallocatio...
51
  extern void __gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen);
090109783   Steven Whitehouse   GFS2: Improve res...
52
  extern void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen);
4c16c36ad   Bob Peterson   GFS2: deallocatio...
53
  extern void __gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen);
090109783   Steven Whitehouse   GFS2: Improve res...
54
55
56
  extern void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen);
  extern void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip);
  extern void gfs2_unlink_di(struct inode *inode);
acf7e2444   Steven Whitehouse   GFS2: Be extra ca...
57
58
  extern int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr,
  			       unsigned int type);
b3b94faa5   David Teigland   [GFS2] The core o...
59
60
61
62
63
64
65
  
  struct gfs2_rgrp_list {
  	unsigned int rl_rgrps;
  	unsigned int rl_space;
  	struct gfs2_rgrpd **rl_rgd;
  	struct gfs2_holder *rl_ghs;
  };
090109783   Steven Whitehouse   GFS2: Improve res...
66
67
68
69
70
71
  extern void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
  			   u64 block);
  extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state);
  extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
  extern u64 gfs2_ri_total(struct gfs2_sbd *sdp);
  extern int gfs2_rgrp_dump(struct seq_file *seq, const struct gfs2_glock *gl);
b3b94faa5   David Teigland   [GFS2] The core o...
72
73
  
  #endif /* __RGRP_DOT_H__ */