mirror of https://github.com/mkerrisk/man-pages
loop.4: Document LOOP_CONFIGURE ioctl
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
e38283d738
commit
06df754f52
43
man4/loop.4
43
man4/loop.4
|
@ -178,6 +178,49 @@ This value must be a power of two in the range
|
||||||
otherwise, an
|
otherwise, an
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
error results.
|
error results.
|
||||||
|
.TP
|
||||||
|
.BR LOOP_CONFIGURE " (since Linux 5.8)"
|
||||||
|
.\" commit 3448914e8cc550ba792d4ccc74471d1ca4293aae
|
||||||
|
Setup and configure all loop device parameters in a single step using
|
||||||
|
the (third)
|
||||||
|
.BR ioctl (2)
|
||||||
|
argument.
|
||||||
|
This argument is a pointer to a
|
||||||
|
.I loop_config
|
||||||
|
structure, defined in
|
||||||
|
.I <linux/loop.h>
|
||||||
|
as:
|
||||||
|
.IP
|
||||||
|
.in +4n
|
||||||
|
.EX
|
||||||
|
struct loop_config {
|
||||||
|
__u32 fd;
|
||||||
|
__u32 block_size;
|
||||||
|
struct loop_info64 info;
|
||||||
|
__u64 __reserved[8];
|
||||||
|
};
|
||||||
|
.EE
|
||||||
|
.in
|
||||||
|
.IP
|
||||||
|
In addition to doing what
|
||||||
|
.BR LOOP_SET_STATUS
|
||||||
|
can do,
|
||||||
|
.BR LOOP_CONFIGURE
|
||||||
|
can also be used to the following:
|
||||||
|
.RS
|
||||||
|
.IP * 2
|
||||||
|
Set the correct block size immediately by setting
|
||||||
|
.IR loop_config.block_size.
|
||||||
|
.IP *
|
||||||
|
Explicitly request direct I/O mode by setting
|
||||||
|
.BR LO_FLAGS_DIRECT_IO
|
||||||
|
in loop_config.info.lo_flags.
|
||||||
|
.IP *
|
||||||
|
Explicitly request read-only mode by setting
|
||||||
|
.BR LO_FLAGS_READ_ONLY
|
||||||
|
in
|
||||||
|
.IR loop_config.info.lo_flags.
|
||||||
|
.RE
|
||||||
.PP
|
.PP
|
||||||
Since Linux 2.6, there are two new
|
Since Linux 2.6, there are two new
|
||||||
.BR ioctl (2)
|
.BR ioctl (2)
|
||||||
|
|
Loading…
Reference in New Issue