aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir_leaf.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
committerNathan Scott <nathans@sgi.com>2005-11-01 22:38:42 -0500
commita844f4510dce23c07f3923cb42138f5fdd745017 (patch)
treeffb37e9e60f02d5e92bd69bb53b568e1c991c17f /fs/xfs/xfs_dir_leaf.h
parent61c1e689fbde7cb50a76262bba190715d86beab6 (diff)
[XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot.
SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir_leaf.h')
-rw-r--r--fs/xfs/xfs_dir_leaf.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h
index 480bffc1f29f..216d62693b72 100644
--- a/fs/xfs/xfs_dir_leaf.h
+++ b/fs/xfs/xfs_dir_leaf.h
@@ -152,30 +152,26 @@ typedef struct xfs_dir_put_args
152 struct uio *uio; /* uio control structure */ 152 struct uio *uio; /* uio control structure */
153} xfs_dir_put_args_t; 153} xfs_dir_put_args_t;
154 154
155#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYNAME)
156int xfs_dir_leaf_entsize_byname(int len);
157#define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) xfs_dir_leaf_entsize_byname(len) 155#define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) xfs_dir_leaf_entsize_byname(len)
158#else 156static inline int xfs_dir_leaf_entsize_byname(int len)
159#define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) /* space a name will use */ \ 157{
160 ((uint)sizeof(xfs_dir_leaf_name_t)-1 + len) 158 return (uint)sizeof(xfs_dir_leaf_name_t)-1 + len;
161#endif 159}
162#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYENTRY) 160
163int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry);
164#define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \ 161#define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \
165 xfs_dir_leaf_entsize_byentry(entry) 162 xfs_dir_leaf_entsize_byentry(entry)
166#else 163static inline int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry)
167#define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) /* space an entry will use */ \ 164{
168 ((uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen) 165 return (uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen;
169#endif 166}
170#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_NAMESTRUCT) 167
171xfs_dir_leaf_name_t *
172xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset);
173#define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \ 168#define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \
174 xfs_dir_leaf_namestruct(leafp,offset) 169 xfs_dir_leaf_namestruct(leafp,offset)
175#else 170static inline xfs_dir_leaf_name_t *
176#define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) /* point to name struct */ \ 171xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset)
177 ((xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]) 172{
178#endif 173 return (xfs_dir_leaf_name_t *)&((char *)(leafp))[offset];
174}
179 175
180/*======================================================================== 176/*========================================================================
181 * Function prototypes for the kernel. 177 * Function prototypes for the kernel.
@@ -190,7 +186,7 @@ int xfs_dir_shortform_lookup(struct xfs_da_args *args);
190int xfs_dir_shortform_to_leaf(struct xfs_da_args *args); 186int xfs_dir_shortform_to_leaf(struct xfs_da_args *args);
191int xfs_dir_shortform_removename(struct xfs_da_args *args); 187int xfs_dir_shortform_removename(struct xfs_da_args *args);
192int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, 188int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp,
193 struct xfs_dirent *dbp, xfs_dir_put_t put); 189 struct xfs_dirent *dbp, xfs_dir_put_t put);
194int xfs_dir_shortform_replace(struct xfs_da_args *args); 190int xfs_dir_shortform_replace(struct xfs_da_args *args);
195 191
196/* 192/*
@@ -237,7 +233,6 @@ int xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa);
237int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa); 233int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa);
238int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); 234int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino);
239 235
240
241/* 236/*
242 * Global data. 237 * Global data.
243 */ 238 */