Whamcloud - gitweb
ChangeLog, Makefile.in, bitops.h, gen_bitmap.c:
authorTheodore Ts'o <tytso@mit.edu>
Mon, 11 Jun 2001 15:17:45 +0000 (15:17 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Jun 2001 15:17:45 +0000 (15:17 +0000)
  Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
   ext2fs_mark_generic_bitmap and ext2fs_unmark_generic_bitmap to
   gen_bitmap.c as normal functions.  (This saves space and doesn't
   significantly change the speed of e2fsck on a P-III.)
ChangeLog:
  Add missing log entry for unix.c.

e2fsck/ChangeLog
lib/ext2fs/ChangeLog
lib/ext2fs/Makefile.in
lib/ext2fs/bitops.h
lib/ext2fs/gen_bitmap.c [new file with mode: 0644]

index c10b5c0..38b2c13 100644 (file)
@@ -1,5 +1,8 @@
 2001-06-11  Theodore Tso  <tytso@valinux.com>
 
+       * unix.c (PRS): Fix bug introduced in 1.20 which broke the -F
+               flag.
+
        * Makefile.in: Add message.c and swapfs.c to the list of source
                files to build the make depend.
 
index f26f76b..710f79e 100644 (file)
@@ -1,5 +1,11 @@
 2001-06-11  Theodore Tso  <tytso@valinux.com>
 
+       * Makefile.in, gen_bitmap.c, bitops.h: Move inline functions
+               ext2fs_mark_generic_bitmap and
+               ext2fs_unmark_generic_bitmap to gen_bitmap.c as normal
+               functions.  (This saves space and doesn't significantly
+               change the speed of e2fsck on a P-III.)
+
        * ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c,
                inode.c, native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only
                include the byte-swapping logic if ENABLE_SWAPFS is turned
index 6278b8d..98444e5 100644 (file)
@@ -30,6 +30,7 @@ OBJS= ext2_err.o \
        finddev.o \
        flushb.o \
        freefs.o \
+       gen_bitmap.o \
        get_pathname.o \
        getsize.o \
        icount.o \
@@ -82,6 +83,7 @@ SRCS= ext2_err.c \
        $(srcdir)/finddev.c \
        $(srcdir)/flushb.c \
        $(srcdir)/freefs.c \
+       $(srcdir/gen_bitmap.c \
        $(srcdir)/get_pathname.c \
        $(srcdir)/getsize.c \
        $(srcdir)/icount.c \
index f4b8e26..464f5e9 100644 (file)
@@ -354,33 +354,14 @@ _INLINE_ __u32 ext2fs_swab32(__u32 val)
 
 #endif /* !_EXT2_HAVE_ASM_SWAB */
 
-_INLINE_ int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+/* These two routines moved to gen_bitmap.c */
+extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
                                         __u32 bitno);
-_INLINE_ int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
                                           blk_t bitno);
 _INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
                                        blk_t bitno);
 
-_INLINE_ int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
-                                        __u32 bitno)
-{
-       if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
-               ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
-               return 0;
-       }
-       return ext2fs_set_bit(bitno - bitmap->start, bitmap->bitmap);
-}
-
-_INLINE_ int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
-                                          blk_t bitno)
-{
-       if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
-               ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
-               return 0;
-       }
-       return ext2fs_clear_bit(bitno - bitmap->start, bitmap->bitmap);
-}
-
 _INLINE_ int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap,
                                        blk_t bitno)
 {
@@ -627,7 +608,6 @@ _INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap,
        for (i=0; i < num; i++)
                ext2fs_clear_bit(block + i - bitmap->start, bitmap->bitmap);
 }
-
 #undef _INLINE_
 #endif
 
diff --git a/lib/ext2fs/gen_bitmap.c b/lib/ext2fs/gen_bitmap.c
new file mode 100644 (file)
index 0000000..700affa
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * gen_bitmap.c --- Generic bitmap routines that used to be inlined.
+ * 
+ * Copyright (C) 2001 Theodore Ts'o.
+ *
+ * %Begin-Header%
+ * This file may be redistributed under the terms of the GNU Public
+ * License.
+ * %End-Header%
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <fcntl.h>
+#include <time.h>
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#include "ext2_fs.h"
+#include "ext2fs.h"
+
+int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+                                        __u32 bitno)
+{
+       if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
+               ext2fs_warn_bitmap2(bitmap, EXT2FS_MARK_ERROR, bitno);
+               return 0;
+       }
+       return ext2fs_set_bit(bitno - bitmap->start, bitmap->bitmap);
+}
+
+int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap,
+                                          blk_t bitno)
+{
+       if ((bitno < bitmap->start) || (bitno > bitmap->end)) {
+               ext2fs_warn_bitmap2(bitmap, EXT2FS_UNMARK_ERROR, bitno);
+               return 0;
+       }
+       return ext2fs_clear_bit(bitno - bitmap->start, bitmap->bitmap);
+}