Blame view

fs/gfs2/rgrp.h 2.21 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__
f2f7ba523   Steven Whitehouse   [GFS2] Make heade...
12
13
14
  struct gfs2_rgrpd;
  struct gfs2_sbd;
  struct gfs2_holder;
b3b94faa5   David Teigland   [GFS2] The core o...
15
  void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
cd915493f   Steven Whitehouse   [GFS2] Change all...
16
  struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
b3b94faa5   David Teigland   [GFS2] The core o...
17
18
19
20
21
22
23
24
25
26
27
28
29
  struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp);
  struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd);
  
  void gfs2_clear_rgrpd(struct gfs2_sbd *sdp);
  int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh);
  
  int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd);
  void gfs2_rgrp_bh_hold(struct gfs2_rgrpd *rgd);
  void gfs2_rgrp_bh_put(struct gfs2_rgrpd *rgd);
  
  void gfs2_rgrp_repolish_clones(struct gfs2_rgrpd *rgd);
  
  struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip);
2c1e52aa9   Steven Whitehouse   [GFS2] More style...
30
31
  static inline void gfs2_alloc_put(struct gfs2_inode *ip)
  {
6dbd82248   Steven Whitehouse   [GFS2] Reduce ino...
32
33
34
  	BUG_ON(ip->i_alloc == NULL);
  	kfree(ip->i_alloc);
  	ip->i_alloc = NULL;
2c1e52aa9   Steven Whitehouse   [GFS2] More style...
35
  }
b3b94faa5   David Teigland   [GFS2] The core o...
36
37
38
39
40
41
42
  
  int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
  			 char *file, unsigned int line);
  #define gfs2_inplace_reserve(ip) \
  gfs2_inplace_reserve_i((ip), __FILE__, __LINE__)
  
  void gfs2_inplace_release(struct gfs2_inode *ip);
cd915493f   Steven Whitehouse   [GFS2] Change all...
43
  unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block);
b3b94faa5   David Teigland   [GFS2] The core o...
44

b45e41d7d   Steven Whitehouse   [GFS2] Add extent...
45
  u64 gfs2_alloc_block(struct gfs2_inode *ip, unsigned int *n);
4340fe625   Steven Whitehouse   [GFS2] Add genera...
46
  u64 gfs2_alloc_di(struct gfs2_inode *ip, u64 *generation);
b3b94faa5   David Teigland   [GFS2] The core o...
47

cd915493f   Steven Whitehouse   [GFS2] Change all...
48
49
  void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen);
  void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen);
b3b94faa5   David Teigland   [GFS2] The core o...
50
  void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip);
feaa7bba0   Steven Whitehouse   [GFS2] Fix unlink...
51
  void gfs2_unlink_di(struct inode *inode);
b3b94faa5   David Teigland   [GFS2] The core o...
52
53
54
55
56
57
58
59
60
  
  struct gfs2_rgrp_list {
  	unsigned int rl_rgrps;
  	unsigned int rl_space;
  	struct gfs2_rgrpd **rl_rgd;
  	struct gfs2_holder *rl_ghs;
  };
  
  void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
cd915493f   Steven Whitehouse   [GFS2] Change all...
61
  		    u64 block);
fe6c991c5   Bob Peterson   [GFS2] Get rid of...
62
  void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state);
b3b94faa5   David Teigland   [GFS2] The core o...
63
  void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
cd81a4bac   Robert Peterson   [GFS2] Addendum p...
64
  u64 gfs2_ri_total(struct gfs2_sbd *sdp);
b3b94faa5   David Teigland   [GFS2] The core o...
65
66
  
  #endif /* __RGRP_DOT_H__ */