diff options
author | Tomohiro Kusumi <kusumi.tomohiro@gmail.com> | 2016-10-11 16:52:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 18:06:31 -0400 |
commit | bf72eda5f9c593495127a34d3444b2ec5939e837 (patch) | |
tree | aab318f2974d8607013cbc4b3462603b95e85bcc /Documentation/filesystems | |
parent | d873284103dacbe90ace2f3de20dff02fafcfef0 (diff) |
autofs: update struct autofs_dev_ioctl in Documentation
Sync with changes made by commit 730c9eeca980 ("autofs4: improve
parameter usage") which introduced an union for various ioctl commands
instead of having statically named arg1,2.
This commit simply replaces arg1,2 with the corresponding fields without
changing semantics.
Link: http://lkml.kernel.org/r/20160812024831.12352.24667.stgit@pluto.themaw.net
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Ian Kent <ikent@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/autofs4-mount-control.txt | 70 |
1 files changed, 42 insertions, 28 deletions
diff --git a/Documentation/filesystems/autofs4-mount-control.txt b/Documentation/filesystems/autofs4-mount-control.txt index 540d9a7e252d..50a3e01a36f8 100644 --- a/Documentation/filesystems/autofs4-mount-control.txt +++ b/Documentation/filesystems/autofs4-mount-control.txt | |||
@@ -179,8 +179,19 @@ struct autofs_dev_ioctl { | |||
179 | * including this struct */ | 179 | * including this struct */ |
180 | __s32 ioctlfd; /* automount command fd */ | 180 | __s32 ioctlfd; /* automount command fd */ |
181 | 181 | ||
182 | __u32 arg1; /* Command parameters */ | 182 | union { |
183 | __u32 arg2; | 183 | struct args_protover protover; |
184 | struct args_protosubver protosubver; | ||
185 | struct args_openmount openmount; | ||
186 | struct args_ready ready; | ||
187 | struct args_fail fail; | ||
188 | struct args_setpipefd setpipefd; | ||
189 | struct args_timeout timeout; | ||
190 | struct args_requester requester; | ||
191 | struct args_expire expire; | ||
192 | struct args_askumount askumount; | ||
193 | struct args_ismountpoint ismountpoint; | ||
194 | }; | ||
184 | 195 | ||
185 | char path[0]; | 196 | char path[0]; |
186 | }; | 197 | }; |
@@ -192,8 +203,8 @@ optionally be used to check a specific mount corresponding to a given | |||
192 | mount point file descriptor, and when requesting the uid and gid of the | 203 | mount point file descriptor, and when requesting the uid and gid of the |
193 | last successful mount on a directory within the autofs file system. | 204 | last successful mount on a directory within the autofs file system. |
194 | 205 | ||
195 | The fields arg1 and arg2 are used to communicate parameters and results of | 206 | The union is used to communicate parameters and results of calls made |
196 | calls made as described below. | 207 | as described below. |
197 | 208 | ||
198 | The path field is used to pass a path where it is needed and the size field | 209 | The path field is used to pass a path where it is needed and the size field |
199 | is used account for the increased structure length when translating the | 210 | is used account for the increased structure length when translating the |
@@ -245,9 +256,9 @@ AUTOFS_DEV_IOCTL_PROTOVER_CMD and AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD | |||
245 | Get the major and minor version of the autofs4 protocol version understood | 256 | Get the major and minor version of the autofs4 protocol version understood |
246 | by loaded module. This call requires an initialized struct autofs_dev_ioctl | 257 | by loaded module. This call requires an initialized struct autofs_dev_ioctl |
247 | with the ioctlfd field set to a valid autofs mount point descriptor | 258 | with the ioctlfd field set to a valid autofs mount point descriptor |
248 | and sets the requested version number in structure field arg1. These | 259 | and sets the requested version number in version field of struct args_protover |
249 | commands return 0 on success or one of the negative error codes if | 260 | or sub_version field of struct args_protosubver. These commands return |
250 | validation fails. | 261 | 0 on success or one of the negative error codes if validation fails. |
251 | 262 | ||
252 | 263 | ||
253 | AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT | 264 | AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT |
@@ -256,9 +267,9 @@ AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT | |||
256 | Obtain and release a file descriptor for an autofs managed mount point | 267 | Obtain and release a file descriptor for an autofs managed mount point |
257 | path. The open call requires an initialized struct autofs_dev_ioctl with | 268 | path. The open call requires an initialized struct autofs_dev_ioctl with |
258 | the path field set and the size field adjusted appropriately as well | 269 | the path field set and the size field adjusted appropriately as well |
259 | as the arg1 field set to the device number of the autofs mount. The | 270 | as the devid field of struct args_openmount set to the device number of |
260 | device number can be obtained from the mount options shown in | 271 | the autofs mount. The device number can be obtained from the mount options |
261 | /proc/mounts. The close call requires an initialized struct | 272 | shown in /proc/mounts. The close call requires an initialized struct |
262 | autofs_dev_ioct with the ioctlfd field set to the descriptor obtained | 273 | autofs_dev_ioct with the ioctlfd field set to the descriptor obtained |
263 | from the open call. The release of the file descriptor can also be done | 274 | from the open call. The release of the file descriptor can also be done |
264 | with close(2) so any open descriptors will also be closed at process exit. | 275 | with close(2) so any open descriptors will also be closed at process exit. |
@@ -272,10 +283,10 @@ AUTOFS_DEV_IOCTL_READY_CMD and AUTOFS_DEV_IOCTL_FAIL_CMD | |||
272 | Return mount and expire result status from user space to the kernel. | 283 | Return mount and expire result status from user space to the kernel. |
273 | Both of these calls require an initialized struct autofs_dev_ioctl | 284 | Both of these calls require an initialized struct autofs_dev_ioctl |
274 | with the ioctlfd field set to the descriptor obtained from the open | 285 | with the ioctlfd field set to the descriptor obtained from the open |
275 | call and the arg1 field set to the wait queue token number, received | 286 | call and the token field of struct args_ready or struct args_fail set |
276 | by user space in the foregoing mount or expire request. The arg2 field | 287 | to the wait queue token number, received by user space in the foregoing |
277 | is set to the status to be returned. For the ready call this is always | 288 | mount or expire request. The status field of struct args_fail is set to |
278 | 0 and for the fail call it is set to the errno of the operation. | 289 | the errno of the operation. It is set to 0 on success. |
279 | 290 | ||
280 | 291 | ||
281 | AUTOFS_DEV_IOCTL_SETPIPEFD_CMD | 292 | AUTOFS_DEV_IOCTL_SETPIPEFD_CMD |
@@ -290,9 +301,10 @@ mount be catatonic (see next call). | |||
290 | 301 | ||
291 | The call requires an initialized struct autofs_dev_ioctl with the | 302 | The call requires an initialized struct autofs_dev_ioctl with the |
292 | ioctlfd field set to the descriptor obtained from the open call and | 303 | ioctlfd field set to the descriptor obtained from the open call and |
293 | the arg1 field set to descriptor of the pipe. On success the call | 304 | the pipefd field of struct args_setpipefd set to descriptor of the pipe. |
294 | also sets the process group id used to identify the controlling process | 305 | On success the call also sets the process group id used to identify the |
295 | (eg. the owning automount(8) daemon) to the process group of the caller. | 306 | controlling process (eg. the owning automount(8) daemon) to the process |
307 | group of the caller. | ||
296 | 308 | ||
297 | 309 | ||
298 | AUTOFS_DEV_IOCTL_CATATONIC_CMD | 310 | AUTOFS_DEV_IOCTL_CATATONIC_CMD |
@@ -323,8 +335,8 @@ mount on the given path dentry. | |||
323 | 335 | ||
324 | The call requires an initialized struct autofs_dev_ioctl with the path | 336 | The call requires an initialized struct autofs_dev_ioctl with the path |
325 | field set to the mount point in question and the size field adjusted | 337 | field set to the mount point in question and the size field adjusted |
326 | appropriately. Upon return the struct field arg1 contains the uid and | 338 | appropriately. Upon return the uid field of struct args_requester contains |
327 | arg2 the gid. | 339 | the uid and gid field the gid. |
328 | 340 | ||
329 | When reconstructing an autofs mount tree with active mounts we need to | 341 | When reconstructing an autofs mount tree with active mounts we need to |
330 | re-connect to mounts that may have used the original process uid and | 342 | re-connect to mounts that may have used the original process uid and |
@@ -342,8 +354,9 @@ this ioctl is called until no further expire candidates are found. | |||
342 | The call requires an initialized struct autofs_dev_ioctl with the | 354 | The call requires an initialized struct autofs_dev_ioctl with the |
343 | ioctlfd field set to the descriptor obtained from the open call. In | 355 | ioctlfd field set to the descriptor obtained from the open call. In |
344 | addition an immediate expire, independent of the mount timeout, can be | 356 | addition an immediate expire, independent of the mount timeout, can be |
345 | requested by setting the arg1 field to 1. If no expire candidates can | 357 | requested by setting the how field of struct args_expire to 1. If no |
346 | be found the ioctl returns -1 with errno set to EAGAIN. | 358 | expire candidates can be found the ioctl returns -1 with errno set to |
359 | EAGAIN. | ||
347 | 360 | ||
348 | This call causes the kernel module to check the mount corresponding | 361 | This call causes the kernel module to check the mount corresponding |
349 | to the given ioctlfd for mounts that can be expired, issues an expire | 362 | to the given ioctlfd for mounts that can be expired, issues an expire |
@@ -356,7 +369,8 @@ Checks if an autofs mount point is in use. | |||
356 | 369 | ||
357 | The call requires an initialized struct autofs_dev_ioctl with the | 370 | The call requires an initialized struct autofs_dev_ioctl with the |
358 | ioctlfd field set to the descriptor obtained from the open call and | 371 | ioctlfd field set to the descriptor obtained from the open call and |
359 | it returns the result in the arg1 field, 1 for busy and 0 otherwise. | 372 | it returns the result in the may_umount field of struct args_askumount, |
373 | 1 for busy and 0 otherwise. | ||
360 | 374 | ||
361 | 375 | ||
362 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD | 376 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD |
@@ -368,12 +382,12 @@ The call requires an initialized struct autofs_dev_ioctl. There are two | |||
368 | possible variations. Both use the path field set to the path of the mount | 382 | possible variations. Both use the path field set to the path of the mount |
369 | point to check and the size field adjusted appropriately. One uses the | 383 | point to check and the size field adjusted appropriately. One uses the |
370 | ioctlfd field to identify a specific mount point to check while the other | 384 | ioctlfd field to identify a specific mount point to check while the other |
371 | variation uses the path and optionally arg1 set to an autofs mount type. | 385 | variation uses the path and optionally in.type field of struct args_ismountpoint |
372 | The call returns 1 if this is a mount point and sets arg1 to the device | 386 | set to an autofs mount type. The call returns 1 if this is a mount point |
373 | number of the mount and field arg2 to the relevant super block magic | 387 | and sets out.devid field to the device number of the mount and out.magic |
374 | number (described below) or 0 if it isn't a mountpoint. In both cases | 388 | field to the relevant super block magic number (described below) or 0 if |
375 | the the device number (as returned by new_encode_dev()) is returned | 389 | it isn't a mountpoint. In both cases the the device number (as returned |
376 | in field arg1. | 390 | by new_encode_dev()) is returned in out.devid field. |
377 | 391 | ||
378 | If supplied with a file descriptor we're looking for a specific mount, | 392 | If supplied with a file descriptor we're looking for a specific mount, |
379 | not necessarily at the top of the mounted stack. In this case the path | 393 | not necessarily at the top of the mounted stack. In this case the path |