]> git.proxmox.com Git - mirror_zfs.git/commit
Linux 4.11 compat: vfs_getattr() takes 4 args
authorOlaf Faaland <faaland1@llnl.gov>
Tue, 7 Mar 2017 21:18:53 +0000 (13:18 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 21 Mar 2017 00:43:39 +0000 (17:43 -0700)
commit94b1ab2ae01e9ee642aee87dd1a73e8d63629372
tree80d300102f31abe29242d71d0dbefe27b21846b6
parente0aacd9b9767a877ad61b74cf87c0da856bb1e8a
Linux 4.11 compat: vfs_getattr() takes 4 args

There are changes to vfs_getattr() in torvalds/linux@a528d35.  The new
interface is:

int vfs_getattr(const struct path *path, struct kstat *stat,
               u32 request_mask, unsigned int query_flags)

The request_mask argument indicates which field(s) the caller intends to
use.  Fields the caller does not specify 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.

This patch uses the query_flags which result in vfs_getattr behaving the same
as it did with the 2-argument version which the kernel provided before
Linux 4.11.

Members blksize and blocks are now always the same size regardless of
arch.  They match the size of the equivalent members in vnode_t.

The configure checks are modified to ensure that the appropriate
vfs_getattr() interface is used.

A more complete fix, removing the ZFS dependency on vfs_getattr()
entirely, is deferred as it is a much larger project.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #608
config/spl-build.m4
module/spl/spl-vnode.c