diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-14 16:44:24 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-14 16:44:24 +0200 |
commit | 581701b7efd60ba13d8a7eed60cbdd7fefaf6696 (patch) | |
tree | 505b03b9796a3ca2e62743571305d263809a1a3a /include/uapi/linux/stat.h | |
parent | 44a3b87444058b2cb055092cdebc63858707bf66 (diff) | |
download | linux-581701b7efd60ba13d8a7eed60cbdd7fefaf6696.tar.gz linux-581701b7efd60ba13d8a7eed60cbdd7fefaf6696.tar.bz2 linux-581701b7efd60ba13d8a7eed60cbdd7fefaf6696.zip |
uapi: deprecate STATX_ALL
Constants of the *_ALL type can be actively harmful due to the fact that
developers will usually fail to consider the possible effects of future
changes to the definition.
Deprecate STATX_ALL in the uapi, while no damage has been done yet.
We could keep something like this around in the kernel, but there's
actually no point, since all filesystems should be explicitly checking
flags that they support and not rely on the VFS masking unknown ones out: a
flag could be known to the VFS, yet not known to the filesystem.
Cc: David Howells <dhowells@redhat.com>
Cc: linux-api@vger.kernel.org
Cc: linux-man@vger.kernel.org
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/uapi/linux/stat.h')
-rw-r--r-- | include/uapi/linux/stat.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h index ad80a5c885d5..d1192783139a 100644 --- a/include/uapi/linux/stat.h +++ b/include/uapi/linux/stat.h @@ -148,9 +148,18 @@ 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_ALL 0x00000fffU /* All currently supported flags */ + #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ +#ifndef __KERNEL__ +/* + * This is deprecated, and shall remain the same value in the future. To avoid + * confusion please use the equivalent (STATX_BASIC_STATS | STATX_BTIME) + * instead. + */ +#define STATX_ALL 0x00000fffU +#endif + /* * Attributes to be found in stx_attributes and masked in stx_attributes_mask. * |