diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:48:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:48:25 -0500 |
commit | 6a94cb73064c952255336cc57731904174b2c58f (patch) | |
tree | d19cc835db0a21e01909a92772868e1ad96f99ff /fs/xfs/xfs_ialloc.h | |
parent | f57fa1d6a6b3414e853d3d17e339ac48816e4406 (diff) | |
parent | 0a8c5395f90f06d128247844b2515c8bf3f2826b (diff) |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (184 commits)
[XFS] Fix race in xfs_write() between direct and buffered I/O with DMAPI
[XFS] handle unaligned data in xfs_bmbt_disk_get_all
[XFS] avoid memory allocations in xfs_fs_vcmn_err
[XFS] Fix speculative allocation beyond eof
[XFS] Remove XFS_BUF_SHUT() and friends
[XFS] Use the incore inode size in xfs_file_readdir()
[XFS] set b_error from bio error in xfs_buf_bio_end_io
[XFS] use inode_change_ok for setattr permission checking
[XFS] add a FMODE flag to make XFS invisible I/O less hacky
[XFS] resync headers with libxfs
[XFS] simplify projid check in xfs_rename
[XFS] replace b_fspriv with b_mount
[XFS] Remove unused tracing code
[XFS] Remove unnecessary assertion
[XFS] Remove unused variable in ktrace_free()
[XFS] Check return value of xfs_buf_get_noaddr()
[XFS] Fix hang after disallowed rename across directory quota domains
[XFS] Fix compile with CONFIG_COMPAT enabled
move inode tracing out of xfs_vnode.
move vn_iowait / vn_iowake into xfs_aops.c
...
Diffstat (limited to 'fs/xfs/xfs_ialloc.h')
-rw-r--r-- | fs/xfs/xfs_ialloc.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index 4e30ec1d13bc..50f558a4e0a8 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | struct xfs_buf; | 21 | struct xfs_buf; |
22 | struct xfs_dinode; | 22 | struct xfs_dinode; |
23 | struct xfs_imap; | ||
23 | struct xfs_mount; | 24 | struct xfs_mount; |
24 | struct xfs_trans; | 25 | struct xfs_trans; |
25 | 26 | ||
@@ -56,7 +57,6 @@ static inline int xfs_ialloc_find_free(xfs_inofree_t *fp) | |||
56 | } | 57 | } |
57 | 58 | ||
58 | 59 | ||
59 | #ifdef __KERNEL__ | ||
60 | /* | 60 | /* |
61 | * Allocate an inode on disk. | 61 | * Allocate an inode on disk. |
62 | * Mode is used to tell whether the new inode will need space, and whether | 62 | * Mode is used to tell whether the new inode will need space, and whether |
@@ -105,17 +105,14 @@ xfs_difree( | |||
105 | xfs_ino_t *first_ino); /* first inode in deleted cluster */ | 105 | xfs_ino_t *first_ino); /* first inode in deleted cluster */ |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * Return the location of the inode in bno/len/off, | 108 | * Return the location of the inode in imap, for mapping it into a buffer. |
109 | * for mapping it into a buffer. | ||
110 | */ | 109 | */ |
111 | int | 110 | int |
112 | xfs_dilocate( | 111 | xfs_imap( |
113 | struct xfs_mount *mp, /* file system mount structure */ | 112 | struct xfs_mount *mp, /* file system mount structure */ |
114 | struct xfs_trans *tp, /* transaction pointer */ | 113 | struct xfs_trans *tp, /* transaction pointer */ |
115 | xfs_ino_t ino, /* inode to locate */ | 114 | xfs_ino_t ino, /* inode to locate */ |
116 | xfs_fsblock_t *bno, /* output: block containing inode */ | 115 | struct xfs_imap *imap, /* location map structure */ |
117 | int *len, /* output: num blocks in cluster*/ | ||
118 | int *off, /* output: index in block of inode */ | ||
119 | uint flags); /* flags for inode btree lookup */ | 116 | uint flags); /* flags for inode btree lookup */ |
120 | 117 | ||
121 | /* | 118 | /* |
@@ -154,6 +151,24 @@ xfs_ialloc_pagi_init( | |||
154 | struct xfs_trans *tp, /* transaction pointer */ | 151 | struct xfs_trans *tp, /* transaction pointer */ |
155 | xfs_agnumber_t agno); /* allocation group number */ | 152 | xfs_agnumber_t agno); /* allocation group number */ |
156 | 153 | ||
157 | #endif /* __KERNEL__ */ | 154 | /* |
155 | * Lookup the first record greater than or equal to ino | ||
156 | * in the btree given by cur. | ||
157 | */ | ||
158 | int xfs_inobt_lookup_ge(struct xfs_btree_cur *cur, xfs_agino_t ino, | ||
159 | __int32_t fcnt, xfs_inofree_t free, int *stat); | ||
160 | |||
161 | /* | ||
162 | * Lookup the first record less than or equal to ino | ||
163 | * in the btree given by cur. | ||
164 | */ | ||
165 | int xfs_inobt_lookup_le(struct xfs_btree_cur *cur, xfs_agino_t ino, | ||
166 | __int32_t fcnt, xfs_inofree_t free, int *stat); | ||
167 | |||
168 | /* | ||
169 | * Get the data from the pointed-to record. | ||
170 | */ | ||
171 | extern int xfs_inobt_get_rec(struct xfs_btree_cur *cur, xfs_agino_t *ino, | ||
172 | __int32_t *fcnt, xfs_inofree_t *free, int *stat); | ||
158 | 173 | ||
159 | #endif /* __XFS_IALLOC_H__ */ | 174 | #endif /* __XFS_IALLOC_H__ */ |