]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, mkjournal.c:
authorTheodore Ts'o <tytso@mit.edu>
Thu, 8 Feb 2001 03:37:16 +0000 (03:37 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 8 Feb 2001 03:37:16 +0000 (03:37 +0000)
  mkjournal.c (ext2fs_create_journal_superblock): Fix the setting of
   s_first for external devices to always be 1, since jsb->s_first is
   always relative to the start of the journal superblock.  Use htonl(1)
   when setting s_nr_users.

lib/ext2fs/ChangeLog
lib/ext2fs/mkjournal.c

index 886f73ab3de6bd7fefaa83941c99bb9889020f45..c22cec83d36c6180e2f18aa823d0775bf2340a2d 100644 (file)
@@ -1,3 +1,10 @@
+2001-02-07  Theodore Tso  <tytso@valinux.com>
+
+       * mkjournal.c (ext2fs_create_journal_superblock): Fix the setting
+               of s_first for external devices to always be 1, since
+               jsb->s_first is always relative to the start of the
+               journal superblock.  Use htonl(1) when setting s_nr_users.
+
 2001-01-17  Theodore Ts'o  <tytso@valinux.com>
 
        * mkjournal.c (ext2fs_add_journal_device): Fix bug where the
index 52b7998d4ac8d06156ab7b6ea5b46f1100842235..62a4575471e5d06159f46b97d62ecdaf1f1cdc1b 100644 (file)
@@ -62,18 +62,18 @@ errcode_t ext2fs_create_journal_superblock(ext2_filsys fs,
                jsb->s_header.h_blocktype = htonl(JFS_SUPERBLOCK_V2);
        jsb->s_blocksize = htonl(fs->blocksize);
        jsb->s_maxlen = htonl(size);
+       jsb->s_nr_users = htonl(1);
        jsb->s_first = htonl(1);
        jsb->s_sequence = htonl(1);
        memcpy(jsb->s_uuid, fs->super->s_uuid, sizeof(fs->super->s_uuid));
-       jsb->s_nr_users = 1;
        /*
-        * Now for the special settings if we're creating an external
-        * journal device
+        * If we're creating an external journal device, we need to
+        * adjust these fields.
         */
        if (fs->super->s_feature_incompat &
            EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) {
                jsb->s_nr_users = 0;
-               jsb->s_first = htonl(fs->super->s_first_data_block+2);
+               jsb->s_first = htonl(1);
        }
 
        *ret_jsb = (char *) jsb;