aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>2016-10-11 16:52:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 18:06:31 -0400
commitbf72eda5f9c593495127a34d3444b2ec5939e837 (patch)
treeaab318f2974d8607013cbc4b3462603b95e85bcc /Documentation/filesystems
parentd873284103dacbe90ace2f3de20dff02fafcfef0 (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.txt70
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
192mount point file descriptor, and when requesting the uid and gid of the 203mount point file descriptor, and when requesting the uid and gid of the
193last successful mount on a directory within the autofs file system. 204last successful mount on a directory within the autofs file system.
194 205
195The fields arg1 and arg2 are used to communicate parameters and results of 206The union is used to communicate parameters and results of calls made
196calls made as described below. 207as described below.
197 208
198The path field is used to pass a path where it is needed and the size field 209The path field is used to pass a path where it is needed and the size field
199is used account for the increased structure length when translating the 210is 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
245Get the major and minor version of the autofs4 protocol version understood 256Get the major and minor version of the autofs4 protocol version understood
246by loaded module. This call requires an initialized struct autofs_dev_ioctl 257by loaded module. This call requires an initialized struct autofs_dev_ioctl
247with the ioctlfd field set to a valid autofs mount point descriptor 258with the ioctlfd field set to a valid autofs mount point descriptor
248and sets the requested version number in structure field arg1. These 259and sets the requested version number in version field of struct args_protover
249commands return 0 on success or one of the negative error codes if 260or sub_version field of struct args_protosubver. These commands return
250validation fails. 2610 on success or one of the negative error codes if validation fails.
251 262
252 263
253AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT 264AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT
@@ -256,9 +267,9 @@ AUTOFS_DEV_IOCTL_OPENMOUNT and AUTOFS_DEV_IOCTL_CLOSEMOUNT
256Obtain and release a file descriptor for an autofs managed mount point 267Obtain and release a file descriptor for an autofs managed mount point
257path. The open call requires an initialized struct autofs_dev_ioctl with 268path. The open call requires an initialized struct autofs_dev_ioctl with
258the path field set and the size field adjusted appropriately as well 269the path field set and the size field adjusted appropriately as well
259as the arg1 field set to the device number of the autofs mount. The 270as the devid field of struct args_openmount set to the device number of
260device number can be obtained from the mount options shown in 271the autofs mount. The device number can be obtained from the mount options
261/proc/mounts. The close call requires an initialized struct 272shown in /proc/mounts. The close call requires an initialized struct
262autofs_dev_ioct with the ioctlfd field set to the descriptor obtained 273autofs_dev_ioct with the ioctlfd field set to the descriptor obtained
263from the open call. The release of the file descriptor can also be done 274from the open call. The release of the file descriptor can also be done
264with close(2) so any open descriptors will also be closed at process exit. 275with 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
272Return mount and expire result status from user space to the kernel. 283Return mount and expire result status from user space to the kernel.
273Both of these calls require an initialized struct autofs_dev_ioctl 284Both of these calls require an initialized struct autofs_dev_ioctl
274with the ioctlfd field set to the descriptor obtained from the open 285with the ioctlfd field set to the descriptor obtained from the open
275call and the arg1 field set to the wait queue token number, received 286call and the token field of struct args_ready or struct args_fail set
276by user space in the foregoing mount or expire request. The arg2 field 287to the wait queue token number, received by user space in the foregoing
277is set to the status to be returned. For the ready call this is always 288mount or expire request. The status field of struct args_fail is set to
2780 and for the fail call it is set to the errno of the operation. 289the errno of the operation. It is set to 0 on success.
279 290
280 291
281AUTOFS_DEV_IOCTL_SETPIPEFD_CMD 292AUTOFS_DEV_IOCTL_SETPIPEFD_CMD
@@ -290,9 +301,10 @@ mount be catatonic (see next call).
290 301
291The call requires an initialized struct autofs_dev_ioctl with the 302The call requires an initialized struct autofs_dev_ioctl with the
292ioctlfd field set to the descriptor obtained from the open call and 303ioctlfd field set to the descriptor obtained from the open call and
293the arg1 field set to descriptor of the pipe. On success the call 304the pipefd field of struct args_setpipefd set to descriptor of the pipe.
294also sets the process group id used to identify the controlling process 305On 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. 306controlling process (eg. the owning automount(8) daemon) to the process
307group of the caller.
296 308
297 309
298AUTOFS_DEV_IOCTL_CATATONIC_CMD 310AUTOFS_DEV_IOCTL_CATATONIC_CMD
@@ -323,8 +335,8 @@ mount on the given path dentry.
323 335
324The call requires an initialized struct autofs_dev_ioctl with the path 336The call requires an initialized struct autofs_dev_ioctl with the path
325field set to the mount point in question and the size field adjusted 337field set to the mount point in question and the size field adjusted
326appropriately. Upon return the struct field arg1 contains the uid and 338appropriately. Upon return the uid field of struct args_requester contains
327arg2 the gid. 339the uid and gid field the gid.
328 340
329When reconstructing an autofs mount tree with active mounts we need to 341When reconstructing an autofs mount tree with active mounts we need to
330re-connect to mounts that may have used the original process uid and 342re-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.
342The call requires an initialized struct autofs_dev_ioctl with the 354The call requires an initialized struct autofs_dev_ioctl with the
343ioctlfd field set to the descriptor obtained from the open call. In 355ioctlfd field set to the descriptor obtained from the open call. In
344addition an immediate expire, independent of the mount timeout, can be 356addition an immediate expire, independent of the mount timeout, can be
345requested by setting the arg1 field to 1. If no expire candidates can 357requested by setting the how field of struct args_expire to 1. If no
346be found the ioctl returns -1 with errno set to EAGAIN. 358expire candidates can be found the ioctl returns -1 with errno set to
359EAGAIN.
347 360
348This call causes the kernel module to check the mount corresponding 361This call causes the kernel module to check the mount corresponding
349to the given ioctlfd for mounts that can be expired, issues an expire 362to 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
357The call requires an initialized struct autofs_dev_ioctl with the 370The call requires an initialized struct autofs_dev_ioctl with the
358ioctlfd field set to the descriptor obtained from the open call and 371ioctlfd field set to the descriptor obtained from the open call and
359it returns the result in the arg1 field, 1 for busy and 0 otherwise. 372it returns the result in the may_umount field of struct args_askumount,
3731 for busy and 0 otherwise.
360 374
361 375
362AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD 376AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD
@@ -368,12 +382,12 @@ The call requires an initialized struct autofs_dev_ioctl. There are two
368possible variations. Both use the path field set to the path of the mount 382possible variations. Both use the path field set to the path of the mount
369point to check and the size field adjusted appropriately. One uses the 383point to check and the size field adjusted appropriately. One uses the
370ioctlfd field to identify a specific mount point to check while the other 384ioctlfd field to identify a specific mount point to check while the other
371variation uses the path and optionally arg1 set to an autofs mount type. 385variation uses the path and optionally in.type field of struct args_ismountpoint
372The call returns 1 if this is a mount point and sets arg1 to the device 386set to an autofs mount type. The call returns 1 if this is a mount point
373number of the mount and field arg2 to the relevant super block magic 387and sets out.devid field to the device number of the mount and out.magic
374number (described below) or 0 if it isn't a mountpoint. In both cases 388field to the relevant super block magic number (described below) or 0 if
375the the device number (as returned by new_encode_dev()) is returned 389it isn't a mountpoint. In both cases the the device number (as returned
376in field arg1. 390by new_encode_dev()) is returned in out.devid field.
377 391
378If supplied with a file descriptor we're looking for a specific mount, 392If supplied with a file descriptor we're looking for a specific mount,
379not necessarily at the top of the mounted stack. In this case the path 393not necessarily at the top of the mounted stack. In this case the path