From patchwork Wed Feb 5 00:01:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11365537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD8FD92A for ; Wed, 5 Feb 2020 00:01:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8BF3D217BA for ; Wed, 5 Feb 2020 00:01:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YNchd+7u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727673AbgBEABx (ORCPT ); Tue, 4 Feb 2020 19:01:53 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:42398 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727534AbgBEABw (ORCPT ); Tue, 4 Feb 2020 19:01:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NwqQP086013; Wed, 5 Feb 2020 00:01:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=yoHjzEoLeU4OqrWJ4cCJO0a5dvQ9kLQmXeRaDfXK/vo=; b=YNchd+7ui8SReqXT0AuG+GrzwXkdzfufU5luZy5uCG6scDHrzWQBopEoa3DMylsIeGs/ bpLdo2SsZ9dDgjPTpZv+tJuL++P3qMzU5RRg6OXFf9bIQfUSRsMhx1vA6MabwI3cz3ww cTre5PoHeZD5zCtrvG2+NnJi/uzGhYINe/XWRb5ljq1fDQ4/M0LxJFj2jEdxg0aoir+F nMPTWx68eKatRlYbUE21UsAhVxCcYnMAtnMhLNV1AgwOkO1kJmTv6cQNER34h/KyX+k7 60+2FlYEBBu+rX1L0/FxtHowRf1QGbd6a3PTM7IKkaCdtKia1fxM0hv5WneTa08CQ1OR Sw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2xyhkf88a1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:01:50 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NwrJ1059200; Wed, 5 Feb 2020 00:01:50 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2xyhmq3gmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:01:50 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01501nwr022436; Wed, 5 Feb 2020 00:01:49 GMT Received: from localhost (/10.159.250.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2020 16:01:49 -0800 Subject: [PATCH 1/5] xfs/449: filter out "Discarding..." from output From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 04 Feb 2020 16:01:48 -0800 Message-ID: <158086090849.1989378.625300470019425718.stgit@magnolia> In-Reply-To: <158086090225.1989378.6869317139530865842.stgit@magnolia> References: <158086090225.1989378.6869317139530865842.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong xfsprogs 5.4 prints "Discarding..." if the disk supports the trim command. Filter this out of the output because xfs_info and friends won't print that out. Signed-off-by: Darrick J. Wong --- tests/xfs/449 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/449 b/tests/xfs/449 index 7aae1545..83c3c493 100755 --- a/tests/xfs/449 +++ b/tests/xfs/449 @@ -39,7 +39,7 @@ _require_scratch_nocheck _require_xfs_spaceman_command "info" _require_command "$XFS_GROWFS_PROG" xfs_growfs -_scratch_mkfs > $tmp.mkfs +_scratch_mkfs | sed -e '/Discarding/d' > $tmp.mkfs echo MKFS >> $seqres.full cat $tmp.mkfs >> $seqres.full From patchwork Wed Feb 5 00:01:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11365541 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2ADC217E0 for ; Wed, 5 Feb 2020 00:02:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0997C218AC for ; Wed, 5 Feb 2020 00:02:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="M21JkgmE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727534AbgBEACA (ORCPT ); Tue, 4 Feb 2020 19:02:00 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:41746 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbgBEACA (ORCPT ); Tue, 4 Feb 2020 19:02:00 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014Nx4Lm096861; Wed, 5 Feb 2020 00:01:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=pbbDtoYXRJuh38ts3Orjrn9Kiqx/Skv8mtJchaS0ThE=; b=M21JkgmEycNlhHahna6WsCWEk1wRyyp+DysyUiSEBFzlxiqxStu4IsY9uH1JpcWT63h6 G2zAAHsXPX6Wo3wLF+3mVfWC0zE1sSwOzeSJWUfgPFFo9GaeZQavtxKuzvuNe+nXeJHi YzCge0BCOQvbW6v9ISwRHZfbEhWGy4ESjLYEPbPtXB0VkL4fZD1KGdhvjrJPY7xrDv1g 4nZY8CohlxpdjTPWnyoIusRQOfNyT5J6iDSErWdXf3HoYuS7oAH/lpf+5CBzLp3/IJJI YYFk5fn6+88C5Uje69O3obxgkZUHy/VWomjOqrgAxyZdbLQJaNhjuSw/hHxKkaq4gHWO SA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2xyhkfg87q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:01:57 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NwNHj016139; Wed, 5 Feb 2020 00:01:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2xyhmvhwqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:01:57 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01501trW021792; Wed, 5 Feb 2020 00:01:56 GMT Received: from localhost (/10.159.250.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2020 16:01:55 -0800 Subject: [PATCH 2/5] xfs/020: fix truncation test From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 04 Feb 2020 16:01:54 -0800 Message-ID: <158086091464.1989378.4282506455041445127.stgit@magnolia> In-Reply-To: <158086090225.1989378.6869317139530865842.stgit@magnolia> References: <158086090225.1989378.6869317139530865842.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=910 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=960 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong If we can't create the 60T sparse image for testing repair on a large fs (such as when running on 32-bit), don't bother running the rest of the test. This requires the actual truncate(1) command, because it returns nonzero if the system call fails. Signed-off-by: Darrick J. Wong --- tests/xfs/020 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/xfs/020 b/tests/xfs/020 index 66433b0a..4f617379 100755 --- a/tests/xfs/020 +++ b/tests/xfs/020 @@ -42,7 +42,9 @@ echo "Silence is golden" fsfile=$TEST_DIR/fsfile.$seq rm -f $fsfile -$XFS_IO_PROG -f -c "truncate 60t" $fsfile || _notrun "Cannot create 60T sparse file for test." +# The actual truncate command is required here (and not xfs_io) because it +# returns nonzero if the operation fails. +truncate -s 60t $fsfile || _notrun "Cannot create 60T sparse file for test." rm -f $fsfile $MKFS_PROG -t xfs -d size=60t,file,name=$fsfile >/dev/null From patchwork Wed Feb 5 00:02:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11365545 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E32C17E0 for ; Wed, 5 Feb 2020 00:02:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CBB921744 for ; Wed, 5 Feb 2020 00:02:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="m84Mg4DB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727537AbgBEACF (ORCPT ); Tue, 4 Feb 2020 19:02:05 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:42568 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbgBEACF (ORCPT ); Tue, 4 Feb 2020 19:02:05 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014Nw1DU085079; Wed, 5 Feb 2020 00:02:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=ADGovvgAva/Nd4VUaQIeGfE29ESgFUENNm2c5R+ubqQ=; b=m84Mg4DBO68SLbyqDyLkUT6dLxxDBk4nySRbiQjvScg7ym1JAQrEvWkb4q/eY55m3GHt 2FvdWrNUEPZvlfzq/b6MYX3iXd2tWAsxwHMNVAgyC90A4rSuJMB7o2cWdA8S6SPFboWu 3Q5UhXOdBTtx9eqWI3Vdnif3Ihh8a86MkNeBk10+uxLJE9e7vSgjpc6EI1pf9IhSbTlf c9Wl6rcVB6XokhwbWtWX8yTTepMgBSBsvAwuZKffh/9hwG7BTfOnpq9Knb6kawC/Q6RB eH+0RihYQ29LP2C6EcQHFro2BzaQb7hmSbK2oaX8lVHcZefYFcM5rm2Lnz5Q/ugB2INs Sw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2xyhkf88ax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:03 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NxG0H036699; Wed, 5 Feb 2020 00:02:02 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2xyhmqwar5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:02 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0150223s021842; Wed, 5 Feb 2020 00:02:02 GMT Received: from localhost (/10.159.250.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2020 16:02:01 -0800 Subject: [PATCH 3/5] generic/402: skip test if xfs_io can't parse the date value From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 04 Feb 2020 16:02:00 -0800 Message-ID: <158086092087.1989378.18220785148122680849.stgit@magnolia> In-Reply-To: <158086090225.1989378.6869317139530865842.stgit@magnolia> References: <158086090225.1989378.6869317139530865842.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong If xfs_io's utimes command cannot interpret the arguments that are given to it, it will print out "Bad value for [am]time". Detect when this happens and drop the file out of the test entirely. This is particularly noticeable on 32-bit platforms and the largest timestamp seconds supported by the filesystem is INT_MAX. In this case, the maximum value we can cram into tv_sec is INT_MAX, and there is no way to actually test setting a timestamp of INT_MAX + 1 to test the clamping. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein --- tests/generic/402 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/generic/402 b/tests/generic/402 index 2a34d127..32988866 100755 --- a/tests/generic/402 +++ b/tests/generic/402 @@ -63,10 +63,19 @@ run_test_individual() # check if the time needs update if [ $update_time -eq 1 ]; then echo "Updating file: $file to timestamp $timestamp" >> $seqres.full - $XFS_IO_PROG -f -c "utimes $timestamp 0 $timestamp 0" $file + $XFS_IO_PROG -f -c "utimes $timestamp 0 $timestamp 0" $file >> $tmp.utimes 2>&1 + cat $tmp.utimes >> $seqres.full + if grep -q "Bad value" "$tmp.utimes"; then + rm -f $file $tmp.utimes + return + fi + cat $tmp.utimes + rm $tmp.utimes if [ $? -ne 0 ]; then echo "Failed to update times on $file" | tee -a $seqres.full fi + else + test -f $file || return fi tsclamp=$((timestamptsmax?tsmax:timestamp)) From patchwork Wed Feb 5 00:02:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11365549 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5ED0114B4 for ; Wed, 5 Feb 2020 00:02:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33FDD21744 for ; Wed, 5 Feb 2020 00:02:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="b2Q7l73k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbgBEACL (ORCPT ); Tue, 4 Feb 2020 19:02:11 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:58626 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbgBEACL (ORCPT ); Tue, 4 Feb 2020 19:02:11 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NweL2076146; Wed, 5 Feb 2020 00:02:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=pFAsHql0ujcNiWWxUCfZWYtIKsSA12QYWWheoFfn0W4=; b=b2Q7l73kG8Yb6KuCFvRLLpfvfhJdfuNv9JnNhni9IXhdbESMRrUiBnIJiwJ7zfPyfvKI lp4x2YM6bLQ4S/1r/8lyHdd5fgGinCBK8E+pK/38MVVgCfaPvdWxgRCYjiFDpQ6FlHGO uNlnarF0RT6zAREeUMAXByL9MofplBMXMW1VW9M8Qm8VAg880j6PWZxBj91cJLo9vTDS 1raThpolby2srdN7KYWTUKIhlFnH3RDmSnq1umYt3lLA8DtwDrpXQxLN741ezVR3ZU49 6Q/knwFLVgiBviSJhUEAOvd6NjN3SCvDrUdyH/jzl2PiQtTbKAhMZvPYzJy0AItwvB6r Mg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2xyhkfg8c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:09 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NxELu036594; Wed, 5 Feb 2020 00:02:09 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2xyhmqwaww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:08 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 015028A9021866; Wed, 5 Feb 2020 00:02:08 GMT Received: from localhost (/10.159.250.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2020 16:02:07 -0800 Subject: [PATCH 4/5] xfs/117: fix inode corruption loop From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 04 Feb 2020 16:02:07 -0800 Message-ID: <158086092701.1989378.15455195869104309401.stgit@magnolia> In-Reply-To: <158086090225.1989378.6869317139530865842.stgit@magnolia> References: <158086090225.1989378.6869317139530865842.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=996 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong `seq X Y` will print all numbers between X and Y, including Y. Since inode chunks contain inodes numbered from X to X+63, we need to set the loop variables correctly. Signed-off-by: Darrick J. Wong --- tests/xfs/117 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/117 b/tests/xfs/117 index 0a7831d5..e3249623 100755 --- a/tests/xfs/117 +++ b/tests/xfs/117 @@ -70,7 +70,7 @@ echo "+ check fs" _scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail" echo "+ corrupt image" -seq "${inode}" "$((inode + 64))" | while read ino; do +seq "${inode}" "$((inode + 63))" | while read ino; do _scratch_xfs_db -x -c "inode ${ino}" -c "stack" -c "blocktrash -x 32 -y $((blksz * 8)) -z ${FUZZ_ARGS}" >> $seqres.full 2>&1 done From patchwork Wed Feb 5 00:02:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11365553 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5276214B4 for ; Wed, 5 Feb 2020 00:02:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31252214AF for ; Wed, 5 Feb 2020 00:02:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="e1S8X6DY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727698AbgBEACS (ORCPT ); Tue, 4 Feb 2020 19:02:18 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:58706 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbgBEACS (ORCPT ); Tue, 4 Feb 2020 19:02:18 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NwwSa076211; Wed, 5 Feb 2020 00:02:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=aUaQI5DsgBUHSzEcazJpEHTPn5drJJunop3nh7Czhyo=; b=e1S8X6DY8BFfpl4HnGFnABqmU4IRASn5I3TSUIkdLrwXgblvNVdIvBmQEJHe+VzdpxqS GAUEX/PaggmvPOe4yUwxn6aNlKKUmtPrgpq+uBrkhJjP+dTIORNp+bTb7UT4S9EtLXk/ tb69QmYBJbZ5z+0IL8XzCiLRvQtIHQ2PVeioH0luft/sLMXjA28Wl2ijHAtfbsMLS8V4 8ZNaXBAlrtkYlBxCXzX9j++fVCATUB5vCrCwf3WFoWfQ6Gnjn7fXlViOxxBK46r7g0Hj nLIlwSMgm/9ugFOmgPbhBZXPvypr0RXzk9t/R6Y8OeKo2i79USaeeX8lfb8azjIcuHLy gA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2xyhkfg8ch-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:16 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 014NwrYj059198; Wed, 5 Feb 2020 00:02:15 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2xyhmq3hyu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 00:02:15 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01502E8a022711; Wed, 5 Feb 2020 00:02:14 GMT Received: from localhost (/10.159.250.52) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Feb 2020 16:02:14 -0800 Subject: [PATCH 5/5] fsx: support 64-bit operation counts From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 04 Feb 2020 16:02:13 -0800 Message-ID: <158086093318.1989378.1186256375919220733.stgit@magnolia> In-Reply-To: <158086090225.1989378.6869317139530865842.stgit@magnolia> References: <158086090225.1989378.6869317139530865842.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2001150001 definitions=main-2002040164 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Support 64-bit operation counts so that we can run long-soak tests for more than 2 billion fsxops. Signed-off-by: Darrick J. Wong --- ltp/fsx.c | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/ltp/fsx.c b/ltp/fsx.c index 120f4374..02403720 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -135,12 +135,12 @@ int fd; /* fd for our test file */ blksize_t block_size = 0; off_t file_size = 0; off_t biggest = 0; -unsigned long testcalls = 0; /* calls to function "test" */ +long long testcalls = 0; /* calls to function "test" */ -unsigned long simulatedopcount = 0; /* -b flag */ +long long simulatedopcount = 0; /* -b flag */ int closeprob = 0; /* -c flag */ int debug = 0; /* -d flag */ -unsigned long debugstart = 0; /* -D flag */ +long long debugstart = 0; /* -D flag */ char filldata = 0; /* -g flag */ int flush = 0; /* -f flag */ int do_fsync = 0; /* -y flag */ @@ -148,7 +148,7 @@ unsigned long maxfilelen = 256 * 1024; /* -l flag */ int sizechecks = 1; /* -n flag disables them */ int maxoplen = 64 * 1024; /* -o flag */ int quiet = 0; /* -q flag */ -unsigned long progressinterval = 0; /* -p flag */ +long long progressinterval = 0; /* -p flag */ int readbdy = 1; /* -r flag */ int style = 0; /* -s flag */ int prealloc = 0; /* -x flag */ @@ -157,7 +157,7 @@ int writebdy = 1; /* -w flag */ long monitorstart = -1; /* -m flag */ long monitorend = -1; /* -m flag */ int lite = 0; /* -L flag */ -long numops = -1; /* -N flag */ +long long numops = -1; /* -N flag */ int randomoplen = 1; /* -O flag disables it */ int seed = 1; /* -S flag */ int mapped_writes = 1; /* -W flag disables */ @@ -788,7 +788,7 @@ doread(unsigned offset, unsigned size) (monitorstart == -1 || (offset + size > monitorstart && (monitorend == -1 || offset <= monitorend)))))) - prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + prt("%lld read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); ret = lseek(fd, (off_t)offset, SEEK_SET); if (ret == (off_t)-1) { @@ -925,7 +925,7 @@ domapread(unsigned offset, unsigned size) (monitorstart == -1 || (offset + size > monitorstart && (monitorend == -1 || offset <= monitorend)))))) - prt("%lu mapread\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + prt("%lld mapread\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); pg_offset = offset & PAGE_MASK; @@ -1003,7 +1003,7 @@ dowrite(unsigned offset, unsigned size) (monitorstart == -1 || (offset + size > monitorstart && (monitorend == -1 || offset <= monitorend)))))) - prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + prt("%lld write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); ret = lseek(fd, (off_t)offset, SEEK_SET); if (ret == (off_t)-1) { @@ -1070,7 +1070,7 @@ domapwrite(unsigned offset, unsigned size) (monitorstart == -1 || (offset + size > monitorstart && (monitorend == -1 || offset <= monitorend)))))) - prt("%lu mapwrite\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + prt("%lld mapwrite\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, offset, offset + size - 1, size); if (file_size > cur_filesize) { @@ -1123,11 +1123,12 @@ dotruncate(unsigned size) if (testcalls <= simulatedopcount) return; - + if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || size <= monitorend))) - prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size); + prt("%lld trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, + size); if (ftruncate(fd, (off_t)size) == -1) { prt("ftruncate1: %x\n", size); prterr("dotruncate: ftruncate"); @@ -1168,7 +1169,7 @@ do_punch_hole(unsigned offset, unsigned length) if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || end_offset <= monitorend))) { - prt("%lu punch\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, + prt("%lld punch\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, offset, offset+length, length); } if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) { @@ -1230,7 +1231,7 @@ do_zero_range(unsigned offset, unsigned length, int keep_size) if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || end_offset <= monitorend))) { - prt("%lu zero\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, + prt("%lld zero\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, offset, offset+length, length); } if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) { @@ -1280,8 +1281,8 @@ do_collapse_range(unsigned offset, unsigned length) if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || end_offset <= monitorend))) { - prt("%lu collapse\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, - offset, offset+length, length); + prt("%lld collapse\tfrom 0x%x to 0x%x, (0x%x bytes)\n", + testcalls, offset, offset+length, length); } if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) { prt("collapse range: 0x%x to 0x%x\n", offset, offset + length); @@ -1332,7 +1333,7 @@ do_insert_range(unsigned offset, unsigned length) if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || end_offset <= monitorend))) { - prt("%lu insert\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, + prt("%lld insert\tfrom 0x%x to 0x%x, (0x%x bytes)\n", testcalls, offset, offset+length, length); } if (fallocate(fd, mode, (loff_t)offset, (loff_t)length) == -1) { @@ -1724,7 +1725,7 @@ do_preallocate(unsigned offset, unsigned length, int keep_size) if ((progressinterval && testcalls % progressinterval == 0) || (debug && (monitorstart == -1 || monitorend == -1 || end_offset <= monitorend))) - prt("%lu falloc\tfrom 0x%x to 0x%x (0x%x bytes)\n", testcalls, + prt("%lld falloc\tfrom 0x%x to 0x%x (0x%x bytes)\n", testcalls, offset, offset + length, length); if (fallocate(fd, keep_size ? FALLOC_FL_KEEP_SIZE : 0, (loff_t)offset, (loff_t)length) == -1) { prt("fallocate: 0x%x to 0x%x\n", offset, offset + length); @@ -1773,7 +1774,7 @@ docloseopen(void) return; if (debug) - prt("%lu close/open\n", testcalls); + prt("%lld close/open\n", testcalls); if (close(fd)) { prterr("docloseopen: close"); report_failure(180); @@ -1797,7 +1798,7 @@ dofsync(void) if (testcalls <= simulatedopcount) return; if (debug) - prt("%lu fsync\n", testcalls); + prt("%lld fsync\n", testcalls); log4(OP_FSYNC, 0, 0, 0); ret = fsync(fd); if (ret < 0) { @@ -1834,7 +1835,7 @@ cleanup(int sig) { if (sig) prt("signal %d\n", sig); - prt("testcalls = %lu\n", testcalls); + prt("testcalls = %lld\n", testcalls); exit(sig); } @@ -1942,7 +1943,7 @@ test(void) debug = 1; if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0) - prt("%lu...\n", testcalls); + prt("%lld...\n", testcalls); if (replayopsf) { struct log_entry log_entry; @@ -2293,13 +2294,13 @@ usage(void) } -int +long long getnum(char *s, char **e) { - int ret; + long long ret; *e = (char *) 0; - ret = strtol(s, e, 0); + ret = strtoll(s, e, 0); if (*e) switch (**e) { case 'b': @@ -2487,7 +2488,8 @@ main(int argc, char **argv) case 'b': simulatedopcount = getnum(optarg, &endp); if (!quiet) - prt("Will begin at operation %ld\n", simulatedopcount); + prt("Will begin at operation %lld\n", + simulatedopcount); if (simulatedopcount == 0) usage(); simulatedopcount -= 1; @@ -2854,7 +2856,7 @@ main(int argc, char **argv) prterr("close"); report_failure(99); } - prt("All %lu operations completed A-OK!\n", testcalls); + prt("All %lld operations completed A-OK!\n", testcalls); if (recordops) logdump();