public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 0/2] io_uring: call statx directly
@ 2020-05-22  0:19 Bijan Mottahedeh
  2020-05-22  0:19 ` [PATCH 1/2] statx: allow the system call to be invoked from the kernel Bijan Mottahedeh
  2020-05-22  0:19 ` [PATCH 2/2] io_uring: call statx directly Bijan Mottahedeh
  0 siblings, 2 replies; 7+ messages in thread
From: Bijan Mottahedeh @ 2020-05-22  0:19 UTC (permalink / raw)
  To: axboe; +Cc: io-uring, linux-fsdevel

This patch set is a fix for the liburing statx test failure.

The test fails with a "Miscompare between io_uring and statx" error
because the statx system call path has additional processing in vfs_statx():

        stat->result_mask |= STATX_MNT_ID;
        if (path.mnt->mnt_root == path.dentry)
                stat->attributes |= STATX_ATTR_MOUNT_ROOT;
        stat->attributes_mask |= STATX_ATTR_MOUNT_ROOT;

which then results in different result_mask values.

Allowing the system call to be invoked directly simplifies the io_uring
interface and avoids potential future incompatibilities.  I'm not sure
if there was other reasoning fort not doing so initially.

One issue I cannot account for is the difference in "used" memory reported
by free(1) after running the statx a large (10000) number of times.

The difference is significant ~100k and doesn't really change after
dropping caches.

I enabled memory leak detection and couldn't see anything related to the test.

Bijan Mottahedeh (2):
  statx: allow the system call to be invoked from the kernel
  io_uring: call statx directly

 fs/internal.h |  2 ++
 fs/io_uring.c | 53 +++++++----------------------------------------------
 fs/stat.c     | 32 +++++++++++++++++++-------------
 3 files changed, 28 insertions(+), 59 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2020-05-22  1:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22  0:19 [PATCH 0/2] io_uring: call statx directly Bijan Mottahedeh
2020-05-22  0:19 ` [PATCH 1/2] statx: allow the system call to be invoked from the kernel Bijan Mottahedeh
2020-05-22  0:19 ` [PATCH 2/2] io_uring: call statx directly Bijan Mottahedeh
2020-05-22  0:50   ` Al Viro
2020-05-22  0:52     ` Al Viro
2020-05-22  1:21       ` Al Viro
2020-05-22  1:20     ` Bijan Mottahedeh

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