Blame view
fs/gfs2/trans.h
1.46 KB
b3b94faa5 [GFS2] The core o... |
1 2 |
/* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3a8a9a103 [GFS2] Update cop... |
3 |
* Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. |
b3b94faa5 [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 [GFS2] Update cop... |
7 |
* of the GNU General Public License version 2. |
b3b94faa5 [GFS2] The core o... |
8 9 10 11 |
*/ #ifndef __TRANS_DOT_H__ #define __TRANS_DOT_H__ |
f2f7ba523 [GFS2] Make heade... |
12 13 14 15 |
#include <linux/buffer_head.h> struct gfs2_sbd; struct gfs2_rgrpd; struct gfs2_glock; |
b3b94faa5 [GFS2] The core o... |
16 17 18 19 20 |
#define RES_DINODE 1 #define RES_INDIRECT 1 #define RES_JDATA 1 #define RES_DATA 1 #define RES_LEAF 1 |
3921120e7 GFS2: fallocate s... |
21 |
#define RES_RG_HDR 1 |
b3b94faa5 [GFS2] The core o... |
22 23 |
#define RES_RG_BIT 2 #define RES_EATTR 1 |
b3b94faa5 [GFS2] The core o... |
24 25 |
#define RES_STATFS 1 #define RES_QUOTA 2 |
bf97b6734 GFS2: reserve mor... |
26 27 |
/* reserve either the number of blocks to be allocated plus the rg header * block, or all of the blocks in the rg, whichever is smaller */ |
54335b1fc GFS2: Cache the m... |
28 |
static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip) |
bf97b6734 GFS2: reserve mor... |
29 |
{ |
564e12b11 GFS2: decouple qu... |
30 31 32 |
const struct gfs2_blkreserv *rs = ip->i_res; if (rs->rs_requested < ip->i_rgd->rd_length) return rs->rs_requested + 1; |
54335b1fc GFS2: Cache the m... |
33 |
return ip->i_rgd->rd_length; |
bf97b6734 GFS2: reserve mor... |
34 |
} |
7c9ca6211 GFS2: Use rbtree ... |
35 36 |
extern int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, unsigned int revokes); |
b3b94faa5 [GFS2] The core o... |
37 |
|
7c9ca6211 GFS2: Use rbtree ... |
38 39 40 41 |
extern void gfs2_trans_end(struct gfs2_sbd *sdp); extern void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta); extern void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); extern void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno, unsigned int len); |
b3b94faa5 [GFS2] The core o... |
42 43 |
#endif /* __TRANS_DOT_H__ */ |