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; }