Re: [PATCH] Documentation/filesystems: fix documentation for ->getattr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 10, 2017, at 10:30 PM, Eric Biggers <ebiggers3@xxxxxxxxx> wrote:
> 
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> Following the recent merge of statx, correct the documented prototype
> for the ->getattr() inode operation, and add an entry to the porting
> file.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
> Documentation/filesystems/Locking | 3 +--
> Documentation/filesystems/porting | 6 ++++++
> Documentation/filesystems/vfs.txt | 3 +--
> 3 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
> index fdcfdd79682a..fe25787ff6d4 100644
> --- a/Documentation/filesystems/Locking
> +++ b/Documentation/filesystems/Locking
> @@ -58,8 +58,7 @@ prototypes:
> 	int (*permission) (struct inode *, int, unsigned int);
> 	int (*get_acl)(struct inode *, int);
> 	int (*setattr) (struct dentry *, struct iattr *);
> -	int (*getattr) (const struct path *, struct dentry *, struct kstat *,
> -			u32, unsigned int);

IMHO, having the interface documentation with "u32" and "unsigned int" is
not very helpful.  It would be much better if the actual argument names
were given here.  That isn't needed for self-descriptive arguments like
"struct path" and "struct kstat", but it is in this case.

> diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
> index 95280079c0b3..5fb17f49f7a2 100644
> --- a/Documentation/filesystems/porting
> +++ b/Documentation/filesystems/porting
> @@ -600,3 +600,9 @@ in your dentry operations instead.
> +--
> +[mandatory]
> +	->getattr() is now passed a struct path rather than a vfsmount and
> +	dentry separately, and it now has request_mask and query_flags arguments
> +	to specify the fields and sync type requested by statx.  Filesystems not
> +	supporting any statx-specific features may ignore the new arguments.
> diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
> index 569211703721..94dd27ef4a76 100644
> --- a/Documentation/filesystems/vfs.txt
> +++ b/Documentation/filesystems/vfs.txt
> @@ -382,8 +382,7 @@ struct inode_operations {
> 	int (*permission) (struct inode *, int);
> 	int (*get_acl)(struct inode *, int);
> 	int (*setattr) (struct dentry *, struct iattr *);
> -	int (*getattr) (const struct path *, struct dentry *, struct kstat *,
> -			u32, unsigned int);
> +	int (*getattr) (const struct path *, struct kstat *, u32, unsigned int);

Same here...


Cheers, Andreas





Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux