Linux v4.11: getattr takes struct path 72/12572/4
authorJoe Gorse <jhgorse@gmail.com>
Mon, 20 Mar 2017 14:30:46 +0000 (14:30 +0000)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 5 Apr 2017 14:17:29 +0000 (10:17 -0400)
commitde5ee1a67d1c3284d65dc69bbbf89664af70b357
tree50cbadb5515a454178e0c77b4049e33a2eb26cb1
parentc666bfee8848183ccbc566c9e0fa019088e56505
Linux v4.11: getattr takes struct path

With Linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f

    statx: Add a system call to make enhanced file info available

The Linux getattr inode operation is altered to take two additional
arguments: a u32 request_mask and an unsigned int flags that indicate
the synchronisation mode.  This change is propagated to the
vfs_getattr*() function.

-   int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
+   int (*getattr) (const struct path *, struct kstat *,
+                     u32 request_mask, unsigned int sync_mode);

The first argument, request_mask, indicates which fields of the statx
structure are of interest to the userland call. The second argument,
flags, currently may take the values defined in
include/uapi/linux/fcntl.h and are optionally used for cache coherence:

 (1) AT_STATX_SYNC_AS_STAT tells statx() to behave as stat() does.

 (2) AT_STATX_FORCE_SYNC will require a network filesystem to
     synchronise its attributes with the server - which might require
     data writeback to occur to get the timestamps correct.

 (3) AT_STATX_DONT_SYNC will suppress synchronisation with the server in
     a network filesystem.  The resulting values should be considered
     approximate.

This patch provides a new autoconf test and conditional compilation to
cope with the changes in our getattr implementation.

Change-Id: Ie4206140ae249c00a8906331c57da359c4a372c4
Reviewed-on: https://gerrit.openafs.org/12572
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
acinclude.m4
src/afs/LINUX/osi_vnodeops.c
src/cf/linux-test4.m4