Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806207/?format=api
{ "id": 806207, "url": "http://patchwork.ozlabs.org/api/patches/806207/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/1503830683-21455-1-git-send-email-amir73il@gmail.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1503830683-21455-1-git-send-email-amir73il@gmail.com>", "list_archive_url": null, "date": "2017-08-27T10:44:43", "name": "[RFC] fstest: regression test for ext4 crash consistency bug", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "2cf59053c033f05a51ffe0bd378f4c690a0734c9", "submitter": { "id": 4703, "url": "http://patchwork.ozlabs.org/api/people/4703/?format=api", "name": "Amir Goldstein", "email": "amir73il@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/1503830683-21455-1-git-send-email-amir73il@gmail.com/mbox/", "series": [ { "id": 7, "url": "http://patchwork.ozlabs.org/api/series/7/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=7", "date": "2017-08-27T10:44:43", "name": "[RFC] fstest: regression test for ext4 crash consistency bug", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/7/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/806207/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806207/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-ext4-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-ext4-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"CJXGs9t7\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgBNN46Bdz9sMN\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 27 Aug 2017 20:44:20 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751269AbdH0KoT (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSun, 27 Aug 2017 06:44:19 -0400", "from mail-wr0-f195.google.com ([209.85.128.195]:36794 \"EHLO\n\tmail-wr0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751189AbdH0KoS (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Sun, 27 Aug 2017 06:44:18 -0400", "by mail-wr0-f195.google.com with SMTP id p8so2455873wrf.3;\n\tSun, 27 Aug 2017 03:44:17 -0700 (PDT)", "from localhost.localdomain (bzq-166-168-31-246.red.bezeqint.net.\n\t[31.168.166.246]) by smtp.gmail.com with ESMTPSA id\n\tq203sm5587472wmg.43.2017.08.27.03.44.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 27 Aug 2017 03:44:15 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=01WUvqcyfhivhkiMkiUftAzBtONIH6mIETOJ3p7rUEI=;\n\tb=CJXGs9t7sRGC1MrtsXbpOIeNSIRq+pTL7fV0P9v97B690kGJkHdReFzPLL3V2mARUI\n\t9b7gNBeAGN3roZ4w4l1EYM+h+wXJ8QjdKvXEo0N45Cqt4o8/alxNxQuzqt0ws5EKkFPd\n\teluBeRMgZVZdjvC45C/wpQsJUIvUgsiuKHtvaggBQ25zSH9nupf0qkeTAl0xIHp5qjc+\n\t5NGyX7WJvuxeFbL3UEE483lYP09NGClkw4ycMeAcdQ73bnEE3x/OJum0B96lXJYtkdLr\n\tw1zd/Am4NLm1lcaLegS1cHRVZ3LtdNNcK0DZlEY9gBG6s2EzicYs4OsjMrQM734BS13t\n\ttwKA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=01WUvqcyfhivhkiMkiUftAzBtONIH6mIETOJ3p7rUEI=;\n\tb=HgY85Joz39KzN4lFs8Brz4Ys0Zs2t7K31nTnUP02DvySP0zREpI137smrpCiO1evZH\n\tisQNSGNPOvN4lE6mG+v7VDknaaFdbXSyT/P6tW8rn/uVMAimrEFzxsOaB0v8arg5S92k\n\tAOoNWC/LsjZDWI8SCSEElM9SVm3s90+KHLNjL+Ij4yxv21CYpuhaW/2MU/EsbTTJqnKQ\n\t3D6b7xqtwZ3gp0s6dLPKKzXs9NYSt3+KbzWJlGlynY7RjRu4hi7zAA8xC+j/jl7HI34D\n\tnTy6fj0vFEMdmNZt8H4WvVwDfnM2xy7p2vONbJaScawibe3ZyqVJtxV82Fkjb1d7sAOY\n\tSvYg==", "X-Gm-Message-State": "AHYfb5hmoMgVV93wjik6EElT5ACrnRb8he2ZuMI3aYAgj6NwauVXL/AQ\n\t7SCe8ts/5mPL/g==", "X-Received": "by 10.223.172.230 with SMTP id o93mr2142068wrc.273.1503830656418;\n\tSun, 27 Aug 2017 03:44:16 -0700 (PDT)", "From": "Amir Goldstein <amir73il@gmail.com>", "To": "Theodore Ts'o <tytso@mit.edu>", "Cc": "Eryu Guan <eguan@redhat.com>, Josef Bacik <jbacik@fb.com>,\n\tfstests@vger.kernel.org, linux-ext4@vger.kernel.org", "Subject": "[RFC][PATCH] fstest: regression test for ext4 crash consistency bug", "Date": "Sun, 27 Aug 2017 13:44:43 +0300", "Message-Id": "<1503830683-21455-1-git-send-email-amir73il@gmail.com>", "X-Mailer": "git-send-email 2.7.4", "Sender": "linux-ext4-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-ext4.vger.kernel.org>", "X-Mailing-List": "linux-ext4@vger.kernel.org" }, "content": "This test is motivated by a bug found in ext4 during random crash\nconsistency tests.\n\nThis test uses device mapper flakey target to demonstrate the bug\nfound using device mapper log-writes target.\n\nSigned-off-by: Amir Goldstein <amir73il@gmail.com>\n---\n\nTed,\n\nWhile working on crash consistency xfstests [1], I stubmled on what\nappeared to be an ext4 crash consistency bug.\n\nThe tests I used rely on the log-writes dm target code written\nby Josef Bacik, which had little exposure to the wide community\nas far as I know. I wanted to prove to myself that the found\ninconsistency was not due to a test bug, so I bisected the failed\ntest to the minimal operations that trigger the failure and wrote\na small independent test to reproduce the issue using dm flakey target.\n\nThe following fsck error is reliably reproduced by replaying some fsx ops\non overlapping file regions, then emulating a crash, followed by mount,\numount and fsck -nf:\n\n ./ltp/fsx -d --replay-ops /tmp/8995.fsxops /mnt/scratch/testfile\n 1 write 0x137dd thru 0x21445 (0xdc69 bytes)\n 2 falloc from 0xb531 to 0x16ade (0xb5ad bytes)\n 3 collapse from 0x1c000 to 0x20000, (0x4000 bytes)\n 4 write 0x3e5ec thru 0x3ffff (0x1a14 bytes)\n 5 zero from 0x20fac to 0x27d48, (0x6d9c bytes)\n 6 mapwrite 0x216ad thru 0x23dfb (0x274f bytes)\n All 7 operations completed A-OK!\n _check_generic_filesystem: filesystem on /dev/mapper/ssd-scratch is inconsistent\n *** fsck.ext4 output ***\n fsck from util-linux 2.27.1\n e2fsck 1.42.13 (17-May-2015)\n Pass 1: Checking inodes, blocks, and sizes\n Inode 12, end of extent exceeds allowed value\n (logical block 33, physical block 33441, len 7)\n Clear? no\n Inode 12, i_blocks is 184, should be 128. Fix? no\n\nNote that the inconsistency is \"applied\" by journal replay during mount.\nfsck -nf before mount does not report any errors.\n\nI did not intend for this test to be merged as is, but rather to be used\nby ext4 developers to analyze the problem and then re-write the test with\nmore comments and less arbitrary offset/length values.\n\nP.S.: crash consistency tests also reliably reproduce a btrfs fsck error.\n a detailed report with I/O recording was sent to Josef.\nP.S.2: crash consistency tests report file data checksum errors on xfs\n after fsync+crash, but I still need to prove the reliability of\n these reports.\n \n[1] https://github.com/amir73il/xfstests/commits/dm-log-writes\n\n tests/generic/501 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++\n tests/generic/501.out | 2 ++\n tests/generic/group | 1 +\n 3 files changed, 83 insertions(+)\n create mode 100755 tests/generic/501\n create mode 100644 tests/generic/501.out", "diff": "diff --git a/tests/generic/501 b/tests/generic/501\nnew file mode 100755\nindex 0000000..ccb513d\n--- /dev/null\n+++ b/tests/generic/501\n@@ -0,0 +1,80 @@\n+#! /bin/bash\n+# FS QA Test No. 501\n+#\n+# This test is motivated by a bug found in ext4 during random crash\n+# consistency tests.\n+#\n+#-----------------------------------------------------------------------\n+# Copyright (C) 2017 CTERA Networks. All Rights Reserved.\n+# Author: Amir Goldstein <amir73il@gmail.com>\n+#\n+# This program is free software; you can redistribute it and/or\n+# modify it under the terms of the GNU General Public License as\n+# published by the Free Software Foundation.\n+#\n+# This program is distributed in the hope that it would be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with this program; if not, write the Free Software Foundation,\n+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n+#-----------------------------------------------------------------------\n+#\n+\n+seq=`basename $0`\n+seqres=$RESULT_DIR/$seq\n+echo \"QA output created by $seq\"\n+\n+here=`pwd`\n+tmp=/tmp/$$\n+status=1\t# failure is the default!\n+\n+_cleanup()\n+{\n+\t_cleanup_flakey\n+\tcd /\n+\trm -f $tmp.*\n+}\n+trap \"_cleanup; exit \\$status\" 0 1 2 3 15\n+\n+# get standard environment, filters and checks\n+. ./common/rc\n+. ./common/filter\n+. ./common/dmflakey\n+\n+# real QA test starts here\n+_supported_fs generic\n+_supported_os Linux\n+_require_scratch\n+_require_dm_target flakey\n+_require_metadata_journaling $SCRATCH_DEV\n+\n+rm -f $seqres.full\n+\n+_scratch_mkfs >> $seqres.full 2>&1\n+\n+_init_flakey\n+_mount_flakey\n+\n+fsxops=$tmp.fsxops\n+cat <<EOF > $fsxops\n+write 0x137dd 0xdc69 0x0\n+fallocate 0xb531 0xb5ad 0x21446\n+collapse_range 0x1c000 0x4000 0x21446\n+write 0x3e5ec 0x1a14 0x21446\n+zero_range 0x20fac 0x6d9c 0x40000 keep_size\n+mapwrite 0x216ad 0x274f 0x40000\n+EOF\n+run_check $here/ltp/fsx -d --replay-ops $fsxops $SCRATCH_MNT/testfile\n+\n+_flakey_drop_and_remount\n+_unmount_flakey\n+_cleanup_flakey\n+_check_scratch_fs\n+\n+echo \"Silence is golden\"\n+\n+status=0\n+exit\ndiff --git a/tests/generic/501.out b/tests/generic/501.out\nnew file mode 100644\nindex 0000000..00133b6\n--- /dev/null\n+++ b/tests/generic/501.out\n@@ -0,0 +1,2 @@\n+QA output created by 501\n+Silence is golden\ndiff --git a/tests/generic/group b/tests/generic/group\nindex 2396b72..bb870f2 100644\n--- a/tests/generic/group\n+++ b/tests/generic/group\n@@ -454,3 +454,4 @@\n 449 auto quick acl enospc\n 450 auto quick rw\n 500 auto log replay\n+501 auto quick metadata\n", "prefixes": [ "RFC" ] }