public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 0/4] *** Add LOOP_CONFIGURE ioctl test ***
@ 2020-06-11 10:35 Yang Xu
  2020-06-11 10:35 ` [LTP] [PATCH v1 1/4] lapi: Add fallback for LOOP_CONFIGURE ioctl and struct loop_config Yang Xu
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Yang Xu @ 2020-06-11 10:35 UTC (permalink / raw)
  To: ltp

Since kernel commit[1], it has added LOOP_CONFIGURE ioctl test.
From this commit, loop_set_fd calls loop_configure with zero
loop_config.

struct loop_config {
	__u32			fd;
	__u32                   block_size;
	struct loop_info64	info;
	__u64			__reserved[8];
}

In addition to doing what LOOP_SET_STATUS can do, LOOP_CONFIGURE can
also be used to:
- Set the correct block size immediately by setting
  loop_config.block_size (I test this in ioctl_loop08.c, like old
ioctl_loop06.c) 
- Explicitly request direct I/O mode by setting LO_FLAGS_DIRECT_IO
  in loop_config.info.lo_flags (I test this in ioctl_loop09.c, like old
ioctl_loop05.c) 
- Explicitly request read-only mode by setting LO_FLAGS_READ_ONLY
  in loop_config.info.lo_flags (I test this in old ioctl_loop02.c)


[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3448914e8cc550ba792d4ccc74471d1ca4293a

Yang Xu (4):
  lapi: Add fallback for LOOP_CONFIGURE ioctl and struct loop_config
  syscalls/ioctl_loop02: Using LOOP_CONFIGURE to set read_only
  syscalls/ioctl_loop08: Add LOOP_CONFIGURE error test with invalid
    block size
  syscalls/ioctl_loop09: Add LOOP_CONFIGURE ioctl test with direct I/O
    flag

 configure.ac                                  |   1 +
 include/lapi/loop.h                           |  23 +++
 runtest/syscalls                              |   2 +
 testcases/kernel/syscalls/ioctl/.gitignore    |   2 +
 .../kernel/syscalls/ioctl/ioctl_loop02.c      |  53 ++++--
 .../kernel/syscalls/ioctl/ioctl_loop08.c      | 101 ++++++++++++
 .../kernel/syscalls/ioctl/ioctl_loop09.c      | 151 ++++++++++++++++++
 7 files changed, 324 insertions(+), 9 deletions(-)
 create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_loop08.c
 create mode 100644 testcases/kernel/syscalls/ioctl/ioctl_loop09.c

-- 
2.23.0




^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2020-07-31 14:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-11 10:35 [LTP] [PATCH v1 0/4] *** Add LOOP_CONFIGURE ioctl test *** Yang Xu
2020-06-11 10:35 ` [LTP] [PATCH v1 1/4] lapi: Add fallback for LOOP_CONFIGURE ioctl and struct loop_config Yang Xu
2020-07-08 13:18   ` Cyril Hrubis
2020-06-11 10:35 ` [LTP] [PATCH v1 2/4] syscalls/ioctl_loop02: Using LOOP_CONFIGURE to set read_only Yang Xu
2020-07-08 13:15   ` Cyril Hrubis
2020-06-11 10:35 ` [LTP] [PATCH v1 3/4] syscalls/ioctl_loop08: Add LOOP_CONFIGURE error test with invalid block size Yang Xu
2020-07-08 14:00   ` Cyril Hrubis
2020-06-11 10:35 ` [LTP] [PATCH v1 4/4] syscalls/ioctl_loop09: Add LOOP_CONFIGURE ioctl test with direct I/O flag Yang Xu
2020-07-08 14:00   ` Cyril Hrubis
2020-07-10  6:39     ` [LTP] [PATCH v2 1/2] syscalls/ioctl_loop06: Using LOOP_CONFIGURE to test invalid block size Yang Xu
2020-07-10  6:39       ` [LTP] [PATCH v2 2/2] syscalls/ioctl_loop05: Using LOOP_CONFIGURE to set direct io Yang Xu
2020-07-30  7:28         ` Yang Xu
2020-07-22  9:45       ` [LTP] [PATCH v2 1/2] syscalls/ioctl_loop06: Using LOOP_CONFIGURE to test invalid block size Cyril Hrubis
2020-07-22 10:15         ` Yang Xu
2020-07-22 12:59           ` Cyril Hrubis
2020-07-23  9:41             ` Yang Xu
2020-07-24  2:05             ` [LTP] [PATCH v3 " Yang Xu
2020-07-24  2:05               ` [LTP] [PATCH v3 2/2] syscalls/ioctl_loop05: Using LOOP_CONFIGURE to set direct io Yang Xu
2020-07-29 11:39                 ` Cyril Hrubis
2020-07-30  8:49                   ` Yang Xu
2020-07-30  9:28                     ` Cyril Hrubis
2020-07-30 10:08                       ` Yang Xu
2020-07-30 10:38                         ` Cyril Hrubis
2020-07-29 12:58                 ` Cyril Hrubis
2020-07-29 10:07               ` [LTP] [PATCH v3 1/2] syscalls/ioctl_loop06: Using LOOP_CONFIGURE to test invalid block size Cyril Hrubis
2020-07-29 10:43                 ` Yang Xu
2020-07-31 14:15                   ` Cyril Hrubis
2020-07-06  1:45 ` [LTP] [PATCH v1 0/4] *** Add LOOP_CONFIGURE ioctl test *** Yang Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox