From patchwork Tue Jan 7 16:55:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 11321407 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 1E3051580 for ; Tue, 7 Jan 2020 16:55:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7037206DB for ; Tue, 7 Jan 2020 16:55:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=toxicpanda-com.20150623.gappssmtp.com header.i=@toxicpanda-com.20150623.gappssmtp.com header.b="VLymX8Gc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728706AbgAGQzy (ORCPT ); Tue, 7 Jan 2020 11:55:54 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:40838 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728611AbgAGQzx (ORCPT ); Tue, 7 Jan 2020 11:55:53 -0500 Received: by mail-qv1-f65.google.com with SMTP id dp13so136558qvb.7 for ; Tue, 07 Jan 2020 08:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HNzBGeTdlhZhaE4b4BtqTOtXUVMvBzVOP9h12TTMqdw=; b=VLymX8GcHpUgJAsTeNnVqeDOE6Jj5PFn3SSCKCuvJUCbtg4xebzaleq0uWRHcR4x2u eyYY7BS8j7Rostor6jtZtL8KUJE5+NBBiljcmViPjozp19hrOIGskdnRT9y+OT0zXpRG 1zfqtNV6SzsvmnRtyb0vDwA9G+U9hPxTSYrvQHtxf0I6c0zAG95RkLCWSOWUMtBzP00c uNDtgJ16FAtF9It1sGCSIOyb/brtGlK29yfLtqBLZiXbPnuDk8IbzFtn7mlEKHeIzp+A q0NERlHYvYTPnbDYyhzO11AVNSB6xqDIyMlhiwalp3KeAtlTibRpWRAg2J/bk/Dd4ren M9Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HNzBGeTdlhZhaE4b4BtqTOtXUVMvBzVOP9h12TTMqdw=; b=BV19bBflFroV+45WZwSzTU+i2GTrddPx0XK7dIDaquNyky+L525nnxeU55QkMfpEOV Rt0hbHQqkvZTjjeZGX7iiOfK+Zq46874VcD1Lf5nZUA8iJrsqsyrHSfGcz06UYMQjvQ3 NdEHXknCs+vKmYSW+Qc3xXlj8AGMYbXZiMez5h4hfIj38hGGtg7+4qIvbE52IHCZAoiQ iJl9UrvPTo9LyiX1PiFZWMu7XuUO0BirG+BwELU/VmzutgmI+nI9e5315fVn+xXqxvY2 dlopoxzTkgFcSdGsV2G7xR0jJvtvlK7XsO/ylhtyWAVkAbOMUCF+C+FhNfuxn3kAQD6a 4cEQ== X-Gm-Message-State: APjAAAUfyfdBXe2g7yA8wy88WFw9N20lI94Ib46FQ/715WpvqJAIWI9S gMf/pzhKRxcb+gU/8/3gTuhuw6GV1krw9A== X-Google-Smtp-Source: APXvYqxoL+4dVlmv9jxSiR/tkoh++5tjYW2eVDJcfeOvL6S8hnb2+b9QSu1oMr3F8NtlDGk+DiBwcA== X-Received: by 2002:ad4:4dc9:: with SMTP id cw9mr375496qvb.0.1578416152166; Tue, 07 Jan 2020 08:55:52 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id w25sm122726qts.91.2020.01.07.08.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 08:55:51 -0800 (PST) From: Josef Bacik To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [PATCH 1/3] ltp/fsx: do size check after closeopen operation Date: Tue, 7 Jan 2020 11:55:40 -0500 Message-Id: <20200107165542.70108-2-josef@toxicpanda.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200107165542.70108-1-josef@toxicpanda.com> References: <20200107165542.70108-1-josef@toxicpanda.com> MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org I was running down a i_size problem and was missing the failure until the next iteration of fsx operations because we do the file size check _after_ the closeopen operation. Move it after the closeopen operation so we can catch problems where the file gets messed up on disk. Signed-off-by: Josef Bacik --- ltp/fsx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ltp/fsx.c b/ltp/fsx.c index 00001117..c74b13c2 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -2211,10 +2211,10 @@ have_op: check_contents(); out: - if (sizechecks && testcalls > simulatedopcount) - check_size(); if (closeopen) docloseopen(); + if (sizechecks && testcalls > simulatedopcount) + check_size(); return 1; } From patchwork Tue Jan 7 16:55:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 11321411 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 EE1FD1580 for ; Tue, 7 Jan 2020 16:55:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCE882467A for ; Tue, 7 Jan 2020 16:55:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=toxicpanda-com.20150623.gappssmtp.com header.i=@toxicpanda-com.20150623.gappssmtp.com header.b="m0omdZf2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728806AbgAGQz5 (ORCPT ); Tue, 7 Jan 2020 11:55:57 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:44888 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbgAGQz4 (ORCPT ); Tue, 7 Jan 2020 11:55:56 -0500 Received: by mail-qt1-f193.google.com with SMTP id t3so296002qtr.11 for ; Tue, 07 Jan 2020 08:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qlZCxBvnUUAjdtWIZdVAdDAL1tqiSSvBhzh47uiwmCc=; b=m0omdZf2gZOoaH2jWMdI6yGukE2XEaHzuAl5bDlNFAPUOxG6/kx8clfcuh+UTVSSEC 7TPfkZ66xh+SCvZM37m0dvlzW4qBf6nzKBSKByH2fokdA9SjnR50uQbfhxfD72Kr40Px UKhIjbINpeHuD5qCaaRtAGdrX9edsh63L1Np2FUe2q1QzcLmPHP2bBjiNo2BrPGNK5sx izEMlSGmDVnQcqSpD5rX+LGeNcrLFxEXHt7+DpfN+pBJc+A8ZzvvK1SWs/zYD3gbLh4p o4hXBNCSp0O2TV0sREZhHdy5jTwwCEeRG9CNvn4JngJsT2zrq47on4kRTnc/QIL+nA4Z DSag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qlZCxBvnUUAjdtWIZdVAdDAL1tqiSSvBhzh47uiwmCc=; b=NWOqcX5snsc/Hm1YCrjA7trPSJdxpc5Fg8xkXD+aKFvbGkd3fJ0X4xOTfX5uZmQl5c WfOJhK/gx1fvDxXl5oLaspO8iQmLhtR05P5DiGAJBrxxGNxJdHuRRrQyS2P3xUZ0ZSNF nGWVRIiemeZ/31ouF5XOdLo3L7FrhhXaLhOiCQgisiL7TecZbgZMujOEgB5C4Nt5N5jP 1ARk+OK21bdb2jYC6j/IYpePx0kI5LiUmso7AbIcJRYN+syHwrUgDxhE2Gp0jT6dvISk q9bEKYkWafndih3xZxxv1+qfC8410hnQXhdq4Vs86Uzzwkm2TtZlu+BbJ3yp/6ma4lLg XQyA== X-Gm-Message-State: APjAAAW3dIX2qSccJKSo2V0yikzJjr+GVpf5K2qhZEaqueDhcugLKn5n cprZN29DbIUa1BIxD7U2UGO4PyRMwUnong== X-Google-Smtp-Source: APXvYqylD6CKxQf79S5PaxMlP5DWYoWsX1dOmP5XuaMtzb6C7t/xqNqVxGhLhcAtWWU24adtses28g== X-Received: by 2002:ac8:7155:: with SMTP id h21mr75689670qtp.95.1578416154907; Tue, 07 Jan 2020 08:55:54 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id g81sm65834qkb.70.2020.01.07.08.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 08:55:54 -0800 (PST) From: Josef Bacik To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [PATCH 2/3] ltp/fsx: drop caches if we're doing closeopen Date: Tue, 7 Jan 2020 11:55:41 -0500 Message-Id: <20200107165542.70108-3-josef@toxicpanda.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200107165542.70108-1-josef@toxicpanda.com> References: <20200107165542.70108-1-josef@toxicpanda.com> MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org fsx has a closeopen option where it will close and then re-open the file. This is handy, but what is really more useful is to drop the file from cache completely, so add a drop_caches into this operation so that the file is read back completely from disk to be really evil. Signed-off-by: Josef Bacik --- ltp/fsx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ltp/fsx.c b/ltp/fsx.c index c74b13c2..e519367b 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -1778,6 +1778,10 @@ docloseopen(void) prterr("docloseopen: close"); report_failure(180); } + if (system("echo 3 > /proc/sys/vm/drop_caches")) { + prterr("docloseopen: drop_caches"); + report_failure(213); + } fd = open(fname, O_RDWR|o_direct, 0); if (fd < 0) { prterr("docloseopen: open"); From patchwork Tue Jan 7 16:55:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 11321415 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 A3CC4138D for ; Tue, 7 Jan 2020 16:56:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7881A2080A for ; Tue, 7 Jan 2020 16:56:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=toxicpanda-com.20150623.gappssmtp.com header.i=@toxicpanda-com.20150623.gappssmtp.com header.b="mh76TA6s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbgAGQz7 (ORCPT ); Tue, 7 Jan 2020 11:55:59 -0500 Received: from mail-qk1-f175.google.com ([209.85.222.175]:45481 "EHLO mail-qk1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbgAGQz7 (ORCPT ); Tue, 7 Jan 2020 11:55:59 -0500 Received: by mail-qk1-f175.google.com with SMTP id x1so43206719qkl.12 for ; Tue, 07 Jan 2020 08:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gXoK0j6o5JMcVa6rZu5k16rvrIE/2wM67CpZGa0A70w=; b=mh76TA6szGegbJMJftVFs8SSnfbLS+kjaZbQE5vtxITNfg3zcpV+zR2DUunrgcppup WH8wGdDjsucews/RpfIy6kUCNsu+v4n70zBRaDetne6uX2telD8VAHpqChr7RmnDDsxw nmTV0Af88gkPJLXJsXwsveLh6KWkoGU1dsZs7tqteyCWwAKEQ1T/45N5vX7Cb3wth446 XgrCX/yYdYDrBuc74C3sjV/ulebSJrBq2Xb9EUCxFeY4tAbwkz/H9XP/lyW3AiC2K4D8 MWSZCZ0sXKeUNRXLTCd/fd1W1CIeeh2Uaozsz0cLSAwQpdYzINLU3heIB5kto8KbqEEZ S9BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gXoK0j6o5JMcVa6rZu5k16rvrIE/2wM67CpZGa0A70w=; b=gpuLF7Dmh4LeWceXhsv1ZkZjjWtbn+HSvuTnoTZSG6Dj89Jpj3UNwAy7Md5mojy61y 9KJQcMHLJrgAgrCrCZo9AGUMpNynCeUYZvBAH/y/dcoQfV+fw0WjLV7h/0duNL+aKVN9 xlkOVNeWxnxGt8nuTA0X34SG3FUwpDrwv12ytFb8QPTDkIRy8yqpTuMAtsTwm2EFs3LV lwh1rpijt4ILqIU9eCi18AW6fPj0tbKjMa6R//NgsJfDePgrms7dLD5u+uaVrPAu77UN k8n6HOngJlfEb5Bo+92CyUZojUAqMyaJ58g8z72EO1Kk+//Z5CmBW4i5sakk5JwCu44c c8BA== X-Gm-Message-State: APjAAAV5sFcMmCDd6PRJXao0Ch5ZeX9M+/G6jPTSJAPrGWKbt3O6K6XE RQsAFNjIfX/tmPd1ty4PBULZk50Q32myug== X-Google-Smtp-Source: APXvYqx76gODgKza9G1xWw0hxZZoueyXVB3me0nCe36i347x1O3tYBfNZRA0coNc4HWkn8ugPkl4wA== X-Received: by 2002:a37:4792:: with SMTP id u140mr286706qka.100.1578416157490; Tue, 07 Jan 2020 08:55:57 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id r80sm49391qke.134.2020.01.07.08.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 08:55:56 -0800 (PST) From: Josef Bacik To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [PATCH 3/3] generic/521: add close+open operations to the fsx run Date: Tue, 7 Jan 2020 11:55:42 -0500 Message-Id: <20200107165542.70108-4-josef@toxicpanda.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200107165542.70108-1-josef@toxicpanda.com> References: <20200107165542.70108-1-josef@toxicpanda.com> MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org I was fixing a issue with i_size setting in btrfs and generic/521 was what I used to reproduce the problem. However I needed the close+open operation to trigger the issue. This is a soak test, so add this option to increase the coverage of this test. Signed-off-by: Josef Bacik --- tests/generic/521 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/521 b/tests/generic/521 index e8bc36e4..f0fc575e 100755 --- a/tests/generic/521 +++ b/tests/generic/521 @@ -52,6 +52,7 @@ fsx_args+=(-r $min_dio_sz) fsx_args+=(-t $min_dio_sz) fsx_args+=(-w $min_dio_sz) fsx_args+=(-Z) +fsx_args+=(-c 10) run_fsx "${fsx_args[@]}" | sed -e '/^fsx.*/d'