Whamcloud - gitweb
ChangeLog, mkjournal.c:
authorTheodore Ts'o <tytso@mit.edu>
Thu, 18 Jan 2001 01:44:19 +0000 (01:44 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 18 Jan 2001 01:44:19 +0000 (01:44 +0000)
  mkjournal.c (ext2fs_add_journal_device): Fix bug where the device
   number of the filesystem (instead of the journal) was being dropped
   into s_journal_dev.
ChangeLog, dumpe2fs.c:
  dumpe2fs.c (print_journal_information): Use s_first_data_block to find
   the correct block to read the journal superblock.

lib/ext2fs/ChangeLog
lib/ext2fs/mkjournal.c
misc/ChangeLog
misc/dumpe2fs.c

index 0a0c498..886f73a 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-17  Theodore Ts'o  <tytso@valinux.com>
+
+       * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
+               device number of the filesystem (instead of the journal)
+               was being dropped into s_journal_dev.
+
 2001-01-15  Theodore Ts'o  <tytso@valinux.com>
 
        * initialize.c (ext2fs_initialize): Add support for initializing
index 73b4b02..52b7998 100644 (file)
@@ -255,7 +255,7 @@ errcode_t ext2fs_add_journal_device(ext2_filsys fs, ext2_filsys journal_dev)
        __u32           nr_users;
 
        /* Make sure the device exists and is a block device */
-       if (stat(fs->device_name, &st) < 0)
+       if (stat(journal_dev->device_name, &st) < 0)
                return errno;
        
        if (!S_ISBLK(st.st_mode))
index a36582f..64d04f1 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-17  Theodore Ts'o  <tytso@valinux.com>
+
+       * dumpe2fs.c (print_journal_information): Use s_first_data_block
+               to find the correct block to read the journal superblock.
+
 2001-01-15  Theodore Ts'o  <tytso@valinux.com>
 
        * tune2fs.c: Changed the external journal code so that it simply
index 53ef32a..03d35cb 100644 (file)
@@ -217,7 +217,7 @@ static void print_journal_information(ext2_filsys fs)
        journal_superblock_t    *jsb;
 
        /* Get the journal superblock */
-       if ((retval = io_channel_read_blk(fs->io, 1, -1024, buf))) {
+       if ((retval = io_channel_read_blk(fs->io, fs->super->s_first_data_block+1, -1024, buf))) {
                com_err(program_name, retval,
                        _("while reading journal superblock"));
                exit(1);