zfs/include/linux
Olaf Faaland b4c181dc76 Linux 4.11 compat: iops.getattr and friends
In torvalds/linux@a528d35, there are changes to the getattr family of functions,
struct kstat, and the interface of inode_operations .getattr.

The inode_operations .getattr and simple_getattr() interface changed to:

int (*getattr) (const struct path *, struct dentry *, struct kstat *,
    u32 request_mask, unsigned int query_flags)

The request_mask argument indicates which field(s) the caller intends to use.
Fields the caller has not specified via request_mask may be set in the returned
struct anyway, but their values may be approximate.

The query_flags argument indicates whether the filesystem must update
the attributes from the backing store.

Currently both fields are ignored.  It is possible that getattr-related
functions within zfs could be optimized based on the request_mask.

struct kstat includes new fields:
u32               result_mask;  /* What fields the user got */
u64               attributes;   /* See STATX_ATTR_* flags */
struct timespec   btime;        /* File creation time */

Fields attribute and btime are cleared; the result_mask reflects this.  These
appear to be optional based on simple_getattr() and vfs_getattr() within the
kernel, which take the same approach.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #5875
2017-06-09 14:05:15 -07:00
..
Makefile.am Add compatibility layer for {kmap,kunmap}_atomic 2015-08-24 10:13:25 -07:00
blkdev_compat.h 4.10 compat - BIO flag changes and others 2017-02-03 10:25:07 -08:00
dcache_compat.h cstyle: Resolve C style issues 2013-12-18 16:46:35 -08:00
kmap_compat.h Add compatibility layer for {kmap,kunmap}_atomic 2015-08-24 10:13:25 -07:00
utsname_compat.h Update utsname support 2014-10-17 14:58:57 -07:00
vfs_compat.h Linux 4.11 compat: iops.getattr and friends 2017-06-09 14:05:15 -07:00
xattr_compat.h Linux 4.7 compat: handler->set() takes both dentry and inode 2016-09-05 16:07:08 -07:00