| /linux/fs/ |
| H A D | pnode.c | 17 static inline struct mount *next_peer(struct mount *p) in next_peer() 19 return list_entry(p->mnt_share.next, struct mount, mnt_share); in next_peer() 22 static inline struct mount *first_slave(struct mount *p) in first_slave() 24 return hlist_entry(p->mnt_slave_list.first, struct mount, mnt_slave); in first_slave() 27 static inline struct mount *next_slave(struct mount *p) in next_slave() 29 return hlist_entry(p->mnt_slave.next, struct mount, mnt_slave); in next_slave() 33 static struct mount *get_peer_under_root(struct mount *mnt, in get_peer_under_root() 37 struct mount *m = mnt; in get_peer_under_root() 56 int get_dominating_id(struct mount *mnt, const struct path *root) in get_dominating_id() 58 struct mount *m; in get_dominating_id() [all …]
|
| H A D | pnode.h | 33 static inline void set_mnt_shared(struct mount *mnt) in set_mnt_shared() 39 static inline bool peers(const struct mount *m1, const struct mount *m2) in peers() 44 void change_mnt_propagation(struct mount *, int); 46 int propagate_mnt(struct mount *, struct mountpoint *, struct mount *, 49 int propagate_mount_busy(struct mount *, int); 50 void propagate_mount_unlock(struct mount *); 51 void mnt_release_group_id(struct mount *); 52 int get_dominating_id(struct mount *mnt, const struct path *root); 53 int mnt_get_count(struct mount *mnt); 54 void mnt_set_mountpoint(struct mount *, struct mountpoint *, [all …]
|
| H A D | mount.h | 15 struct mount * root; 52 struct mount { struct 54 struct mount *mnt_parent; argument 70 struct mount *mnt_next_for_sb; /* the next two fields are hlist_node, */ argument 71 struct mount * __aligned(1) *mnt_pprev_for_sb; 80 struct mount *mnt_master; /* slave is on master->mnt_slave_list */ argument 110 struct mount *overmount; /* mounted on ->mnt_root */ argument 131 static inline struct mount *real_mount(struct vfsmount *mnt) in real_mount() 133 return container_of(mnt, struct mount, mnt); in real_mount() 136 static inline int mnt_has_parent(const struct mount *mnt) in mnt_has_parent() [all …]
|
| H A D | namespace.c | 31 #include <uapi/linux/mount.h> 41 /* Maximum number of mounts in a mount namespace */ 76 /* Don't allow confusion with old 32bit mount ID */ 133 /* keep alive for {list,stat}mount() */ in mnt_ns_release() 149 /* remove from global mount namespace list */ in mnt_ns_tree_remove() 157 * Lookup a mount namespace by id and take a passive reference count. Taking a 158 * passive reference means the mount namespace can be emptied if e.g., the last 161 * already shut down before acquiring @namespace_sem, {list,stat}mount() will 162 * see that the mount rbtree of the namespace is empty. 166 * possible. So if we didn't find a mount namespac 4543 SYSCALL_DEFINE5(mount,char __user *,dev_name,char __user *,dir_name,char __user *,type,unsigned long,flags,void __user *,data) SYSCALL_DEFINE5() argument [all...] |
| /linux/Documentation/filesystems/ |
| H A D | sharedsubtree.rst | 10 3) Setting mount states 37 a) A **shared mount** can be replicated to as many mountpoints and all the 42 Let's say /mnt has a mount that is shared:: 44 # mount --make-shared /mnt 47 mount(8) command now supports the --make-shared flag, 53 # mount --bind /mnt /tmp 55 The above command replicates the mount at /mnt to the mountpoint /tmp 66 Now let's say we mount a device at /tmp/a:: 68 # mount /dev/sd0 /tmp/a 76 Note that the mount has propagated to the mount at /mnt as well. [all …]
|
| H A D | autofs-mount-control.rst | 17 are things such as setting an autofs mount catatonic, setting the 20 mount itself which prevents us being able to use open(2) to obtain a 25 needs to walk back up the mount tree to construct a path, such as 28 from the mount tree. 33 because autofs direct mounts and the implementation of "on demand mount 34 and expire" of nested mount trees have the file system mounted directly 35 on top of the mount trigger directory dentry. 39 a direct mount in disguise) and indirect. 62 operation. So we see a mount of shark:/autofs/export1 on /test/g1, for 65 The way that direct mounts are handled is by making an autofs mount on [all …]
|
| H A D | overlayfs.rst | 35 make the overlay mount more compliant with filesystem scanners and 48 The "xino" feature can be enabled with the "-o xino=on" overlay mount option. 51 the lifetime of the filesystem. The "-o xino=auto" overlay mount option 120 At mount time, the two directories given as mount options "lowerdir" and 123 mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,\ 251 mount option. 302 In the old mount api the credentials of the task calling mount(2) are 303 stashed. In the new mount ap [all...] |
| /linux/tools/testing/selftests/filesystems/umount_propagation/ |
| H A D | shrink_submounts_test.c | 64 ASSERT_EQ(mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL), 0); in FIXTURE_SETUP() 68 ASSERT_EQ(mount("tmpfs", self->base, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 70 ASSERT_EQ(mount(NULL, self->base, NULL, MS_PRIVATE, NULL), 0); in FIXTURE_SETUP() 74 if (mount("debugfs", p, "debugfs", 0, NULL)) { in FIXTURE_SETUP() 140 ASSERT_EQ(mount(self->automount, p, NULL, MS_BIND, NULL), 0); in TEST_F() 141 ASSERT_EQ(mount(NULL, p, NULL, MS_SHARED, NULL), 0); in TEST_F() 142 ASSERT_EQ(mount(p, p1, NULL, MS_BIND, NULL), 0); in TEST_F() 143 ASSERT_EQ(mount(NULL, p1, NULL, MS_SLAVE, NULL), 0); in TEST_F() 144 ASSERT_EQ(mount(NULL, p1, NULL, MS_SHARED, NULL), 0); in TEST_F() 145 ASSERT_EQ(mount(p1, p2, NULL, MS_BIND, NULL), 0); in TEST_F() [all …]
|
| H A D | locked_mount_test.c | 176 ASSERT_EQ(mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL), 0); in FIXTURE_SETUP() 177 ASSERT_EQ(mount("tmpfs", self->base, "tmpfs", 0, "mode=0755"), 0); in FIXTURE_SETUP() 182 self->tracing = !mount("debugfs", p, "debugfs", FLAGS, NULL); in FIXTURE_SETUP() 216 if (!mount(NULL, p, NULL, MS_REMOUNT | MS_BIND, NULL) || errno != EPERM) in automount_child() 231 ASSERT_EQ(mount(NULL, p, NULL, MS_SHARED, NULL), 0); in TEST_F() 246 EXPECT_EQ(mount(NULL, p, NULL, MS_REMOUNT | MS_BIND, NULL), 0); in TEST_F() 275 if (mount(srv, x, NULL, MS_BIND | MS_REC, NULL) || in expiry_child() 276 mount(shr, c, NULL, MS_BIND, NULL)) in expiry_child() 308 ASSERT_EQ(mount(p, q, NULL, MS_BIND, NULL), 0); in TEST_F() 311 ASSERT_EQ(mount("tmpfs", p, "tmpfs", 0, "mode=0755"), 0); in TEST_F() [all …]
|
| /linux/security/tomoyo/ |
| H A D | mount.c | 3 * security/tomoyo/mount.c 9 #include <uapi/linux/mount.h> 12 /* String table for special mount operations. */ 24 * tomoyo_audit_mount_log - Audit mount log. 33 return tomoyo_supervisor(r, "file mount %s %s %s 0x%lX\n", in tomoyo_audit_mount_log() 34 r->param.mount.dev->name, in tomoyo_audit_mount_log() 35 r->param.mount.dir->name, in tomoyo_audit_mount_log() 36 r->param.mount.type->name, in tomoyo_audit_mount_log() 37 r->param.mount.flags); in tomoyo_audit_mount_log() 54 return tomoyo_compare_number_union(r->param.mount in tomoyo_check_mount_acl() [all...] |
| /linux/tools/testing/selftests/move_mount_set_group/ |
| H A D | move_mount_set_group_test.c | 118 if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0)) in prepare_unpriv_mountns() 214 if (mount("testing", "/tmp", "tmpfs", MS_NOATIME | MS_NODEV, in move_mount_set_group_supported() 218 if (mount(NULL, "/tmp", NULL, MS_PRIVATE, 0)) in move_mount_set_group_supported() 227 if (mount("testing", SET_GROUP_FROM, "tmpfs", MS_NOATIME | MS_NODEV, in move_mount_set_group_supported() 231 if (mount(SET_GROUP_FROM, SET_GROUP_TO, NULL, MS_BIND, NULL)) in move_mount_set_group_supported() 234 if (mount(NULL, SET_GROUP_FROM, NULL, MS_SHARED, 0)) in move_mount_set_group_supported() 262 ASSERT_EQ(mount("testing", "/tmp", "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 267 ASSERT_EQ(mount("testing", SET_GROUP_A, "tmpfs", MS_NOATIME | MS_NODEV, in FIXTURE_SETUP() 335 ret = mount(NULL, SET_GROUP_A, NULL, MS_SHARED, 0); in get_nestedns_mount_cb() 408 ASSERT_EQ(mount(NULL, SET_GROUP_A, NULL, MS_SHARED, 0), 0); in TEST_F() [all …]
|
| /linux/tools/testing/selftests/filesystems/mount_cycle/ |
| H A D | overmount_ns_file_test.c | 89 return mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL); in enter_userns() 106 ASSERT_EQ(mount("tmpfs", self->dir, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 140 ASSERT_EQ(mount("tmpfs", a, "tmpfs", 0, NULL), 0); in TEST_F() 141 ASSERT_EQ(mount(NULL, a, NULL, MS_SHARED, NULL), 0); in TEST_F() 144 ASSERT_EQ(mount(a, b, NULL, MS_BIND, NULL), 0); in TEST_F() 145 ASSERT_EQ(mount(NULL, b, NULL, MS_SLAVE, NULL), 0); in TEST_F() 149 ASSERT_EQ(mount(p, b, NULL, MS_BIND, NULL), 0); in TEST_F() 152 ASSERT_EQ(mount("tmpfs", s, "tmpfs", 0, NULL), 0); in TEST_F() 157 ASSERT_EQ(mount(s, p, NULL, MS_BIND, NULL), 0); in TEST_F() 176 ASSERT_EQ(mount(s, p, NULL, MS_BIND, NULL), 0); in TEST_F()
|
| H A D | unmounted_tree_test.c | 90 return mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL); in enter_userns() 98 return mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL); in own_mntns() 113 ASSERT_EQ(mount("tmpfs", self->dir, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 130 EXPECT_EQ(mount(link, target, NULL, MS_BIND | MS_REC, NULL), -1); in assert_not_walked() 171 ASSERT_EQ(mount("/proc/self/ns/net", x, NULL, MS_BIND, NULL), 0); in TEST_F() 179 ASSERT_EQ(mount(link, y, NULL, MS_BIND, NULL), 0); in TEST_F() 188 ASSERT_EQ(mount("/proc/self/ns/net", y, NULL, MS_BIND, NULL), 0); in TEST_F() 189 ASSERT_EQ(mount(y, z, NULL, MS_BIND | MS_REC, NULL), 0); in TEST_F() 324 if (mount("/proc/self/ns/net", a->x, NULL, MS_BIND, NULL)) in vacant_child() 327 if (fd < 0 || mount(a->s, a->x, NULL, MS_BIND, NULL)) in vacant_child() [all …]
|
| H A D | overmount_reparent_test.c | 69 return mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL); in enter_userns() 139 ASSERT_EQ(mount("tmpfs", a, "tmpfs", 0, NULL), 0); in TEST_F() 140 ASSERT_EQ(mount(NULL, a, NULL, MS_SHARED, NULL), 0); in TEST_F() 141 ASSERT_EQ(mount(a, b, NULL, MS_BIND, NULL), 0); in TEST_F() 149 ASSERT_EQ(mount("tmpfs", amp, "tmpfs", 0, NULL), 0); in TEST_F() 156 ASSERT_EQ(mount(NULL, bmp, NULL, MS_PRIVATE, NULL), 0); in TEST_F() 159 ASSERT_EQ(mount("tmpfs", bmp, "tmpfs", 0, NULL), 0); in TEST_F()
|
| H A D | nsfs_rbind_loop_test.c | 79 return mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL); in enter_userns() 109 ASSERT_EQ(mount("tmpfs", self->dir, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 135 if (mount("tmpfs", y, "tmpfs", 0, NULL)) in newer_ns_child() 142 if (!mount(src, y, NULL, MS_BIND | MS_REC, NULL)) in newer_ns_child() 146 if (mount(src, y, NULL, MS_BIND, NULL)) in newer_ns_child() 162 ASSERT_EQ(mount("/proc/self/ns/net", self->x, NULL, MS_BIND, NULL), 0); in TEST_F() 181 ASSERT_EQ(mount(p, self->x, NULL, MS_BIND, NULL), 0); in TEST_F()
|
| /linux/tools/testing/selftests/filesystems/mount-notify/ |
| H A D | mount-notify_test.c | 17 #include <sys/mount.h> 26 static const char root_mntpoint_templ[] = "/tmp/mount-notify_test_root.XXXXXX"; 56 ASSERT_EQ(mount("", "/", NULL, MS_REC|MS_PRIVATE, NULL), 0); in FIXTURE_SETUP() 64 ASSERT_EQ(mount("tmpfs", self->root_mntpoint, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 243 ret = mount("", "/", NULL, MS_SHARED, NULL); in setup_mount_tree() 247 ret = mount("/", "/", NULL, MS_BIND, NULL); in setup_mount_tree() 257 ret = mount("/", "/", NULL, MS_BIND, NULL); in TEST_F() 282 ret = mount("/", "/a", NULL, MS_BIND, NULL); in TEST_F() 322 ret = mount("", "/", NULL, MS_PRIVATE, NULL); in TEST_F() 378 ret = mount("/", "/ in TEST_F() [all...] |
| H A D | mount-notify_test_ns.c | 73 ASSERT_EQ(mount("tmpfs", self->root_mntpoint, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 270 ret = mount("", "/", NULL, MS_SHARED, NULL); in setup_mount_tree() 274 ret = mount("/", "/", NULL, MS_BIND, NULL); in setup_mount_tree() 284 ret = mount("/", "/", NULL, MS_BIND, NULL); in TEST_F() 309 ret = mount("/", "/a", NULL, MS_BIND, NULL); in TEST_F() 349 ret = mount("", "/", NULL, MS_PRIVATE, NULL); in TEST_F() 405 ret = mount("/", "/a", NULL, MS_BIND, NULL); in TEST_F() 408 ret = mount("", "/a", NULL, MS_SHARED, NULL); in TEST_F() 411 ret = mount("/a", "/b", NULL, MS_BIND, NULL); in TEST_F() 414 ret = mount("", "/b", NULL, MS_SLAVE, NULL); in TEST_F() [all …]
|
| /linux/Documentation/admin-guide/cifs/ |
| H A D | usage.rst | 54 If you do not have the utility mount.cifs (in the Samba 4.x source tree and on 55 the CIFS VFS web site) copy it to the same directory in which mount helpers 57 required, mount.cifs is recommended. Most distros include a ``cifs-utils`` 62 domain to the proper network user. The mount.cifs mount helper can be 78 the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0" 79 on mount (or vers=2.0 for Windows Vista). Note that the CIFS (vers=1.0) is 83 There are additional mount options that may be helpful for SMB3 to get 91 To permit users to mount and unmount over directories they own is possible 92 with the cifs vfs. A way to enable such mounting is to mark the mount.cifs 93 utility as suid (e.g. ``chmod +s /sbin/mount.cifs``). To enable users to [all …]
|
| /linux/tools/testing/selftests/pid_namespace/ |
| H A D | pid_max.c | 13 #include <sys/mount.h> 107 ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); in pid_max_nested_inner() 109 fprintf(stderr, "%m - Failed to make rootfs private mount\n"); in pid_max_nested_inner() 115 ret = mount("proc", "/proc", "proc", 0, NULL); in pid_max_nested_inner() 117 fprintf(stderr, "%m - Failed to mount proc\n"); in pid_max_nested_inner() 153 ret = mount("", "/", NULL, MS_PRIVATE | MS_REC, 0); in pid_max_nested_inner() 155 fprintf(stderr, "%m - Failed to make rootfs private mount\n"); in pid_max_nested_inner() 161 ret = mount("proc", "/proc", "proc", 0, NULL); in pid_max_nested_outer() 163 fprintf(stderr, "%m - Failed to mount proc\n"); in pid_max_nested_outer() 232 ret = mount("", "/", NUL in pid_max_nested_limit_inner() [all...] |
| /linux/Documentation/admin-guide/nfs/ |
| H A D | nfs-rdma.rst | 55 An NFS/RDMA mount point can be obtained by using the mount.nfs command in 59 mount.nfs you are using, type: 63 $ /sbin/mount.nfs -V 73 these to create an NFS/RDMA enabled mount command), the installation 84 After building the nfs-utils package, there will be a mount.nfs binary in 85 the utils/mount directory. This binary can be used to initiate NFS v2, v3, 86 or v4 mounts. To initiate a v4 mount, the binary must be called 87 mount.nfs4. The standard technique is to create a symlink called 88 mount.nfs4 to mount.nfs. 90 This mount.nfs binary should be installed at /sbin/mount.nfs as follows: [all …]
|
| /linux/Documentation/filesystems/fuse/ |
| H A D | fuse.rst | 18 Non-privileged mount (or user mount): 41 module (fuse.ko), a userspace library (libfuse.*) and a mount utility 55 The filesystem type given to mount(2) can be one of the following: 58 This is the usual way to mount a FUSE filesystem. The first 59 argument of the mount system call may contain an arbitrary string, 64 mount system call is interpreted as the name of the device. 78 The numeric user id of the mount owner. 81 The numeric group id of the mount owner. 89 'allow_other' mount option. 111 mount -t fusectl none /sys/fs/fuse/connections [all …]
|
| /linux/Documentation/filesystems/smb/ |
| H A D | cifsroot.rst | 15 which will tell the kernel to mount the root file system over the 18 In order to mount, the network stack will also need to be set up by 22 A CIFS root mount currently requires the use of SMB1+UNIX Extensions 31 to use can nonetheless be changed via the 'vers=' mount option. This 52 This is just a virtual device that basically tells the kernel to mount 59 Enables the kernel to mount the root file system via SMB that are 62 The default mount options are set in fs/smb/client/cifsroot.c. 71 Optional mount options. For more information, see mount.cifs(8).
|
| /linux/tools/testing/selftests/filesystems/mntns_unbindable/ |
| H A D | mntns_unbindable_test.c | 57 ASSERT_EQ(mount("", "/", NULL, MS_REC | MS_PRIVATE, NULL), 0); in FIXTURE_SETUP() 61 ASSERT_EQ(mount("tmpfs", self->base, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 69 ASSERT_EQ(mount("tmpfs", self->src, "tmpfs", 0, NULL), 0); in FIXTURE_SETUP() 70 ASSERT_EQ(mount(NULL, self->src, NULL, MS_UNBINDABLE, NULL), 0); in FIXTURE_SETUP() 144 ret = mount(src, dst, NULL, MS_BIND, NULL); in bind_after_clone() 154 ret = mount(src, dst, NULL, MS_BIND | MS_REC, NULL); in rbind_after_clone() 183 ret = mount(src, dst, NULL, MS_BIND, NULL); in bind_after_two_clones() 190 int ret = mount(self->src, self->dst, NULL, MS_BIND, NULL); in TEST_F()
|
| /linux/tools/testing/selftests/proc/ |
| H A D | proc-pidns.c | 16 #include <sys/mount.h> 53 /* Create a new mount namespace and make it private. */ in FIXTURE_SETUP() 55 ASSERT_SUCCESS(mount(NULL, "/", NULL, MS_PRIVATE|MS_REC, NULL)); in FIXTURE_SETUP() 61 ASSERT_SUCCESS(mount("tmpfs", "/tmp", "tmpfs", 0, NULL)); in FIXTURE_SETUP() 65 * child so that we get a usable nsfd that we can bind-mount and open. in FIXTURE_SETUP() 79 ASSERT_SUCCESS(mount("/proc/self/ns/pid", "/tmp/dummy/pidns", NULL, MS_BIND, NULL)); in FIXTURE_SETUP() 80 ASSERT_SUCCESS(mount("proc", "/tmp/dummy/proc", "proc", 0, NULL)); in FIXTURE_SETUP() 107 ASSERT_SUCCESS(mount("proc", "/tmp/proc-host", "proc", 0, "pidns=/proc/self/ns/pid")); in TEST_F() 111 ASSERT_SUCCESS(mount("proc", "/tmp/proc-dummy", "proc", 0, "pidns=/tmp/dummy/pidns")); in TEST_F() 155 ASSERT_SUCCESS(mount("pro in TEST_F() [all...] |
| /linux/security/ |
| H A D | inode.c | 17 #include <linux/mount.h> 27 static struct vfsmount *mount; variable 125 error = simple_pin_fs(&fs_type, &mount, &mount_count); in securityfs_create_dentry() 129 parent = mount->mnt_root; in securityfs_create_dentry() 166 simple_release_fs(&mount, &mount_count); in securityfs_create_dentry() 280 simple_release_fs(&mount, &mount_count); in remove_one() 304 simple_pin_fs(&fs_type, &mount, &mount_count); in securityfs_remove() 306 simple_release_fs(&mount, &mount_count); in securityfs_remove()
|