Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / include / linux / ext3_fs.h
index 4c39437..33bc72c 100644 (file)
 #define _LINUX_EXT3_FS_H
 
 #include <linux/types.h>
+#include <linux/ext3_fs_i.h>
+#include <linux/ext3_fs_sb.h>
+
+
+struct statfs;
 
 /*
  * The second extended filesystem constants/structures
@@ -495,8 +500,6 @@ struct ext3_super_block {
 };
 
 #ifdef __KERNEL__
-#include <linux/ext3_fs_i.h>
-#include <linux/ext3_fs_sb.h>
 static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb)
 {
        return sb->s_fs_info;
@@ -683,8 +686,6 @@ struct ext3_dir_entry_2 {
 #define DX_HASH_HALF_MD4       1
 #define DX_HASH_TEA            2
 
-#ifdef __KERNEL__
-
 /* hash info structure used by the directory hash */
 struct dx_hash_info
 {
@@ -696,6 +697,7 @@ struct dx_hash_info
 
 #define EXT3_HTREE_EOF 0x7fffffff
 
+#ifdef __KERNEL__
 /*
  * Control parameters used by ext3_htree_next_block
  */
@@ -732,14 +734,6 @@ struct dir_private_info {
        __u32           next_hash;
 };
 
-/* calculate the first block number of the group */
-static inline ext3_fsblk_t
-ext3_group_first_block_no(struct super_block *sb, unsigned long group_no)
-{
-       return group_no * (ext3_fsblk_t)EXT3_BLOCKS_PER_GROUP(sb) +
-               le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block);
-}
-
 /*
  * Special error return code only used by dx_probe() and its callers.
  */
@@ -760,16 +754,14 @@ ext3_group_first_block_no(struct super_block *sb, unsigned long group_no)
 /* balloc.c */
 extern int ext3_bg_has_super(struct super_block *sb, int group);
 extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
-extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode,
-                       ext3_fsblk_t goal, int *errp);
-extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode,
-                       ext3_fsblk_t goal, unsigned long *count, int *errp);
-extern void ext3_free_blocks (handle_t *handle, struct inode *inode,
-                       ext3_fsblk_t block, unsigned long count);
-extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb,
-                                ext3_fsblk_t block, unsigned long count,
-                               unsigned long *pdquot_freed_blocks);
-extern ext3_fsblk_t ext3_count_free_blocks (struct super_block *);
+extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
+extern int ext3_new_blocks (handle_t *, struct inode *, unsigned long,
+                       unsigned long *, int *);
+extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
+                             unsigned long);
+extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
+                                unsigned long, unsigned long, int *);
+extern unsigned long ext3_count_free_blocks (struct super_block *);
 extern void ext3_check_blocks_bitmap (struct super_block *);
 extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
                                                    unsigned int block_group,
@@ -805,8 +797,7 @@ extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
 
 
 /* inode.c */
-int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
-               struct buffer_head *bh, ext3_fsblk_t blocknr);
+int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
 struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
 struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
 int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
@@ -842,7 +833,7 @@ extern int ext3_group_add(struct super_block *sb,
                                struct ext3_new_group_data *input);
 extern int ext3_group_extend(struct super_block *sb,
                                struct ext3_super_block *es,
-                               ext3_fsblk_t n_blocks_count);
+                               unsigned long n_blocks_count);
 
 /* super.c */
 extern void ext3_error (struct super_block *, const char *, const char *, ...)