All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: <calestyo@scientia.net>, <chris@colorremedies.com>, <dsterba@suse.cz>
Subject: [PATCH 8/9] btrfs-progs: fsck-tests: Add new test case for partly written prealloc extent
Date: Mon, 23 Jan 2017 17:13:58 +0800	[thread overview]
Message-ID: <20170123091359.21390-10-quwenruo@cn.fujitsu.com> (raw)
In-Reply-To: <20170123091359.21390-1-quwenruo@cn.fujitsu.com>

This is a bug found in lowmem mode, which reports false alert for partly
written prealloc extent.

Reported-by: Chris Murphy <chris@colorremedies.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 tests/fsck-tests/020-extent-ref-cases/test.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/fsck-tests/020-extent-ref-cases/test.sh b/tests/fsck-tests/020-extent-ref-cases/test.sh
index 5dc5e55d..91340671 100755
--- a/tests/fsck-tests/020-extent-ref-cases/test.sh
+++ b/tests/fsck-tests/020-extent-ref-cases/test.sh
@@ -18,6 +18,7 @@
 source $TOP/tests/common
 
 check_prereq btrfs
+check_global_prereq xfs_io
 
 for img in *.img *.raw.xz
 do
@@ -28,3 +29,17 @@ do
 	run_check $TOP/btrfs check "$image"
 	rm -f "$image"
 done
+
+# Extra test case for partly written prealloc extents.
+test_prealloc_written()
+{
+	run_check $SUDO_HELPER $TOP/mkfs.btrfs -f $TEST_DEV
+
+	run_check_mount_test_dev
+	xfs_io -f -c "falloc 0 128k" -c "syncfs" $TEST_MNT/tmpfile
+	xfs_io -c "pwrite 0 64k" $TEST_MNT/tmpfile
+
+	run_check_umount_test_dev
+
+	run_check $TOP/btrfs check $TEST_DEV
+}
-- 
2.11.0




  parent reply	other threads:[~2017-01-23  9:15 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  9:13 [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update Qu Wenruo
2017-01-23  9:13 ` [PATCH 1/9] btrfs-progs: lowmem check: Fix wrong block group check when search slot points to slot beyong leaf Qu Wenruo
2017-01-23  9:13 ` [PATCH 2/9] btrfs-progs: fsck-test: Add test image for lowmem mode block group false alert Qu Wenruo
2017-01-23  9:13 ` [PATCH 3/9] btrfs-progs: fsck: Output verbose error when fsck found a bug Qu Wenruo
2017-01-23  9:13 ` [PATCH 4/9] btrfs-progs: lowmem check: Fix false alert in checking data extent pointing to prealloc extent Qu Wenruo
2017-01-23  9:13 ` [PATCH 5/9] btrfs-progs: lowmem check: Fix extent item size false alert Qu Wenruo
2017-01-23  9:13 ` [PATCH 6/9] btrfs-progs: tests: Move fsck-tests/015 to fuzz tests Qu Wenruo
2017-01-23  9:13 ` [PATCH 7/9] btrfs-progs: fsck-tests: Make 013 compatible with lowmem mode Qu Wenruo
2017-01-23  9:13 ` [PATCH 8/8] btrfs-progs: fsck: Fix lowmem mode override to allow it skip repair work Qu Wenruo
2017-01-23  9:13 ` Qu Wenruo [this message]
2017-01-23  9:13 ` [PATCH 9/9] " Qu Wenruo
2017-01-24 16:54 ` [PATCH 0/9] Lowmem mode fsck fixes with fsck-tests framework update Christoph Anton Mitterer
2017-01-25  0:44   ` Qu Wenruo
2017-01-25  0:46     ` Christoph Anton Mitterer
2017-01-25  4:16       ` Qu Wenruo
2017-01-25  4:40         ` Christoph Anton Mitterer
2017-01-26  2:50         ` Christoph Anton Mitterer
2017-01-26  3:10           ` Qu Wenruo
2017-01-26  3:30             ` Christoph Anton Mitterer
2017-01-26 23:31             ` Christoph Anton Mitterer
2017-01-29  4:27               ` Qu Wenruo
2017-01-30  3:07                 ` Christoph Anton Mitterer
2017-02-01  1:06                   ` Qu Wenruo
2017-02-01 22:03                     ` Christoph Anton Mitterer
2017-02-02  0:25                       ` Qu Wenruo
2017-02-02  2:12                         ` Qu Wenruo
     [not found]                           ` <1486098502.7443.3.camel@lmu.de>
2017-02-03  6:20                             ` Qu Wenruo
2017-02-03 23:01                               ` Christoph Anton Mitterer
2017-02-06  1:25                                 ` Qu Wenruo

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=20170123091359.21390-10-quwenruo@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=calestyo@scientia.net \
    --cc=chris@colorremedies.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.