aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trans.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /fs/gfs2/trans.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'fs/gfs2/trans.h')
-rw-r--r--fs/gfs2/trans.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h
index bf2ae9aeee7..fb56b783e02 100644
--- a/fs/gfs2/trans.h
+++ b/fs/gfs2/trans.h
@@ -28,19 +28,20 @@ struct gfs2_glock;
28 28
29/* reserve either the number of blocks to be allocated plus the rg header 29/* reserve either the number of blocks to be allocated plus the rg header
30 * block, or all of the blocks in the rg, whichever is smaller */ 30 * block, or all of the blocks in the rg, whichever is smaller */
31static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip, unsigned requested) 31static inline unsigned int gfs2_rg_blocks(const struct gfs2_alloc *al)
32{ 32{
33 if (requested < ip->i_rgd->rd_length) 33 return (al->al_requested < al->al_rgd->rd_length)?
34 return requested + 1; 34 al->al_requested + 1 : al->al_rgd->rd_length;
35 return ip->i_rgd->rd_length;
36} 35}
37 36
38extern int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, 37int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
39 unsigned int revokes); 38 unsigned int revokes);
40 39
41extern void gfs2_trans_end(struct gfs2_sbd *sdp); 40void gfs2_trans_end(struct gfs2_sbd *sdp);
42extern void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta); 41
43extern void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); 42void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta);
44extern void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len); 43void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd);
44void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len);
45void gfs2_trans_add_rg(struct gfs2_rgrpd *rgd);
45 46
46#endif /* __TRANS_DOT_H__ */ 47#endif /* __TRANS_DOT_H__ */