[Ocfs2-tools-devel] [PATCH 1/3] fsck.ocfs2: Move to JBD2 header and structures.
Joel Becker
Joel.Becker at oracle.com
Sun Sep 7 23:18:01 PDT 2008
On Mon, Sep 08, 2008 at 10:46:55AM +0800, Tao Ma wrote:
> len = got;
>> if (offset == 0) {
>> - dump_jbd_superblock(out, (journal_superblock_t *)buf);
>> + dump_jbd_superblock(out, jsb);
>> + memcpy(jsb_buf, buf, fs->fs_blocksize);
>> + ocfs2_swap_journal_superblock(jsb);
> you set jsb as jsb_buf above, but read the block in buf. So jsb will be
> used uninitialized? You may need to move "memcpy" above the
> dump_jbd_superblock if I read your code correctly.
Good catch! Artifact of the way I first wrote it. I wonder why
it worked....
Joel
--
"To fall in love is to create a religion that has a fallible god."
-Jorge Luis Borges
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list