Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 590dce2d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs 'statx()' update from Al Viro.

This adds the new extended stat() interface that internally subsumes our
previous stat interfaces, and allows user mode to specify in more detail
what kind of information it wants.

It also allows for some explicit synchronization information to be
passed to the filesystem, which can be relevant for network filesystems:
is the cached value ok, or do you need open/close consistency, or what?

From David Howells.

Andreas Dilger points out that the first version of the extended statx
interface was posted June 29, 2010:

    https://www.spinics.net/lists/linux-fsdevel/msg33831.html

* 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  statx: Add a system call to make enhanced file info available
parents e0d07225 a528d35e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ prototypes:
	int (*permission) (struct inode *, int, unsigned int);
	int (*get_acl)(struct inode *, int);
	int (*setattr) (struct dentry *, struct iattr *);
	int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
	int (*getattr) (const struct path *, struct dentry *, struct kstat *,
			u32, unsigned int);
	ssize_t (*listxattr) (struct dentry *, char *, size_t);
	int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
	void (*update_time)(struct inode *, struct timespec *, int);
+2 −1
Original line number Diff line number Diff line
@@ -382,7 +382,8 @@ struct inode_operations {
	int (*permission) (struct inode *, int);
	int (*get_acl)(struct inode *, int);
	int (*setattr) (struct dentry *, struct iattr *);
	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
	int (*getattr) (const struct path *, struct dentry *, struct kstat *,
			u32, unsigned int);
	ssize_t (*listxattr) (struct dentry *, char *, size_t);
	void (*update_time)(struct inode *, struct timespec *, int);
	int (*atomic_open)(struct inode *, struct dentry *, struct file *,
+1 −0
Original line number Diff line number Diff line
@@ -389,3 +389,4 @@
380	i386	pkey_mprotect		sys_pkey_mprotect
381	i386	pkey_alloc		sys_pkey_alloc
382	i386	pkey_free		sys_pkey_free
383	i386	statx			sys_statx
+1 −0
Original line number Diff line number Diff line
@@ -338,6 +338,7 @@
329	common	pkey_mprotect		sys_pkey_mprotect
330	common	pkey_alloc		sys_pkey_alloc
331	common	pkey_free		sys_pkey_free
332	common	statx			sys_statx

#
# x32-specific system call numbers start at 512 to avoid cache impact
+2 −1
Original line number Diff line number Diff line
@@ -309,7 +309,8 @@ static int handle_remove(const char *nodename, struct device *dev)
	if (d_really_is_positive(dentry)) {
		struct kstat stat;
		struct path p = {.mnt = parent.mnt, .dentry = dentry};
		err = vfs_getattr(&p, &stat);
		err = vfs_getattr(&p, &stat, STATX_TYPE | STATX_MODE,
				  AT_STATX_SYNC_AS_STAT);
		if (!err && dev_mynode(dev, d_inode(dentry), &stat)) {
			struct iattr newattrs;
			/*
Loading