aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-12 17:08:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-12 17:08:19 -0400
commit7b47a9e7c8f672b6fb0b77fca11a63a8a77f5a91 (patch)
treecf05645120ba2323c36acefdea6e62addf320f8c /include/linux/fs.h
parentdbc2fba3fc46084f502aec53183995a632998dcd (diff)
parentc99c2171fc61476afac0dfb59fb2c447a01fb1e0 (diff)
Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs mount infrastructure updates from Al Viro: "The rest of core infrastructure; no new syscalls in that pile, but the old parts are switched to new infrastructure. At that point conversions of individual filesystems can happen independently; some are done here (afs, cgroup, procfs, etc.), there's also a large series outside of that pile dealing with NFS (quite a bit of option-parsing stuff is getting used there - it's one of the most convoluted filesystems in terms of mount-related logics), but NFS bits are the next cycle fodder. It got seriously simplified since the last cycle; documentation is probably the weakest bit at the moment - I considered dropping the commit introducing Documentation/filesystems/mount_api.txt (cutting the size increase by quarter ;-), but decided that it would be better to fix it up after -rc1 instead. That pile allows to do followup work in independent branches, which should make life much easier for the next cycle. fs/super.c size increase is unpleasant; there's a followup series that allows to shrink it considerably, but I decided to leave that until the next cycle" * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (41 commits) afs: Use fs_context to pass parameters over automount afs: Add fs_context support vfs: Add some logging to the core users of the fs_context log vfs: Implement logging through fs_context vfs: Provide documentation for new mount API vfs: Remove kern_mount_data() hugetlbfs: Convert to fs_context cpuset: Use fs_context kernfs, sysfs, cgroup, intel_rdt: Support fs_context cgroup: store a reference to cgroup_ns into cgroup_fs_context cgroup1_get_tree(): separate "get cgroup_root to use" into a separate helper cgroup_do_mount(): massage calling conventions cgroup: stash cgroup_root reference into cgroup_fs_context cgroup2: switch to option-by-option parsing cgroup1: switch to option-by-option parsing cgroup: take options parsing into ->parse_monolithic() cgroup: fold cgroup1_mount() into cgroup1_get_tree() cgroup: start switching to fs_context ipc: Convert mqueue fs to fs_context proc: Add fs_context support to procfs ...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 80c6a4093b46..8b42df09b04c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -64,6 +64,8 @@ struct workqueue_struct;
64struct iov_iter; 64struct iov_iter;
65struct fscrypt_info; 65struct fscrypt_info;
66struct fscrypt_operations; 66struct fscrypt_operations;
67struct fs_context;
68struct fs_parameter_description;
67 69
68extern void __init inode_init(void); 70extern void __init inode_init(void);
69extern void __init inode_init_early(void); 71extern void __init inode_init_early(void);
@@ -1349,6 +1351,7 @@ extern int send_sigurg(struct fown_struct *fown);
1349 1351
1350/* These sb flags are internal to the kernel */ 1352/* These sb flags are internal to the kernel */
1351#define SB_SUBMOUNT (1<<26) 1353#define SB_SUBMOUNT (1<<26)
1354#define SB_FORCE (1<<27)
1352#define SB_NOSEC (1<<28) 1355#define SB_NOSEC (1<<28)
1353#define SB_BORN (1<<29) 1356#define SB_BORN (1<<29)
1354#define SB_ACTIVE (1<<30) 1357#define SB_ACTIVE (1<<30)
@@ -1459,7 +1462,7 @@ struct super_block {
1459 * Filesystem subtype. If non-empty the filesystem type field 1462 * Filesystem subtype. If non-empty the filesystem type field
1460 * in /proc/mounts will be "type.subtype" 1463 * in /proc/mounts will be "type.subtype"
1461 */ 1464 */
1462 char *s_subtype; 1465 const char *s_subtype;
1463 1466
1464 const struct dentry_operations *s_d_op; /* default d_op for dentries */ 1467 const struct dentry_operations *s_d_op; /* default d_op for dentries */
1465 1468
@@ -2170,6 +2173,8 @@ struct file_system_type {
2170#define FS_HAS_SUBTYPE 4 2173#define FS_HAS_SUBTYPE 4
2171#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ 2174#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
2172#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ 2175#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
2176 int (*init_fs_context)(struct fs_context *);
2177 const struct fs_parameter_description *parameters;
2173 struct dentry *(*mount) (struct file_system_type *, int, 2178 struct dentry *(*mount) (struct file_system_type *, int,
2174 const char *, void *); 2179 const char *, void *);
2175 void (*kill_sb) (struct super_block *); 2180 void (*kill_sb) (struct super_block *);
@@ -2225,8 +2230,12 @@ void kill_litter_super(struct super_block *sb);
2225void deactivate_super(struct super_block *sb); 2230void deactivate_super(struct super_block *sb);
2226void deactivate_locked_super(struct super_block *sb); 2231void deactivate_locked_super(struct super_block *sb);
2227int set_anon_super(struct super_block *s, void *data); 2232int set_anon_super(struct super_block *s, void *data);
2233int set_anon_super_fc(struct super_block *s, struct fs_context *fc);
2228int get_anon_bdev(dev_t *); 2234int get_anon_bdev(dev_t *);
2229void free_anon_bdev(dev_t); 2235void free_anon_bdev(dev_t);
2236struct super_block *sget_fc(struct fs_context *fc,
2237 int (*test)(struct super_block *, struct fs_context *),
2238 int (*set)(struct super_block *, struct fs_context *));
2230struct super_block *sget_userns(struct file_system_type *type, 2239struct super_block *sget_userns(struct file_system_type *type,
2231 int (*test)(struct super_block *,void *), 2240 int (*test)(struct super_block *,void *),
2232 int (*set)(struct super_block *,void *), 2241 int (*set)(struct super_block *,void *),
@@ -2269,8 +2278,7 @@ mount_pseudo(struct file_system_type *fs_type, char *name,
2269 2278
2270extern int register_filesystem(struct file_system_type *); 2279extern int register_filesystem(struct file_system_type *);
2271extern int unregister_filesystem(struct file_system_type *); 2280extern int unregister_filesystem(struct file_system_type *);
2272extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); 2281extern struct vfsmount *kern_mount(struct file_system_type *);
2273#define kern_mount(type) kern_mount_data(type, NULL)
2274extern void kern_unmount(struct vfsmount *mnt); 2282extern void kern_unmount(struct vfsmount *mnt);
2275extern int may_umount_tree(struct vfsmount *); 2283extern int may_umount_tree(struct vfsmount *);
2276extern int may_umount(struct vfsmount *); 2284extern int may_umount(struct vfsmount *);