]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/rgrp.h
FRV: Don't make smp_{r, w, }mb() interpolate MEMBAR when CONFIG_SMP=n [try #2]
[linux-2.6-omap-h63xx.git] / fs / gfs2 / rgrp.h
index 14600944d1843a62a64a002d07d4f2227882ff8f..149bb161f4b6628d76076ce0a4d1ff51247c8f65 100644 (file)
@@ -4,15 +4,19 @@
  *
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License v.2.
+ * of the GNU General Public License version 2.
  */
 
 #ifndef __RGRP_DOT_H__
 #define __RGRP_DOT_H__
 
+struct gfs2_rgrpd;
+struct gfs2_sbd;
+struct gfs2_holder;
+
 void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
 
-struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, uint64_t blk);
+struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
 struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp);
 struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd);
 
@@ -26,7 +30,12 @@ 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);
-void gfs2_alloc_put(struct gfs2_inode *ip);
+static inline void gfs2_alloc_put(struct gfs2_inode *ip)
+{
+       BUG_ON(ip->i_alloc == NULL);
+       kfree(ip->i_alloc);
+       ip->i_alloc = NULL;
+}
 
 int gfs2_inplace_reserve_i(struct gfs2_inode *ip,
                         char *file, unsigned int line);
@@ -35,14 +44,14 @@ gfs2_inplace_reserve_i((ip), __FILE__, __LINE__)
 
 void gfs2_inplace_release(struct gfs2_inode *ip);
 
-unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block);
+unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block);
 
 u64 gfs2_alloc_data(struct gfs2_inode *ip);
 u64 gfs2_alloc_meta(struct gfs2_inode *ip);
 u64 gfs2_alloc_di(struct gfs2_inode *ip, u64 *generation);
 
-void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen);
-void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen);
+void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen);
+void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen);
 void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip);
 void gfs2_unlink_di(struct inode *inode);
 
@@ -54,9 +63,10 @@ struct gfs2_rgrp_list {
 };
 
 void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
-                   uint64_t block);
+                   u64 block);
 void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state,
                      int flags);
 void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
+u64 gfs2_ri_total(struct gfs2_sbd *sdp);
 
 #endif /* __RGRP_DOT_H__ */