From patchwork Fri Mar 1 23:27:07 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: 10836213 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 4C12D1575 for ; Fri, 1 Mar 2019 23:27:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 363702F050 for ; Fri, 1 Mar 2019 23:27:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A93F2F0AF; Fri, 1 Mar 2019 23:27:12 +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=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 C7E9C2F050 for ; Fri, 1 Mar 2019 23:27:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726002AbfCAX1L (ORCPT ); Fri, 1 Mar 2019 18:27:11 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:41700 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfCAX1L (ORCPT ); Fri, 1 Mar 2019 18:27:11 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x21NOAfv122681 for ; Fri, 1 Mar 2019 23:27:09 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=7aUiQGbQRClR6EkqGcZbmbZOeafifi4A5cPJgT4JHQU=; b=EzWoWV6xovk8AwQeYaYs0p6uWPyYs7P0PomgpHofg5EQh+vPqh7v4BLMGh8NGHfN69FZ MjN5CbNS8LlRwfLE0xFm6YSAZU5fO0RFL+rCHFGGpb1NAEhQbWgQfHDEAHoEF3NRTP4A R98ANk1D1UewQsPEICCTmVJLjL1PJO4AzhitxLKqbx02u8VJcIRAK7QmbG3zH+hStkgi tTqAI10FEo2zL9z4dUqzwOEYJkXNchqh+d1WRE59W8HggNMRwUt2WKdnBihF1QSLRFOl cglZgAn81Uh2We/EzpUQA/xKhQLCvmpsDqgG6rgw7NXNFuC18ajPjOXxEfnetIvR4Ief eQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2qtupetehn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 01 Mar 2019 23:27:09 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x21NR8E0031180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 1 Mar 2019 23:27:08 GMT 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 x21NR8po029340 for ; Fri, 1 Mar 2019 23:27:08 GMT Received: from localhost (/10.159.229.175) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 01 Mar 2019 15:27:08 -0800 Subject: [PATCH 03/23] xfs_io: statx -r should print attributes_mask From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Fri, 01 Mar 2019 15:27:07 -0800 Message-ID: <155148282721.16677.1887535657277622825.stgit@magnolia> In-Reply-To: <155148280859.16677.6057998944865066232.stgit@magnolia> References: <155148280859.16677.6057998944865066232.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9182 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1810050000 definitions=main-1903010161 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 We're dumping the raw structure, so we ought to dump everything, including the attributes_mask field. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- io/stat.c | 4 ++++ io/statx.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/io/stat.c b/io/stat.c index 64662b43..517be66e 100644 --- a/io/stat.c +++ b/io/stat.c @@ -6,6 +6,9 @@ * Portions of statx support written by David Howells (dhowells@redhat.com) */ +/* Try to pick up statx definitions from the system headers. */ +#include + #include "command.h" #include "input.h" #include "init.h" @@ -272,6 +275,7 @@ dump_raw_statx(struct statx *stx) printf("stat.ino = %llu\n", (unsigned long long)stx->stx_ino); printf("stat.size = %llu\n", (unsigned long long)stx->stx_size); printf("stat.blocks = %llu\n", (unsigned long long)stx->stx_blocks); + printf("stat.attributes_mask = 0x%llx\n", (unsigned long long)stx->stx_attributes_mask); printf("stat.atime.tv_sec = %lld\n", (long long)stx->stx_atime.tv_sec); printf("stat.atime.tv_nsec = %d\n", stx->stx_atime.tv_nsec); printf("stat.btime.tv_sec = %lld\n", (long long)stx->stx_btime.tv_sec); diff --git a/io/statx.h b/io/statx.h index 4e4b31ee..4f40eaa1 100644 --- a/io/statx.h +++ b/io/statx.h @@ -107,7 +107,7 @@ struct statx { __u64 stx_ino; /* Inode number */ __u64 stx_size; /* File size */ __u64 stx_blocks; /* Number of 512-byte blocks allocated */ - __u64 __spare1[1]; + __u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */ /* 0x40 */ struct statx_timestamp stx_atime; /* Last access time */ struct statx_timestamp stx_btime; /* File creation time */