From patchwork Tue Feb 12 02:17:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10807205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EEB817E0 for ; Tue, 12 Feb 2019 02:17:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7015B2B2B9 for ; Tue, 12 Feb 2019 02:17:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 648152B2C7; Tue, 12 Feb 2019 02:17:43 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 2122B2B2BC for ; Tue, 12 Feb 2019 02:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727631AbfBLCRm (ORCPT ); Mon, 11 Feb 2019 21:17:42 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:49830 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727265AbfBLCRm (ORCPT ); Mon, 11 Feb 2019 21:17:42 -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 x1C2EVKq030369; Tue, 12 Feb 2019 02:17:40 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-2018-07-02; bh=8ncU9URmQY1BKpXWQQlbR7kLiLFHXGvHkILnieECpf4=; b=OpearEEcHYHpblN+Ft6R/pRb3pmV3g4mXrVvTUKO3hGW2gg6k5QhlrxwFKRE1dTtgQky uOJrFHYO8bh1so/T37t+hNBG10dyOEUpHHDRfZI9MFWqpOLY/piKcDu+oMSaLfXoEpni rEzCWIfFa91XkSqWQRamHzkzBsrFnJ2z0UzWe1/3tjbpDyR3PTJ5wp6WUzmvQnBMS41r U2q8ts3YFywwVGrecZdeNGykkTtoC8SBPZV5a//VOuf1HyJrwT4MGW4g3J66riRkJ34M ExkY6aVsihGisKaS0N8WXxGCggvrED4umwpKOAdF9trt2NnZ1c+IUnyGgmcF2vwGMTiw HA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2qhredsac7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 02:17:40 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1C2HYFp002054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Feb 2019 02:17:34 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1C2HY1d032277; Tue, 12 Feb 2019 02:17:34 GMT Received: from localhost (/10.159.237.14) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 11 Feb 2019 18:17:33 -0800 Subject: [PATCH 2/3] common: fix _require_btime for lazy filesystems From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 11 Feb 2019 18:17:32 -0800 Message-ID: <154993785290.1948.9192893627999402298.stgit@magnolia> In-Reply-To: <154993784038.1948.7502664832930298472.stgit@magnolia> References: <154993784038.1948.7502664832930298472.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9164 signatures=668683 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=946 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902120014 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Filesystems are not required to try to fill the statx btime field unless the caller actually sets STATX_BTIME. They're allowed to volunteer that information "if it's cheap", but XFS doesn't volunteer and there may be filesystems that support btime but not cheaply. Either way, we want to test btime on any filesystem that supports it, cheaply or otherwise, so set STATX_BTIME when we're trying to detect support for it. Signed-off-by: Darrick J. Wong --- common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index ab468adf..6fb71e60 100644 --- a/common/rc +++ b/common/rc @@ -3849,7 +3849,11 @@ _dmsetup_create() _require_btime() { - $XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -v" \ + # Note: filesystems are not required to report btime (creation time) + # if the caller doesn't ask for it, so we define STATX_BTIME here and + # pass it in to the statx command. + export STATX_BTIME=0x800 + $XFS_IO_PROG -f $TEST_DIR/test_creation_time -c "statx -m $STATX_BTIME -v" \ | grep btime >>$seqres.full 2>&1 || \ _notrun "inode creation time not supported by this filesystem" rm -f $TEST_DIR/test_creation_time