From: Curt Wohlgemuth <curtw@google.com>
To: Jim Meyering <jim@meyering.net>
Cc: ext <linux-ext4@vger.kernel.org>
Subject: Re: ext4: 1k-blocksize loopback corruption without removing backing file
Date: Thu, 21 Apr 2011 15:54:53 -0700 [thread overview]
Message-ID: <BANLkTik3TZB7eaPOAxADHZ=9k540WjrYHg@mail.gmail.com> (raw)
In-Reply-To: <87k4ensbn6.fsf@rho.meyering.net>
As Eric mentions, disabling mblk_io_submit makes this work.
I've reproduced this on my system, and I'm testing a fix for it which
I'll try to post tomorrow. It's limited to block size < page size
partitions.
Curt
On Thu, Apr 21, 2011 at 11:27 AM, Jim Meyering <jim@meyering.net> wrote:
> Much like this report,
>
> loopback-mounted ext4 sees hole-filling (on rawhide, but not F15)
> http://thread.gmane.org/gmane.comp.file-systems.ext4/24454
>
> but not requiring that one remove the backing file, this script shows the
> same sort of corruption with a loopback-ext4-in-loopback-ext4 file system:
> [Note these FS are small enough that they get a blocksize of 1024 by default.
> When I specify -b 2048 or 4096, the problem goes away. ]
>
> =============================================
> #!/bin/sh
> set -e
> dd if=/dev/zero of=blob bs=9k count=1000 >/dev/null 2>&1
> mkdir mnt
> mkfs -q -t ext4 -F blob
> mount -oloop blob mnt
>
> c1=$PWD
> cd mnt
>
> dd if=/dev/zero of=blob bs=4k count=1000 >/dev/null 2>&1
> mkdir m2
> mkfs -q -t ext4 -F blob
> mount -oloop blob m2
>
> c2=$PWD
> cd m2
>
> # Create a reference file. Just like the following one,
> # but with explicit NULs in place of holes.
> perl -e '$n=1024; for (1..71) { print "\0"x$n, chr($_)x$n };' \
> -e 'close *STDOUT or die "$!"' > ref
>
> # Seek 1KB, write 1KB of data, seek 1KB, write 1KB of data, etc....
> perl -e '$n = 1 * 1024; *F = *STDOUT;' \
> -e 'for (1..71) { sysseek (*F, $n, 1)' \
> -e '&& syswrite (*F, chr($_)x$n) or die "$!"}' > j1
>
> # filefrag -vs j1
>
> sync
> cmp -s ref j1 && fail=0 || fail=1
>
> cd /
> umount "$c2/m2" "$c1/mnt"
> rm -rf "$c1/blob" "$c1/mnt"
>
> exit $fail
> =============================================
>
> This shows that it fails most of the time for me in tmpfs on a rawhide
> guest (2.6.39-0.rc3.git2.0.fc16.x86_64) running on an F15 host. YMWV.
>
> $ while :; do ./ext4-bug; printf $?; done
> 111111110111111110111111011111111110101111111111
> [Exit 130 (INT)]
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-04-21 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 18:27 ext4: 1k-blocksize loopback corruption without removing backing file Jim Meyering
2011-04-21 22:54 ` Curt Wohlgemuth [this message]
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='BANLkTik3TZB7eaPOAxADHZ=9k540WjrYHg@mail.gmail.com' \
--to=curtw@google.com \
--cc=jim@meyering.net \
--cc=linux-ext4@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).