From: Eryu Guan <eguan@redhat.com>
To: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: ext4: regression test for fsync transaction ids initialization
Date: Tue, 14 Jun 2016 12:21:03 +0800 [thread overview]
Message-ID: <20160614042103.GM5140@eguan.usersys.redhat.com> (raw)
In-Reply-To: <575F6DDC.9050000@cn.fujitsu.com>
On Tue, Jun 14, 2016 at 10:37:16AM +0800, Wang Xiaoguang wrote:
> Hello,
>
> Thanks for reviewing.
>
> On 06/08/2016 04:55 PM, Eryu Guan wrote:
[snip]
> >>+
> >>+loop_dev1=`_create_loop_device $fs_img1`
> >>+loop_dev2=`_create_loop_device $fs_img2`
> >You're using two loop devices and one is used as external journal
> >device, I think test on SCRATCH_DEV should be fine, e.g.
> >
> >_scratch_mkfs_sized a 8M ext4 filesystem, then use a script to find the
> >journal superblock on disk, then modify the journal.s_sequence according
> >to the location of journal superblock and the offset of s_sequence to
> >it. I use the following script to do all this:
> >
> >#/bin/bash
> >dev=$1
> >mkfs -t ext4 $dev 8M
> >blocksize=`dumpe2fs -h $dev 2>/dev/null | grep "Block size" | awk '{print $3}'`
> >offset=0
> >found=0
> ># this is the jbd2 journal superblock magic number on disk, in big endian
> >magic="c0 3b 39 98"
> >
> ># 8M in bytes
> >filesize=$((8 * 1024 * 1024))
> >while [ $offset -lt $filesize ]; do
> > if | grep -i "$magic";then
> > echo "Found journal: $offset"
> > found=1
> > break
> > fi
> > offset=$((offset + blocksize))
> >done
> Thanks for your script, but I wonder whether there will be some other
> metadata which would have the same magic number "c0 3b 39 98", such
> as ext4 super_block or block_group_description.
I don't think so. If they have the same magic number, it looks like a
bug to me.
Thanks,
Eryu
next prev parent reply other threads:[~2016-06-14 4:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 3:02 [PATCH] fstests: ext4: regression test for fsync transaction ids initialization Wang Xiaoguang
2016-06-08 8:55 ` Eryu Guan
2016-06-14 2:37 ` Wang Xiaoguang
2016-06-14 4:21 ` Eryu Guan [this message]
2016-06-15 6:37 ` [PATCH v2] " Wang Xiaoguang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160614042103.GM5140@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=wangxg.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox