FS/XFS testing framework
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Dave Chinner <david@fromorbit.com>, fstests@vger.kernel.org
Subject: Re: [PATCH 4/5] generic: add mmap write vs truncate/remap test
Date: Fri, 19 Sep 2014 19:17:20 -0500	[thread overview]
Message-ID: <541CC790.7060306@sandeen.net> (raw)
In-Reply-To: <1410918113-23516-5-git-send-email-david@fromorbit.com>

On 9/16/14 8:41 PM, Dave Chinner wrote:
> This test exposed a problem with mapped writes to the tail page of a
> file in XFS and potentially ext4. Eric did all the hard work of
> taking the bug report and generating the reproducable test case
> on ext4, but I haven't been able to reproduce then problem on ext4.
> 
> Regardless, make it a generic test so that we can ensure that all
> filesystems handle the case correctly.

Oof, kermit on #xfs points out that even this is sufficient to show
a problem:

 mkfs.ext4 -b 1024 -F empty.img
  mount -o loop empty.img mnt
  sync

xfs_io -f -t \
-c            "pwrite               0          0x210  "      \
-c            "mmap      -rw        0          0xd08  "      \
-c            "mwrite    -S         0x50       0x210  0xaf8"  \
-c            "truncate                        0x1000"  \
mnt/testfile

  echo "==== Pre-Remount ==="
  hexdump -C mnt/testfile | tail -n 8
  umount mnt/
  mount -o loop empty.img mnt
  echo "==== Post-Remount =="
  hexdump -C mnt/testfile | tail -n 8



i'm not sure about the testcase - mmapping beyond EOF? - but seeing data
change after remount looks scary regardless.

==== Pre-Remount ===
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000210  50 50 50 50 50 50 50 50  50 50 50 50 50 50 50 50  |PPPPPPPPPPPPPPPP|
*
00000d00  50 50 50 50 50 50 50 50  00 00 00 00 00 00 00 00  |PPPPPPPP........|
00000d10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000
==== Post-Remount ==
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000210  50 50 50 50 50 50 50 50  50 50 50 50 50 50 50 50  |PPPPPPPPPPPPPPPP|
*
00000400  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000

-Eric


  parent reply	other threads:[~2014-09-20  0:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  1:41 [PATCH 0/5] xfstests: cleanups and new tests Dave Chinner
2014-09-17  1:41 ` [PATCH 1/5] generic: more tests should clean up TESTDIR on success Dave Chinner
2014-09-17  4:17   ` Eric Sandeen
2014-09-17  1:41 ` [PATCH 2/5] check: more tests that shouldn't check the scratch device Dave Chinner
2014-09-17  4:27   ` Eric Sandeen
2014-09-17  1:41 ` [PATCH 3/5] generic: add mmap write vs truncate test Dave Chinner
2014-09-19 19:38   ` Eric Sandeen
2014-09-17  1:41 ` [PATCH 4/5] generic: add mmap write vs truncate/remap test Dave Chinner
2014-09-17  4:32   ` Eric Sandeen
2014-09-17  4:51     ` Dave Chinner
2014-09-19 19:35   ` [PATCH 4.5/5] generic: tidy up " Eric Sandeen
2014-09-19 19:35   ` [PATCH 4/5] generic: add " Eric Sandeen
2014-09-20  0:17   ` Eric Sandeen [this message]
2014-09-20 23:32     ` Dave Chinner
2014-09-17  1:41 ` [PATCH 5/5] generic: add write vs fcollapse test Dave Chinner
2014-09-17 12:40   ` Brian Foster
2014-09-18  1:33     ` Dave Chinner

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=541CC790.7060306@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=david@fromorbit.com \
    --cc=fstests@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