Whamcloud - gitweb
ChangeLog, bmove.c, ext2_io.h, ext2fs.h, rw_bitmaps.c, test_io.c:
authorTheodore Ts'o <tytso@mit.edu>
Mon, 16 Feb 1998 22:00:37 +0000 (22:00 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 16 Feb 1998 22:00:37 +0000 (22:00 +0000)
  ext2_io.h, ext2fs.h: Protect against being included multiple times.
  bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
  test_io.c (test_flush): Add a debugging printf when the flush method
   is called.
  rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already read
   in, return right away.

lib/ext2fs/ChangeLog
lib/ext2fs/bmove.c
lib/ext2fs/ext2_io.h
lib/ext2fs/ext2fs.h
lib/ext2fs/rw_bitmaps.c
lib/ext2fs/test_io.c

index 36a10ae..0478c83 100644 (file)
@@ -1,3 +1,15 @@
+Mon Feb 16 16:16:00 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * ext2_io.h, ext2fs.h: Protect against being included multiple times.
+
+       * bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
+
+       * test_io.c (test_flush): Add a debugging printf when the flush
+               method is called.
+
+       * rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already
+               read in, return right away.
+
 Sun Feb  1 08:20:24 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * bitops.h: Don't try to do i386 inline asm functions if the
index 1d40860..0a06ff0 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/ext2_fs.h>
 #endif
 
-#include "ext2fs/ext2fs.h"
+#include "ext2fsP.h"
 
 struct process_block_struct {
        ino_t                   ino;
index d20ebf0..9568866 100644 (file)
@@ -9,6 +9,9 @@
  * %End-Header%
  */
 
+#ifndef _EXT2FS_EXT2_IO_H
+#define _EXT2FS_EXT2_IO_H
+
 /*
  * ext2_loff_t is defined here since unix_io.c needs it.
  */
@@ -86,3 +89,6 @@ extern void (*test_io_cb_write_blk)
        (unsigned long block, int count, errcode_t err);
 extern void (*test_io_cb_set_blksize)
        (int blksize, errcode_t err);
+
+#endif /* _EXT2FS_EXT2_IO_H */
+       
index 7b081ab..1292804 100644 (file)
@@ -9,6 +9,9 @@
  * %End-Header%
  */
 
+#ifndef _EXT2FS_EXT2FS_H
+#define _EXT2FS_EXT2FS_H
+
 /*
  * Non-GNU C compilers won't necessarily understand inline
  */
@@ -905,3 +908,4 @@ _INLINE_ int ext2fs_group_of_ino(ext2_filsys fs, ino_t ino)
 #undef _INLINE_
 #endif
 
+#endif /* _EXT2FS_EXT2FS_H */
index 168a9e7..8ad93de 100644 (file)
@@ -257,6 +257,9 @@ errcode_t ext2fs_read_bitmaps(ext2_filsys fs)
 
        EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
 
+       if (fs->inode_map && fs->block_map)
+               return 0;
+
        return read_bitmaps(fs, !fs->inode_map, !fs->block_map);
 }
 
index d555684..10cf3a5 100644 (file)
@@ -225,13 +225,18 @@ static errcode_t test_write_blk(io_channel channel, unsigned long block,
 static errcode_t test_flush(io_channel channel)
 {
        struct test_private_data *data;
+       errcode_t       retval = 0;
        
        EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
        data = (struct test_private_data *) channel->private_data;
        EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_TEST_IO_CHANNEL);
 
        if (data->real)
-               return io_channel_flush(data->real);
-       return 0;
+               retval = io_channel_flush(data->real);
+       
+       printf("Test_io: flush() returned %s\n",
+                      retval ? error_message(retval) : "OK");
+       
+       return retval;
 }