summaryrefslogtreecommitdiff
path: root/e2fsck/jfs_user.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2001-12-16 02:23:36 -0500
committerTheodore Ts'o <tytso@mit.edu>2001-12-16 02:23:36 -0500
commit8cf93332d180e6929d73cd8c855c3a83d6a6648c (patch)
treec77c315314e07039f43a32a1f2ddcbe795f28bbf /e2fsck/jfs_user.h
parent5d57ad14f31f93384baa92c95d77008fc2ac803f (diff)
downloade2fsprogs-8cf93332d180e6929d73cd8c855c3a83d6a6648c.tar.gz
Fix e2fsck's handling of external journals,and update journal
recovery files from 2.4.17-pre8.
Diffstat (limited to 'e2fsck/jfs_user.h')
-rw-r--r--e2fsck/jfs_user.h61
1 files changed, 39 insertions, 22 deletions
diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h
index 356a0ec0..f02923b1 100644
--- a/e2fsck/jfs_user.h
+++ b/e2fsck/jfs_user.h
@@ -15,14 +15,14 @@
#include "e2fsck.h"
struct buffer_head {
- char b_data[8192];
- e2fsck_t b_ctx;
- io_channel b_io;
- int b_size;
- blk_t b_blocknr;
- int b_dirty;
- int b_uptodate;
- int b_err;
+ char b_data[8192];
+ e2fsck_t b_ctx;
+ io_channel b_io;
+ int b_size;
+ blk_t b_blocknr;
+ int b_dirty;
+ int b_uptodate;
+ int b_err;
};
struct inode {
@@ -31,20 +31,17 @@ struct inode {
struct ext2_inode i_ext2;
};
-typedef e2fsck_t kdev_t;
+struct kdev_s {
+ e2fsck_t k_ctx;
+ int k_dev;
+};
-/*
- * Kernel compatibility functions are defined in journal.c
- */
-int bmap(struct inode *inode, int block);
-struct buffer_head *getblk(e2fsck_t ctx, blk_t blocknr, int blocksize);
-void ll_rw_block(int rw, int dummy, struct buffer_head *bh[]);
-void mark_buffer_dirty(struct buffer_head *bh, int dummy);
-void mark_buffer_uptodate(struct buffer_head *bh, int val);
-void brelse(struct buffer_head *bh);
-int buffer_uptodate(struct buffer_head *bh);
-void wait_on_buffer(struct buffer_head *bh);
-#define fsync_dev(dev) do {} while(0)
+#define K_DEV_FS 1
+#define K_DEV_JOURNAL 2
+
+typedef struct kdev_s *kdev_t;
+
+#define fsync_no_super(dev) do {} while(0)
#define buffer_req(bh) 1
#define do_readahead(journal, start) do {} while(0)
@@ -57,6 +54,7 @@ typedef struct {
#define kmem_cache_alloc(cache,flags) malloc((cache)->object_length)
#define kmem_cache_free(cache,obj) free(obj)
#define kmem_cache_create(name,len,a,b,c,d) do_cache_create(len)
+#define kmem_cache_destroy(cache) do_cache_destroy(cache)
#define kmalloc(len,flags) malloc(len)
#define kfree(p) free(p)
@@ -65,6 +63,7 @@ typedef struct {
* functions.
*/
extern kmem_cache_t * do_cache_create(int len);
+extern void do_cache_destroy(kmem_cache_t *cache);
#if (defined(E2FSCK_INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS))
#ifdef E2FSCK_INCLUDE_INLINE_FUNCS
@@ -86,10 +85,28 @@ _INLINE_ kmem_cache_t * do_cache_create(int len)
return new_cache;
}
+_INLINE_ void do_cache_destroy(kmem_cache_t *cache)
+{
+ free(cache);
+}
#undef _INLINE_
#endif
+#define __init
+
/*
* Now pull in the real linux/jfs.h definitions.
*/
-#include <linux/jfs.h>
+#include <linux/jbd.h>
+
+/*
+ * Kernel compatibility functions are defined in journal.c
+ */
+int journal_bmap(journal_t *journal, blk_t block, unsigned long *phys);
+struct buffer_head *getblk(kdev_t ctx, blk_t blocknr, int blocksize);
+void ll_rw_block(int rw, int dummy, struct buffer_head *bh[]);
+void mark_buffer_dirty(struct buffer_head *bh);
+void mark_buffer_uptodate(struct buffer_head *bh, int val);
+void brelse(struct buffer_head *bh);
+int buffer_uptodate(struct buffer_head *bh);
+void wait_on_buffer(struct buffer_head *bh);