Whamcloud - gitweb
ChangeLog, Makefile.in, jfs_user.h:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 3 Jan 2001 13:24:06 +0000 (13:24 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Jan 2001 13:24:06 +0000 (13:24 +0000)
  jfs_user.h: Moved contents of jfs_e2fsck.h into jfs_user.h.

e2fsck/ChangeLog
e2fsck/Makefile.in
e2fsck/jfs_user.h

index d75e13a..612df29 100644 (file)
@@ -1,5 +1,7 @@
 2001-01-03    <tytso@snap.thunk.org>
 
+       * jfs_user.h: Moved contents of jfs_e2fsck.h into jfs_user.h.
+
        * journal.c (e2fsck_check_ext3_journal): Force a fsck if we remove
                the journal stored on a reserved inode.  Also force a fsck
                if the journal appears to exist while !NEEDS_RECOVERY, and
index 8f8b49b..5082982 100644 (file)
@@ -204,21 +204,21 @@ journal.o: $(srcdir)/journal.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
  $(top_srcdir)/include/linux/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
- $(srcdir)/jfs_e2fsck.h $(top_srcdir)/include/linux/jfs.h \
- $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h \
- $(srcdir)/problem.h $(top_srcdir)/lib/uuid/uuid.h
+ $(top_srcdir)/include/linux/jfs.h $(top_srcdir)/include/linux/jfs_compat.h \
+ $(top_srcdir)/include/linux/list.h $(srcdir)/problem.h \
+ $(top_srcdir)/lib/uuid/uuid.h
 recovery.o: $(srcdir)/recovery.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
  $(top_srcdir)/include/linux/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
- $(srcdir)/jfs_e2fsck.h $(top_srcdir)/include/linux/jfs.h \
- $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h
+ $(top_srcdir)/include/linux/jfs.h $(top_srcdir)/include/linux/jfs_compat.h \
+ $(top_srcdir)/include/linux/list.h
 revoke.o: $(srcdir)/revoke.c $(srcdir)/jfs_user.h $(srcdir)/e2fsck.h \
  $(top_srcdir)/include/linux/ext2_fs.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
  $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
  $(top_builddir)/lib/ext2fs/ext2_err.h $(top_srcdir)/lib/ext2fs/bitops.h \
- $(srcdir)/jfs_e2fsck.h $(top_srcdir)/include/linux/jfs.h \
- $(top_srcdir)/include/linux/jfs_compat.h $(top_srcdir)/include/linux/list.h
+ $(top_srcdir)/include/linux/jfs.h $(top_srcdir)/include/linux/jfs_compat.h \
+ $(top_srcdir)/include/linux/list.h
 badblocks.o: $(srcdir)/badblocks.c $(top_srcdir)/lib/et/com_err.h \
  $(srcdir)/e2fsck.h $(top_srcdir)/include/linux/ext2_fs.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
index 6fd16de..eaab048 100644 (file)
@@ -1,3 +1,74 @@
+/*
+ * Compatibility header file for e2fsck which should be included
+ * instead of linux/jfs.h
+ *
+ * Copyright (C) 2000 Stephen C. Tweedie
+ *
+ * This file may be redistributed under the terms of the
+ * GNU General Public License version 2 or at your discretion
+ * any later version.
+ */
+
+/*
+ * Pull in the definition of the e2fsck context structure
+ */
 #include "e2fsck.h"
-#include "jfs_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;
+};
+
+struct inode {
+       e2fsck_t i_ctx;
+       ino_t    i_ino;
+       struct ext2_inode i_ext2;
+};
+
+typedef e2fsck_t kdev_t;
+
+/*
+ * 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 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 buffer_req(bh) 1
+#define do_readahead(journal, start) do {} while(0)
+       
+extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
+
+typedef struct {
+       int     object_length;
+} kmem_cache_t;
+
+#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 kmalloc(len,flags) malloc(len)
+#define kfree(p) free(p)
+
+static inline kmem_cache_t * do_cache_create(int len)
+{
+       kmem_cache_t *new_cache;
+       new_cache = malloc(sizeof(*new_cache));
+       if (new_cache)
+               new_cache->object_length = len;
+       return new_cache;
+}
+
+/*
+ * Now pull in the real linux/jfs.h definitions.
+ */
 #include <linux/jfs.h>