Add filesystem context support to NFS, parsing the options in advance and attaching the information to struct nfs_fs_context. The highlights are: (*) Merge nfs_mount_info and nfs_clone_mount into nfs_fs_context. This structure represents NFS's superblock config. (*) Make use of the VFS's parsing support to split comma-separated lists (*) Pin the NFS protocol module in the nfs_fs_context. (*) Attach supplementary error information to fs_context. This has the downside that these strings must be static and can't be formatted. (*) Remove the auxiliary file_system_type structs since the information necessary can be conveyed in the nfs_fs_context struct instead. (*) Root mounts are made by duplicating the config for the requested mount so as to have the same parameters. Submounts pick up their parameters from the parent superblock. [AV -- retrans is u32, not string] [SM -- Renamed cfg to ctx in a few functions in an earlier patch] [SM -- Moved fs_context mount option parsing to an earlier patch] [SM -- Moved fs_context error logging to a later patch] [SM -- Fixed printks in nfs4_try_get_tree() and nfs4_get_referral_tree()] [SM -- Added is_remount_fc() helper] [SM -- Deferred some refactoring to a later patch] [SM -- Fixed referral mounts, which were broken in the original patch] [SM -- Fixed leak of nfs_fattr when fs_context is freed]
Showing the changes to include/linux (1 of 12 files). Show all
Unified · Split
| @@ -1639,6 +1639,7 @@ struct nfs_subversion; · 1638 unmodified lines | ||
| 1639 | 1639 | struct nfs_mount_info; |
| 1640 | 1640 | struct nfs_client_initdata; |
| 1641 | 1641 | struct nfs_pageio_descriptor; |
| 1642 | +struct fs_context; | |
| 1642 | 1643 | |
| 1643 | 1644 | /* |
| 1644 | 1645 | * RPC procedure vector for NFSv2/NFSv3 demuxing |
| @@ -1653,9 +1654,8 @@ struct nfs_rpc_ops { · 8 unmodified lines | ||
| 1653 | 1654 | |
| 1654 | 1655 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
| 1655 | 1656 | struct nfs_fsinfo *); |
| 1656 | − struct vfsmount *(*submount) (struct nfs_server *, struct dentry *, | |
| 1657 | − struct nfs_fh *, struct nfs_fattr *); | |
| 1658 | − struct dentry *(*try_mount) (int, const char *, struct nfs_mount_info *); | |
| 1657 | + int (*submount) (struct fs_context *, struct nfs_server *); | |
| 1658 | + int (*try_get_tree) (struct fs_context *); | |
| 1659 | 1659 | int (*getattr) (struct nfs_server *, struct nfs_fh *, |
| 1660 | 1660 | struct nfs_fattr *, struct nfs4_label *, |
| 1661 | 1661 | struct inode *); |