Skip to contentSkip to conversation

libext2fs: initialize large inodes for journal & resize

PATCH In review Eric Sandeen 2 participants 2 messages Jun 17, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libext2fs: initialize large inodes for journal & resize

I noticed that neither the journal nor resize inodes have i_extra_isize set post-mkfs; while this isn't likely to be a big problem, I think the below patch tidies it up.

---

lib/ext2fs/mkjournal.c +1 -1
index f5a9dba..412f50b 100644
@@ -354,7 +354,7 @@ static errcode_t write_journal_inode(ext2_filsys fs, ext2_ino_t journal_ino,
 	inode.i_links_count = 1;
 	inode.i_mode = LINUX_S_IFREG | 0600;
 
-	if ((retval = ext2fs_write_inode(fs, journal_ino, &inode)))
+	if ((retval = ext2fs_write_new_inode(fs, journal_ino, &inode)))
 		goto errout;
 	retval = 0;
 
lib/ext2fs/res_gdt.c +1 -1
index dda7c2b..62b5988 100644
@@ -208,7 +208,7 @@ out_inode:
 #endif
 	if (inode_dirty) {
 		inode.i_atime = inode.i_mtime = fs->now ? fs->now : time(0);
-		retval2 = ext2fs_write_inode(fs, EXT2_RESIZE_INO, &inode);
+		retval2 = ext2fs_write_new_inode(fs, EXT2_RESIZE_INO, &inode);
 		if (!retval)
 			retval = retval2;
 	}
#1 lore raw
Quoted 6 lines · Eric Sandeen

I noticed that neither the journal nor resize inodes have i_extra_isize set post-mkfs; while this isn't likely to be a big problem, I think the below patch tidies it up.

Thanks, I've taken this patch into e2fsprogs's maint branch.

- Ted