Whamcloud - gitweb
mke2fs: fix for the "-E offset=N" option
[tools/e2fsprogs.git] / e2fsck / jfs_user.h
index adb8ae9..be81f43 100644 (file)
@@ -12,6 +12,8 @@
 #define _JFS_USER_H
 
 #ifdef DEBUGFS
+#include <stdio.h>
+#include <stdlib.h>
 #if EXT2_FLAT_INCLUDES
 #include "ext2_fs.h"
 #include "ext2fs.h"
@@ -65,8 +67,6 @@ struct kdev_s {
 #define K_DEV_FS       1
 #define K_DEV_JOURNAL  2
 
-typedef struct kdev_s *kdev_t;
-
 #define lock_buffer(bh) do {} while (0)
 #define unlock_buffer(bh) do {} while (0)
 #define buffer_req(bh) 1
@@ -85,9 +85,6 @@ typedef struct {
 
 #define cond_resched() do { } while (0)
 
-typedef unsigned int __be32;
-typedef __u64 __be64;
-
 #define __init
 
 /*
@@ -170,23 +167,6 @@ void wait_on_buffer(struct buffer_head *bh);
 #define JSB_HAS_INCOMPAT_FEATURE(jsb, mask)                            \
        ((jsb)->s_header.h_blocktype == ext2fs_cpu_to_be32(JFS_SUPERBLOCK_V2) &&        \
         ((jsb)->s_feature_incompat & ext2fs_cpu_to_be32((mask))))
-static inline size_t journal_super_tag_bytes(journal_superblock_t *jsb)
-{
-       size_t sz;
-
-       if (JSB_HAS_INCOMPAT_FEATURE(jsb, JFS_FEATURE_INCOMPAT_CSUM_V3))
-               return sizeof(journal_block_tag3_t);
-
-       sz = sizeof(journal_block_tag_t);
-
-       if (JSB_HAS_INCOMPAT_FEATURE(jsb, JFS_FEATURE_INCOMPAT_CSUM_V2))
-               sz += sizeof(__u16);
-
-       if (JSB_HAS_INCOMPAT_FEATURE(jsb, JFS_FEATURE_INCOMPAT_64BIT))
-               return sz;
-
-       return sz - sizeof(__u32);
-}
 #else  /* !DEBUGFS */
 
 extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
@@ -201,4 +181,18 @@ extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
 
 #endif /* DEBUGFS */
 
+/* recovery.c */
+extern int     journal_recover    (journal_t *journal);
+extern int     journal_skip_recovery (journal_t *);
+
+/* revoke.c */
+extern int     journal_init_revoke(journal_t *, int);
+extern void    journal_destroy_revoke(journal_t *);
+extern void    journal_destroy_revoke_caches(void);
+extern int     journal_init_revoke_caches(void);
+
+extern int     journal_set_revoke(journal_t *, unsigned long long, tid_t);
+extern int     journal_test_revoke(journal_t *, unsigned long long, tid_t);
+extern void    journal_clear_revoke(journal_t *);
+
 #endif /* _JFS_USER_H */