mirror of https://github.com/vitalif/e2fsprogs
ChangeLog, mkjournal.c:
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.bitmap-optimize
parent
be4244bafd
commit
d23042af75
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue