Re: [WIP PATCH] io_uring: Support opening a file into the fixed-file table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 14, 2020 at 05:59:05PM -0500, Clay Harris wrote:
> I see IORING_OP_FIXED_FILE_TO_FD as a dup() function from fixed file
> to process descriptor space.

Exactly.

> It would be nice if it would take
> parameters to select the functionality of dup, dup2, dup3, F_DUPFD,
> and F_DUPFD_CLOEXEC.  As I recall, O_CLOFORK is on its way from
> Posix-land, so I'd think there will also be something like
> F_DUPFD_CLOFORK coming.

We should certainly have any applicable file-descriptor flags, yes. And
I'd expect to have three primary modes: "give me any unused file
descriptor", "give me this exact file descriptor (closing it if open)",
and "give me this exact file descriptor (erroring if it's already
taken)".

> It would be useful if IORING_REGISTER_xxx_UPDATE would accept a
> placeholder value to ask the kernel not to mess with that index.
> I think AT_FDCWD would be a good choice.

It does accept -1 for that exact purpose.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux