Thread (15 messages) 15 messages, 6 authors, 2021-01-29

Re: [RFC PATCH] io_uring: add support for IORING_OP_GETDENTS64

From: Andres Freund <hidden>
Date: 2021-01-23 23:58:08
Also in: linux-btrfs, linux-fsdevel, lkml

Hi,

On 2021-01-23 15:50:55 -0800, Andres Freund wrote:
It's also not clear to me that right now you'd necessarily get correct
results if multiple IORING_OP_GETDENTS64 for the same fd get processed
in different workers.  Looking at iterate_dir(), it looks to me that the
locking around the file position would end up being insufficient on
filesystems that implement iterate_shared?
[...]
As there's only a shared lock, seems like both would end up with the
same ctx->pos and end up updating f_pos to the same offset (assuming the
same count).

Am I missing something?
A minimal and brute force approach to this would be to use
io_op_def.hash_reg_file, but brrr, that doesn't seem like a great way
forward.

Greetings,

Andres Freund
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help