From: Miklos Szeredi <mszeredi@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
David Howells <dhowells@redhat.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Andreas Dilger <adilger@dilger.ca>,
Florian Weimer <fw@deneb.enyo.de>,
Amir Goldstein <amir73il@gmail.com>
Subject: [PATCH v2 3/5] statx: add STATX_ATTRIBUTES flag
Date: Fri, 19 Oct 2018 14:20:47 +0200 [thread overview]
Message-ID: <20181019122049.27121-3-mszeredi@redhat.com> (raw)
In-Reply-To: <20181019122049.27121-1-mszeredi@redhat.com>
FUSE will want to know if stx_attributes is interesting or not, because
there's a non-zero cost of retreiving it.
This just a "want" flag, since stx_attributes_mask already indicates
whether we "got" stx_attributes or not.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
---
include/uapi/linux/stat.h | 1 +
samples/statx/test-statx.c | 2 +-
tools/include/uapi/linux/stat.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h
index ed456ac0f90d..7d3cce078652 100644
--- a/include/uapi/linux/stat.h
+++ b/include/uapi/linux/stat.h
@@ -148,6 +148,7 @@ struct statx {
#define STATX_BLOCKS 0x00000400U /* Want/got stx_blocks */
#define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
#define STATX_BTIME 0x00000800U /* Want/got stx_btime */
+#define STATX_ATTRIBUTES 0x00001000U /* Want stx_attributes */
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
diff --git a/samples/statx/test-statx.c b/samples/statx/test-statx.c
index e354048dea3c..deef9a68ff68 100644
--- a/samples/statx/test-statx.c
+++ b/samples/statx/test-statx.c
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
struct statx stx;
int ret, raw = 0, atflag = AT_SYMLINK_NOFOLLOW;
- unsigned int mask = STATX_BASIC_STATS | STATX_BTIME;
+ unsigned int mask = STATX_BASIC_STATS | STATX_BTIME | STATX_ATTRIBUTES;
for (argv++; *argv; argv++) {
if (strcmp(*argv, "-F") == 0) {
diff --git a/tools/include/uapi/linux/stat.h b/tools/include/uapi/linux/stat.h
index ed456ac0f90d..60cd0a3f52e7 100644
--- a/tools/include/uapi/linux/stat.h
+++ b/tools/include/uapi/linux/stat.h
@@ -148,6 +148,7 @@ struct statx {
#define STATX_BLOCKS 0x00000400U /* Want/got stx_blocks */
#define STATX_BASIC_STATS 0x000007ffU /* The stuff in the normal stat struct */
#define STATX_BTIME 0x00000800U /* Want/got stx_btime */
+#define STATX_ATTRIBUTES 0x00001000U /* Want/got stx_attributes */
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
--
2.14.3
next prev parent reply other threads:[~2018-10-19 12:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 12:20 [PATCH v2 1/5] orangefs: fix request_mask misuse Miklos Szeredi
2018-10-19 12:20 ` [PATCH v2 2/5] uapi: deprecate STATX_ALL Miklos Szeredi
2018-10-19 15:35 ` David Howells
2018-10-19 15:40 ` Miklos Szeredi
2018-10-19 15:47 ` David Howells
2018-10-19 17:30 ` Miklos Szeredi
2018-10-19 12:20 ` Miklos Szeredi [this message]
2018-10-19 15:36 ` [PATCH v2 3/5] statx: add STATX_ATTRIBUTES flag David Howells
2018-10-19 12:20 ` [PATCH v2 4/5] statx: don't clear STATX_ATIME on SB_RDONLY Miklos Szeredi
2018-10-19 15:40 ` David Howells
2018-10-19 12:20 ` [PATCH v2 5/5] nfs: don't clear STATX_ATIME from result_mask Miklos Szeredi
2018-10-19 15:44 ` David Howells
2018-10-19 15:52 ` Trond Myklebust
2018-10-19 17:46 ` Miklos Szeredi
2018-10-19 18:14 ` Trond Myklebust
2018-10-19 20:48 ` Miklos Szeredi
2018-10-20 17:46 ` Trond Myklebust
2018-11-05 22:29 ` Andreas Dilger
2018-10-19 14:27 ` [PATCH v2 1/5] orangefs: fix request_mask misuse Andreas Dilger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181019122049.27121-3-mszeredi@redhat.com \
--to=mszeredi@redhat.com \
--cc=adilger@dilger.ca \
--cc=amir73il@gmail.com \
--cc=dhowells@redhat.com \
--cc=fw@deneb.enyo.de \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox