From patchwork Fri Oct 14 20:43:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amir Goldstein X-Patchwork-Id: 9377483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BC1296075E for ; Fri, 14 Oct 2016 20:44:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF2CC2A848 for ; Fri, 14 Oct 2016 20:44:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3D042A84B; Fri, 14 Oct 2016 20:44:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E26752A84A for ; Fri, 14 Oct 2016 20:44:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbcJNUoE (ORCPT ); Fri, 14 Oct 2016 16:44:04 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34533 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378AbcJNUoE (ORCPT ); Fri, 14 Oct 2016 16:44:04 -0400 Received: by mail-wm0-f68.google.com with SMTP id z189so171574wmb.1 for ; Fri, 14 Oct 2016 13:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xcoXeZ8BOwzCYaexNsVgM5YpoKP1zYpg5xEpC7OjQ58=; b=pT8Tf/TfZT4ePLR3tQARcijJm6bbxNo2fPyvCVg0jEfzgiElqu4gl/CGypv6msD+wN FTvzoZxyzn9l4LvAkfZlxyvI62O/nrjBnYs5OrdhD/CWGjGF3g3GeuQCIyNFcS6te55R +oNtuHcSIp23ljBcSTiJmADWe5AVZEvrWlPSGTK60HXE9guSLr1AqxGMtvHGMcnhg0YQ 76sBpLBs5EJLwWWj4PGPCujti9RJXKb0Tn9o3P7L5NLLhfQTdNAFJoKCmWOUu6Pm4ON0 lNfHzMMDNWskVvkfM8r0QiT/SfzR8Cuq0WLYFaJVTm7CIbVeRyZlPBzLd26ZDMTXQY1J Z8Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xcoXeZ8BOwzCYaexNsVgM5YpoKP1zYpg5xEpC7OjQ58=; b=QMyJXbTvdxqD0/aooPNFl9WLWi9gMRoiIXV21pspSF0qiIOsyNZLFGxlIG1mNePGSV qHhT6BQrl+zk2309F5E5YzX03UKFFqq8uW9lTMB05sqVFoRo4+mR2dzlwtU2mqwtSDuZ cmPEKNjAC28MFVo29J3tAJMtBHViegfrGZGVaYO++2n8Hd9zK6xhWpBAiPB5QlHFiLMk cpnTeLsUgCOXi9xEHqAfErWuEYgi5mtqQgLEyUhH6wn2bIL8a+bjkfWZLf2IF/LGHogs ZrbSZpra3dk17j8ZsfQo1KJ+QTVYbf5OiBnsaaXXuIvJoQ55MAuDqHijw3FQBmew8V+P ot0g== X-Gm-Message-State: AA6/9RmkLicsYZ7kcod5HwdQpA80Omp5q9jCneqNItmLHPBKRxIgpBFV0pYF2yeZJBqBLQ== X-Received: by 10.28.26.193 with SMTP id a184mr11885wma.93.1476477842635; Fri, 14 Oct 2016 13:44:02 -0700 (PDT) Received: from amir-VirtualBox.Home (bzq-79-177-34-153.red.bezeqint.net. [79.177.34.153]) by smtp.gmail.com with ESMTPSA id q8sm33628557wjj.7.2016.10.14.13.44.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 13:44:01 -0700 (PDT) From: Amir Goldstein To: Dave Chinner , eguan@redhat.com Cc: fstests@vger.kernel.org Subject: [PATCH 2/2] fstests: run xfs_io as multi threaded process Date: Fri, 14 Oct 2016 23:43:30 +0300 Message-Id: <1476477810-17478-2-git-send-email-amir73il@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476477810-17478-1-git-send-email-amir73il@gmail.com> References: <1476477810-17478-1-git-send-email-amir73il@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Try to run xfs_io in all tests with command line option -M which starts an idle thread before performing any io. The purpose of this idle thread is to test io from a multi threaded process. With single threaded process, the file table is not shared and file structs are not reference counted. So in order to improve the change of detecting file struct reference leaks, all xfs_io commands in tests will try to run with this option. Signed-off-by: Amir Goldstein --- common/rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/rc b/common/rc index c3da064..64bf341 100644 --- a/common/rc +++ b/common/rc @@ -3799,6 +3799,10 @@ init_rc() xfs_io -c stat $TEST_DIR 2>&1 | grep -q "is not on an XFS filesystem" && \ export XFS_IO_PROG="$XFS_IO_PROG -F" + # Figure out if we can add -M (run as multi threaded) option to xfs_io + $XFS_IO_PROG -M -c quit 2>&1 | grep -q "invalid option" || \ + export XFS_IO_PROG="$XFS_IO_PROG -M" + # xfs_copy doesn't work on v5 xfs yet without -d option if [ "$FSTYP" == "xfs" ] && [[ $MKFS_OPTIONS =~ crc=1 ]]; then export XFS_COPY_PROG="$XFS_COPY_PROG -d"